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
Histogram allows to pass buckets with negative bucket boundaries, but they are never updated, and read as 0 when exporting. Also, when negative entries are present a -Inf should also be added, and the summary part (_count and _sum should be probably decomposed into positive and negative parts, otherwise the _sum will be pretty useless)
No idea about the support on Prometheus side in histogram_percentile.
I do often have need for double sided histogram, and right now usually implement it as two histograms (positive and negative), but that is far from optimal.
Hmm, could I get a bit more detail on how they are not supported/an example or failing test? The very brief tests I am running everything seems to work ok. We certainly aim to support negative buckets!
Note that I don't think -Inf should be be added as it doesn't make any sense for a value to be less than or equal to -Inf. Also, according to the Open Metrics spec, in the presence of negative histogram buckets _sum MUST be omitted, and that is how it is handled by this library.
Activity
csmarchbanks commentedon Mar 11, 2022
Hmm, could I get a bit more detail on how they are not supported/an example or failing test? The very brief tests I am running everything seems to work ok. We certainly aim to support negative buckets!
Note that I don't think
-Infshould be be added as it doesn't make any sense for a value to be less than or equal to-Inf. Also, according to the Open Metrics spec, in the presence of negative histogram buckets_sumMUST be omitted, and that is how it is handled by this library.baryluk commentedon Mar 15, 2022
Yes,
-Infdoesn't make much sens probably.But here is an example of the failure:
Notice
value=0.0for non-positive buckets.baryluk commentedon Mar 15, 2022
My bad. It actually works:
My bad.