Enum opentelemetry::sdk::metrics::Aggregation
source · pub enum Aggregation {
Drop,
Default,
Sum,
LastValue,
ExplicitBucketHistogram {
boundaries: Vec<f64, Global>,
record_min_max: bool,
},
}
metrics
only.Expand description
The way recorded measurements are summarized.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Drop
An aggregation that drops all recorded data.
Default
An aggregation that uses the default instrument kind selection mapping to select another aggregation.
A metric reader can be configured to make an aggregation selection based on instrument kind that differs from the default. This aggregation ensures the default is used.
See the DefaultAggregationSelector for information about the default instrument kind selection mapping.
Sum
An aggregation that summarizes a set of measurements as their arithmetic sum.
LastValue
An aggregation that summarizes a set of measurements as the last one made.
ExplicitBucketHistogram
Fields
boundaries: Vec<f64, Global>
The increasing bucket boundary values.
Boundary values define bucket upper bounds. Buckets are exclusive of their lower boundary and inclusive of their upper bound (except at positive infinity). A measurement is defined to fall into the greatest-numbered bucket with a boundary that is greater than or equal to the measurement. As an example, boundaries defined as:
vec![0.0, 5.0, 10.0, 25.0, 50.0, 75.0, 100.0, 250.0, 500.0, 1000.0];
Will define these buckets:
(-∞, 0], (0, 5.0], (5.0, 10.0], (10.0, 25.0], (25.0, 50.0], (50.0, 75.0], (75.0, 100.0], (100.0, 250.0], (250.0, 500.0], (500.0, 1000.0], (1000.0, +∞)
record_min_max: bool
Indicates whether to not record the min and max of the distribution.
By default, these values are recorded.
Recording these values for cumulative data is expected to have little
value, they will represent the entire life of the instrument instead of
just the current collection cycle. It is recommended to set this to
false
for that type of data to avoid computing the low-value
instances.
An aggregation that summarizes a set of measurements as an histogram with explicitly defined buckets.
Implementations§
source§impl Aggregation
impl Aggregation
sourcepub fn validate(&self) -> Result<(), MetricsError>
pub fn validate(&self) -> Result<(), MetricsError>
Validate that this aggregation has correct configuration
Trait Implementations§
source§impl Clone for Aggregation
impl Clone for Aggregation
source§fn clone(&self) -> Aggregation
fn clone(&self) -> Aggregation
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for Aggregation
impl Debug for Aggregation
source§impl Display for Aggregation
impl Display for Aggregation
source§impl PartialEq<Aggregation> for Aggregation
impl PartialEq<Aggregation> for Aggregation
source§fn eq(&self, other: &Aggregation) -> bool
fn eq(&self, other: &Aggregation) -> bool
self
and other
values to be equal, and is used
by ==
.