histogram_quantile()

The PromQL function that estimates a percentile from a histogram's cumulative buckets.

In more detail

It finds the bucket holding the requested rank and interpolates inside it. The usual shape is to rate each bucket over one window, sum by the identifying labels while keeping le, and pass the result in. The answer is in the metric's unit, usually seconds.

Example

histogram_quantile(0.99, sum by (le, route) (rate(http_request_duration_seconds_bucket[5m])))

Related terms

Taught in

References