Expand description
Operators that depend on the whole set of evaluated series at each grid point: topk,
bottomk, limitk, limit_ratio, scalar, absent and the instant-result sorts.
Semantics follow Prometheus (aggregationK, HashRatioSampler, funcScalar, funcAbsent,
createLabelsForAbsentFunction, funcSort*). A scalar is a grid series without labels that
has a value at every point, so vector(s) is s itself and has no kernel.
StructsΒ§
- Label
Matcher - A label matcher of the selector
absentis applied to.
EnumsΒ§
- Grouping
- The labels that form an aggregation group.
- MatchOp
- The operator of a
LabelMatcher. - Sort
Order - The order
sort_instantarranges an instant result in.
ConstantsΒ§
- GO_NAN π
- Goβs
math.NaN()bit pattern, which Prometheus returns for an undefined scalar.
FunctionsΒ§
- absent
absent(v): 1 withlabelsat every point where no series is present.- absent_
labels - The labels of an
absentresult, as PrometheuscreateLabelsForAbsentFunctionderives them: the first equality matcher of a name sets that label, any other matcher of the name removes it, and__name__is skipped. - chunks π
- Maximal runs of ASCII digits and of other characters, like the regexp
(\d+|\D+). - compare_
labels π - Prometheus
labels.Compare: label pairs in name order, then the shorter set first. - cursor_
value π - The value a forward cursor reads at compact
row; the rows asked for only increase. - float_
samples π serieswithout its histogram samples,Nonewhen nothing else is left. One field, assortreads.- grid_
and_ πpoints - Checks every series against
schemaand returns the grid it validated them on, with its length. - grid_
points π - Checks every series against
schemaand returns the grid length. - group_
key π - group_
key_ πfrom - The group
labelsbelong to, for callers that already hold the seriesβ label pairs. - into_
value π - A sample as a value for an operator that ranks or sorts reads it.
- k_param π
- The
koftopk,bottomkandlimitkas Prometheus reads it: nothing forkbelow 1, an error for NaN or a value out of int64, otherwisektruncated and capped at the number of input series. - labels_
with_ πname - The label pairs of
metricwith__name__among them, sorted by name. - limit_
ratio limit_ratio(r, ...)with a constantr.- limitk
limitk(k, ...)with a constantk.- natural_
less π github.com/facette/natsort.Compare, whichsort_by_labeluses: digit runs compare as integers when both parse, other runs as strings.- rank π
- The order of
aandbfortopk(top) orbottomk; NaN ranks last for both. - sample_
offset π - Prometheus
HashRatioSampler.SampleOffset: the xxHash64 of the labels asstringlabelsencodes them, each name and value prefixed by its length, overu64::MAX. - scalar
scalar(v): the value of the only float sample present at each point, NaN otherwise.- single_
field π - sort_
instant - Orders the series of an instant result. A range result keeps its order: Prometheus does not sort matrices.
- topk
topk(k, ...)(top) orbottomk(k, ...)with a constantk.- topk_at
topk/bottomkwithkevaluated independently at each grid point.- validate_
topk_ πparameters - Validates the complete parameter series for Prometheus topk/bottomk/limitk semantics.
- value_
at π - The first fieldβs value of
seriesat gridpoint, looked up by position.
Type AliasesΒ§
- Group
Key π - Label pairs identifying a group; empty values are absent, as in Prometheus.