m_tdigest¶
Description¶
Select a metric of type tdigest for the align verb.
For all metrics that are not of type tdigest
, including cumulativeCounter
, gauge
, delta
, please use m()
, instead.
Return type¶
tdigest
Domain¶
This is a scalar function (calculates a single output value for a single input row.)
Categories¶
Usage¶
m_tdigest(metricName, [ filter ])
Argument |
Type |
Optional |
Repeatable |
Restrictions |
---|---|---|---|---|
metricName |
string |
no |
no |
none |
filter |
bool |
yes |
no |
none |
Examples¶
align duration_tdigest_combined: tdigest_combine(m_tdigest("duration_tdigest"))
aggregate duration_p95: tdigest_quantile(duration_tdigest_combined, 0.95), group_by(cluster)
Produces the 95th percentile of the “duration_tdigest” metric for each cluster over each time bin.
tdigest_combine
is used to combine tdigest states in time to obtain one state
per time bin.
The bins’ size is automatically calculated based on your query window, and you
can explicitly overwrite it to, e.g. 5 minutes, by changing align
to align 5m, duration_tdigest_combined: ...
.
The dataset must already implement the “metric” interface.