Enum MetricType
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§
§impl MetricType
impl MetricType
Trait Implementations§
§impl Clone for MetricType
impl Clone for MetricType
§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§impl Debug for MetricType
impl Debug for MetricType
§impl<'de> Deserialize<'de> for MetricType
impl<'de> Deserialize<'de> for MetricType
§fn deserialize<D>(
deserializer: D,
) -> Result<MetricType, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<MetricType, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
§impl Display for MetricType
impl Display for MetricType
§impl FromStr for MetricType
impl FromStr for MetricType
§type Err = ParseMetricError
type Err = ParseMetricError
§fn from_str(s: &str) -> Result<MetricType, <MetricType as FromStr>::Err>
fn from_str(s: &str) -> Result<MetricType, <MetricType as FromStr>::Err>
s to return a value of this type. Read more§impl Hash for MetricType
impl Hash for MetricType
§impl Ord for MetricType
impl Ord for MetricType
§impl PartialEq for MetricType
impl PartialEq for MetricType
§impl PartialOrd for MetricType
impl PartialOrd for MetricType
§impl Serialize for MetricType
impl Serialize for MetricType
§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
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,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.