exemplar

package
v0.40.5 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2022 License: Apache-2.0 Imports: 1 Imported by: 76

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

This section is empty.

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