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.
| 32 | // define Value or Histogram but not both. Histogram == nil implies the Value |
| 33 | // field is used, otherwise it should be ignored. |
| 34 | type 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. |
nothing calls this directly
no outgoing calls
no test coverage detected