histogram_quantile¶
Description¶
Compute quantiles on histogram objects.
This function can handle multiple types of histograms - tdigest
, otelHistogram
, otelExponentialHistogram
. Appropriate quantile calculation method is chosen based on the type of the input.
Return type¶
float64
Domain¶
This is a scalar function (calculates a single output value for a single input row.)
Categories¶
Usage¶
histogram_quantile(histogram, quantile)
Argument |
Type |
Optional |
Repeatable |
Restrictions |
---|---|---|---|---|
histogram |
histogram like |
no |
no |
none |
quantile |
float64 |
no |
no |
constant |
Examples¶
align o: histogram_combine(m_histogram("latency"))
aggregate o: histogram_quantile(histogram_combine(o), 0.1), group_by(^Cluster...)
align
aggregates OTEL histogram metric “latency” into 5 minute time bins. aggregate
computes the 0.1-quantiles of the histogram for each cluster.
align o: histogram_combine(m_exponential_histogram("latency"))
aggregate o: histogram_quantile(histogram_combine(o), 0.1), group_by(^Cluster...)
align
aggregates OTEL exponential histogram metric “latency” into 5 minute time bins. aggregate
computes the 0.1-quantiles of the histogram for each cluster.
align o: histogram_combine(m_tdigest("latency"))
aggregate o: histogram_quantile(histogram_combine(o), 0.1), group_by(^Cluster...)
align
aggregates tdigest metric “latency” into 5 minute time bins. aggregate
computes the 0.1-quantiles of the histogram for each cluster.