pub struct Exemplar {
    pub labels: HashMap<String, String>,
    pub timestamp: Option<f64>,
    pub id: f64,
}
Expand description

An OpenMetrics Exemplar (that is also valid in Prometheus) https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#exemplars Exemplars are references to data outside of the MetricSet. A common use case are IDs of program traces. Exemplars MUST consist of a LabelSet and a value, and MAY have a timestamp. They MAY each be different from the MetricPoints’ LabelSet and timestamp. The combined length of the label names and values of an Exemplar’s LabelSet MUST NOT exceed 128 UTF-8 characters. Other characters in the text rendering of an exemplar such as “,= are not included in this limit for implementation simplicity and for consistency between the text and proto formats.

Fields

labels: HashMap<String, String>timestamp: Option<f64>id: f64

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.