Skip to main content

Module histogram_eval

Module histogram_eval 

Source
Expand description

Histogram functions over evaluated series: histogram_quantile and histogram_fraction over classic and native histograms (Prometheus funcHistogramQuantile, funcHistogramFraction and resetHistograms), and histogram_count, histogram_sum, histogram_avg, histogram_stddev and histogram_stdvar over native histograms.

ModulesΒ§

aggregate πŸ”’
The compensated sum and avg fold of native histograms, following the histogram paths of Prometheus aggregation. The range functions sum_over_time and avg_over_time fold a window with it, and the aggregate node runs the same steps per point through crate::aggregate::HistogramAccumulator.
bounds πŸ”’
Prometheus exponentialBounds (model/histogram/generic.go): the bucket bounds in [0.5, 1) of exponential schemas 0 to 8, which getBoundExponential scales by a power of two.
classic πŸ”’
Prometheus BucketQuantile and BucketFraction over the buckets of a classic histogram at one point.
float_histogram πŸ”’
Arithmetic on owned native histograms, following Prometheus FloatHistogram (model/histogram/float_histogram.go): Add, KahanAdd, Sub, Mul, Div, Compact, CopyToSchema, DetectReset and Equals, including zero bucket reconciliation, resolution reduction and the intersection of mismatched custom bounds.
legacy_bridge πŸ”’
The legacy native-histogram estimators, delegated to the native kernel.
native πŸ”’
Prometheus HistogramQuantile, HistogramFraction and the histogramVariance estimate over one native histogram, with the bucket iteration of model/histogram.

StructsΒ§

Group πŸ”’
The series of one label set (le aside): classic buckets, and the series of exactly that label set when it holds native histograms.
HistogramParameters
Per-grid-point arguments to a classic or native histogram function.

EnumsΒ§

HistogramFunction
histogram_quantile or histogram_fraction with its constant arguments.
NativeHistogramFunction
A function of one native histogram.

ConstantsΒ§

BUCKET_LABEL πŸ”’
HISTOGRAM_ROUTING_EXCLUDED_LABELS πŸ”’
Histogram inputs that can produce the same output must meet at one partition. The kernel still groups by metadata before removing it, so distinct histograms are not mixed together.

FunctionsΒ§

evaluate_histograms
Evaluates function over the classic and native histograms in series.
evaluate_histograms_with_annotations πŸ”’
Evaluates function with optional per-point scalar arguments, reporting what it drops to collector. A missing parameter value suppresses the output at that point, matching aggregate quantile’s missing-q behavior.
grid_axis πŸ”’
Checks that series is addressed on a grid, which is what a position lookup needs.
has_histograms πŸ”’
histogram_quantiles
histogram_quantiles(v, label, q...): evaluate_histograms with Quantile(q) for each q, each result labelled with label set to q as Prometheus’ FormatOpenMetricsFloat writes it. Results that then share a label set merge as merge_same_labelset does, so a repeated q, or a label that overwrites the label telling two histograms apart, fails at a point both hold.
histogram_string πŸ”’
A native histogram as Go’s FloatHistogram.String writes it, the label value count_values gives a histogram sample.
map_native_histogram
Applies function to the native histogram samples of series; float samples are dropped and so is __name__. None when the series has no histogram sample.