m_tdigest
m_tdigest(metricName: string, [filter: bool]?) -> tdigest of float64
Selects a tdigest-valued metric inside align the same way m selects floats, but requires the chosen metric to be known as a tdigest type in dataset metadata. If the name is missing from metadata the compiler emits both an error (unknown type for this selector) and a warning that the metric may need an explicit set_metric tdigest declaration. The optional boolean filter restricts which points contribute after the name match. Histogram or float metrics must use m_histogram, m_exponential_histogram, m_object, or m respectively. Usage outside align is rejected.
Domain
This is a scalar function (calculates a single output value for a single input row).
Categories
Examples
align 5m, frame(back: 5m), o: tdigest_combine(m_tdigest("latency_digest"))
Merges partial t-digest states for the named digest metric across each five-minute alignment bucket.
align 1m, frame(back: 1m), o: histogram_quantile(m_tdigest("payload_size"), 0.99)
Computes an approximate 99th percentile from a t-digest metric selected with the digest-specific accessor.
Updated 19 days ago