Hello, when playing with the histogram_quantile
function I stumbled upon this interesting behavior. When I create plot of histogram_quantile
like so: histogram_quantile(0.5, rate(test_seconds_bucket{job="test-job", source="test-source", instance="test-instance"}[$__rate_interval]))
it works as expected which is fine. But when I accidentaly added the le
label selector like so: histogram_quantile(0.5, rate(test_seconds_bucket{job="test-job", source="test-source", le="0.005", instance="test-instance"}[$__rate_interval]))
it still displayed the same results as before without the bucket selector. The le=0.0005
bucket happens to be empty but it produces the same result for other non empty buckets aswell eg. the +inf
one. The only thing that comes to my mind is that something is probably ignoring the le
label by default, but I tried reading the documentation, asking gpt models and digging into the source code and I found no evidence of such mechanism. I am executing these querries in our on-prem Grafana instance so I am not sure if they (Grafana) are doing something or if it is a Prometheus thing. Please could anyone help me finding an explanation to this behavior? Like how can the histogram_quantile
function be given just one bucket (vector?) of data and still produced the correct result using all the correctly labeled buckets? Many thanks for any help!