Histogram functions
These functions operate on histogram metrics.
Returns the arithmetic average of observations stored in a native histogram.
Return type
instant_vector
Parameters
v(instant_vector)- Instant vector input.
Example
histogram_avg(increase(http_request_duration_seconds[5m]))
Returns the count of observations stored in a native histogram.
Return type
instant_vector
Parameters
v(instant_vector)- Instant vector input.
Example
histogram_count(increase(http_request_duration_seconds[5m]))
Returns the φ-quantile of a classic histogram represented by cumulative le buckets or a native (exponential) histogram.
Return type
instant_vector
Parameters
φ(scalar)- Quantile value (0 ≤ φ ≤ 1).
v(instant_vector)- Instant vector input.
Example
histogram_quantile(0.9, rate(http_request_duration_seconds_bucket[5m]))
Returns the sum of observations stored in a native histogram.
Return type
instant_vector
Parameters
v(instant_vector)- Instant vector input.
Example
histogram_sum(increase(http_request_duration_seconds[5m]))