pub enum MetricType {
Counter,
Distribution,
Set,
Gauge,
}
Expand description
The type of a MetricResourceIdentifier
, determining its aggregation and evaluation.
Variants§
Counter
Counts instances of an event.
Counters can be incremented and decremented. The default operation is to increment a counter
by 1
, although increments by larger values are equally possible.
Counters are declared as "c"
. Alternatively, "m"
is allowed.
Distribution
Builds a statistical distribution over values reported.
Based on individual reported values, distributions allow to query the maximum, minimum, or average of the reported values, as well as statistical quantiles. With an increasing number of values in the distribution, its accuracy becomes approximate.
Distributions are declared as "d"
. Alternatively, "d"
and "ms"
are allowed.
Set
Counts the number of unique reported values.
Sets allow sending arbitrary discrete values, including strings, and store the deduplicated count. With an increasing number of unique values in the set, its accuracy becomes approximate. It is not possible to query individual values from a set.
Sets are declared as "s"
.
Gauge
Stores absolute snapshots of values.
In addition to plain counters, gauges store a snapshot of the maximum, minimum and sum of all values, as well as the last reported value.
Gauges are declared as "g"
.
Implementations§
Trait Implementations§
Source§impl Clone for MetricType
impl Clone for MetricType
Source§fn clone(&self) -> MetricType
fn clone(&self) -> MetricType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more