Enum relay_base_schema::metrics::MetricType
source · 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 moresource§impl Debug for MetricType
impl Debug for MetricType
source§impl<'de> Deserialize<'de> for MetricType
impl<'de> Deserialize<'de> for MetricType
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
source§impl Display for MetricType
impl Display for MetricType
source§impl FromStr for MetricType
impl FromStr for MetricType
source§impl Hash for MetricType
impl Hash for MetricType
source§impl Ord for MetricType
impl Ord for MetricType
source§fn cmp(&self, other: &MetricType) -> Ordering
fn cmp(&self, other: &MetricType) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for MetricType
impl PartialEq for MetricType
source§impl PartialOrd for MetricType
impl PartialOrd for MetricType
source§impl Serialize for MetricType
impl Serialize for MetricType
impl Copy for MetricType
impl Eq for MetricType
impl StructuralPartialEq for MetricType
Auto Trait Implementations§
impl Freeze for MetricType
impl RefUnwindSafe for MetricType
impl Send for MetricType
impl Sync for MetricType
impl Unpin for MetricType
impl UnwindSafe for MetricType
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)