question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NaN metric is not reported

See original GitHub issue

Not A Number (NaN) is a supported metric according to EXPOSITION FORMATS

value is a float represented as required by Go’s ParseFloat() function. In addition to standard numerical values, Nan, +Inf, and -Inf are valid values representing not a number, positive infinity, and negative infinity, respectively.

However, this is not tracked when doing the following:

var nanGauge = Prometheus.Client.Metrics.CreateGauge("nan", "metric with nan value");
nanGauge.Set(double.NaN);

Expected Outcome

# HELP nan metric with nan value
# TYPE nan gauge
Nan

Actual Outcome

# HELP nan metric with nan value
# TYPE nan gauge

Repro

Pull https://github.com/tomkerkhove/prometheus-nan-repro and consume /repro endpoint.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:32 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
tomkerkhovecommented, Aug 27, 2019

Sure that’s fine - Thanks!

1reaction
tomkerkhovecommented, Aug 7, 2019

That would be prefect for me! Thanks for considering!

Read more comments on GitHub >

github_iconTop Results From Across the Web

NaN metric is not reported · Issue #65 · prom-client-net ...
Not A Number (NaN) is a supported metric according to EXPOSITION FORMATS value is a float represented as required by Go's ParseFloat() ...
Read more >
RLLIB not working with Tune with sample batch input - Ray
This means that no trial has reported this metric, or all values reported for this metric are NaN. To not ignore NaN values,...
Read more >
prometheus sum one NaN value result into NaN. How to ...
This is a bug in the exporter. NaN is not the same as null, a missing value is the equivalent in Prometheus. –...
Read more >
What's the best way to handle NaN values?
Metrics imputations is a way to fill NaN values with some special metrics that depend on your data: mean or median for example....
Read more >
Alert on NaN value
Is there any way to configure an alert firing when some metric has NaN as value? ... The testing system could produce some...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found