mirror of
https://github.com/floci-io/floci.git
synced 2026-12-04 02:28:08 -05:00
Histogram samples now take part in arithmetic and aggregation as Prometheus v3.16 lets them: a histogram is added to or taken from another, multiplied by a float or divided by one, negated, and compared with == and !=; two histograms are first brought to the coarser schema, merging the finer one's buckets, and to the larger zero threshold, which takes the buckets it then covers. Any other pairing keeps nothing, with Prometheus's "incompatible sample types encountered for binary operator" info between two vectors. sum and avg add histograms with Kahan compensation (PromQlHistogramSum, a port of KahanAdd on Floci's dense buckets), avg falling back to a running mean when the sum overflows, and so do sum_over_time and avg_over_time; a group or a range holding both floats and histograms has no result and gets Prometheus's "encountered a mix of histograms and floats" warning, which responses now carry under warnings. A computed histogram is counted against the query's memory once, as a label set is, and a data point whose buckets reach past the bucket of infinite observations carries no sample. Part of #7030.