Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign uphistogram_quantile returns NaN if 2 or more buckets are zeroes #4264
Comments
This comment has been minimized.
This comment has been minimized.
There's something else going on here. This looks like your application is exposing a non-cumulative histogram. Can you share the values of it on /metrics? |
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
|
That's incorrectly implemented, Prometheus histograms are meant to be cumulative. In addition the format specifies that buckets should be ordered so +Inf should be last and +Inf should match _count. Which client library is this from? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
I'd suggest filing a bug with them, and also consider using the official client at https://github.com/prometheus/client_python. |
This comment has been minimized.
This comment has been minimized.
|
Thanks Brian, I will open a bug over there. |
dimitar-petrov
referenced this issue
Jun 13, 2018
Closed
Histograms are not compatible with prometheus histogram_quantile() #28
This comment has been minimized.
This comment has been minimized.
|
The official client should still work fine for async use cases, though there may be extra utilities you'd like on top of it. This issue is elsewhere, so closing. |
brian-brazil
closed this
Jun 13, 2018
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 22, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
dimitar-petrov commentedJun 13, 2018
Bug Report
What did you do?
Here is the data that I am working with:
rate(callback_latency_seconds_bucket{app='foo'}[5m])I would like to be able to display the xth quantile and I am using the following function:
But I am not getting any values:
If instead I increase the rate period so all buckets are populated I am geting the following result:
rate(callback_latency_seconds_bucket{app='foo'}[13h])histogram_quantile(0.99, sum(rate(callback_latency_seconds_bucket{app="foo"}[13h])) by (le))What did you expect to see?
My expectation is that quantile should be calculated even if I do not have request delays in two buckets
What did you see instead? Under which circumstances?
explained above
Environment
Alertmanager version:
Not relevant
Prometheus configuration file:
Alertmanager configuration file:
Not relevant
Logs:
Not relevant