MCPcopy Create free account
hub / github.com/prometheus/common / Sample

Struct Sample

model/value.go:34–39  ·  view source on GitHub ↗

Sample is a sample pair associated with a metric. A single sample must either define Value or Histogram but not both. Histogram == nil implies the Value field is used, otherwise it should be ignored.

Source from the content-addressed store, hash-verified

32// define Value or Histogram but not both. Histogram == nil implies the Value
33// field is used, otherwise it should be ignored.
34type Sample struct {
35 Metric Metric `json:"metric"`
36 Value SampleValue `json:"value"`
37 Timestamp Time `json:"timestamp"`
38 Histogram *SampleHistogram `json:"histogram"`
39}
40
41// Equal compares first the metrics, then the timestamp, then the value. The
42// semantics of value equality is defined by SampleValue.Equal.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected