You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Histograms with bucket labels starting with '-' are missing _sum metric in 0.8.0? #552
I have encountered an issue with my metrics after having upgraded from version 0.7.1 to 0.8.0.
In the example below, the resulting histogram does not have the sum metric (suffix _sum) when using 0.8.0. If I use version 0.7.1, the _sum metric is back.
If I change the value of the 1st bucket, so it no longer has the minus/dash prefix (As seen below), the _sum metric is no longer missing in when using version 0.8.0.
bucket_values = [['50000', 40], ['+Inf', 40]]
Is this behaviour a feature (Which I do not understand) or a regression?
@brian-brazil then it's an OpenMetrics flaw that histogram "_sum" is of type counter. It should be a gauge, and therefore support histograms with negative observations.
How do you propose we derive the average from a histogram metric? It should be simply _sum / _count.
Activity
brian-brazil commentedon May 28, 2020
This is correct, negative observations means that sum would no longer be a counter and it is thus excluded as per OpenMetrics.
tobiasbp commentedon May 28, 2020
Counter = never decreasing (AFAIK). Makes sense. Thanks for all your work on Prometheus.
belm0 commentedon Feb 26, 2021
@brian-brazil then it's an OpenMetrics flaw that histogram "_sum" is of type counter. It should be a gauge, and therefore support histograms with negative observations.
How do you propose we derive the average from a histogram metric? It should be simply _sum / _count.