Skip to main content

absent_labels

Function absent_labels 

Source
pub fn absent_labels(matchers: &[LabelMatcher]) -> Result<SeriesLabels>
Expand description

The labels of an absent result, as Prometheus createLabelsForAbsentFunction derives them: the first equality matcher of a name sets that label, any other matcher of the name removes it, and __name__ is skipped.

Prometheus reads the matchers after TSDB’s PostingsForMatchers has reordered them in place, moving the matchers that narrow the result before those that only subtract from it; that is the order users see whenever the storage holds data, and the order used here. It changes the result only when a name has both an equality and another matcher.