summaryrefslogtreecommitdiffstats
path: root/library/cpp/monlib/encode/prometheus/prometheus_decoder.cpp
diff options
context:
space:
mode:
authoralexnadtochiy <[email protected]>2025-12-12 16:20:28 +0300
committeralexnadtochiy <[email protected]>2025-12-12 17:14:17 +0300
commit3d4e0b44c9bb86ca521b20e125f1625846670605 (patch)
tree49b05c34297cdf350c57a9f37c516ca5a9527021 /library/cpp/monlib/encode/prometheus/prometheus_decoder.cpp
parent0f01c3cec912301670d5791b06740e6234d192e5 (diff)
Fix prometheus nan parsing
commit_hash:ea34eba995ae4c386785fe89df58c439a2e3ea63
Diffstat (limited to 'library/cpp/monlib/encode/prometheus/prometheus_decoder.cpp')
-rw-r--r--library/cpp/monlib/encode/prometheus/prometheus_decoder.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/cpp/monlib/encode/prometheus/prometheus_decoder.cpp b/library/cpp/monlib/encode/prometheus/prometheus_decoder.cpp
index 16a08f47819..5ccc854cab2 100644
--- a/library/cpp/monlib/encode/prometheus/prometheus_decoder.cpp
+++ b/library/cpp/monlib/encode/prometheus/prometheus_decoder.cpp
@@ -576,7 +576,7 @@ namespace NMonitoring {
return std::numeric_limits<double>::infinity();
} else if (str == TStringBuf("-Inf")) {
return -std::numeric_limits<double>::infinity();
- } else if (str == TStringBuf("NaN")) {
+ } else if (str == TStringBuf("NaN") || str == TStringBuf("Nan")) {
return NAN;
}