exemplar

package
v0.54.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2024 License: Apache-2.0 Imports: 1 Imported by: 77

Documentation

Index

Constants

View Source
const ExemplarMaxLabelSetLength = 128

The combined length of the label names and values of an Exemplar's LabelSet MUST NOT exceed 128 UTF-8 characters https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#exemplars

Variables

This section is empty.

Functions

func Compare added in v0.49.0

func Compare(a, b Exemplar) int

Sort first by timestamp, then value, then labels.

Types

type Exemplar

type Exemplar struct {
	Labels labels.Labels `json:"labels"`
	Value  float64       `json:"value"`
	Ts     int64         `json:"timestamp"`
	HasTs  bool
}

Exemplar is additional information associated with a time series.

func (Exemplar) Equals

func (e Exemplar) Equals(e2 Exemplar) bool

Equals compares if the exemplar e is the same as e2. Note that if HasTs is false for both exemplars then the timestamps will be ignored for the comparison. This can come up when an exemplar is exported without it's own timestamp, in which case the scrape timestamp is assigned to the Ts field. However we still want to treat the same exemplar, scraped without an exported timestamp, as a duplicate of itself for each subsequent scrape.

type QueryResult

type QueryResult struct {
	SeriesLabels labels.Labels `json:"seriesLabels"`
	Exemplars    []Exemplar    `json:"exemplars"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL