Struct glean_core::metrics::LabeledMetric [−][src]
pub struct LabeledMetric<T> { /* fields omitted */ }
Expand description
A labeled metric.
Labeled metrics allow to record multiple sub-metrics of the same type under different string labels.
Implementations
Creates a new labeled metric from the given metric instance and optional list of labels.
See get
for information on how static or dynamic labels are handled.
Gets a specific metric for a given label.
If a set of acceptable labels were specified in the metrics.yaml
file,
and the given label is not in the set, it will be recorded under the special OTHER_LABEL
label.
If a set of acceptable labels was not specified in the metrics.yaml
file,
only the first 16 unique labels will be used.
After that, any additional labels will be recorded under the special OTHER_LABEL
label.
Labels must be snake_case
and less than 30 characters.
If an invalid label is used, the metric will be recorded in the special OTHER_LABEL
label.
Gets the template submetric.
The template submetric is the actual metric that is cloned and modified to record for a specific label.
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for LabeledMetric<T> where
T: RefUnwindSafe,
impl<T> Send for LabeledMetric<T> where
T: Send,
impl<T> Sync for LabeledMetric<T> where
T: Sync,
impl<T> Unpin for LabeledMetric<T> where
T: Unpin,
impl<T> UnwindSafe for LabeledMetric<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more