pub struct CommonMetricData {
    pub name: String,
    pub category: String,
    pub send_in_pings: Vec<String, Global>,
    pub lifetime: Lifetime,
    pub disabled: bool,
    pub dynamic_label: Option<String>,
}
Expand description

The common set of data shared across all different metric types.

Fields

name: String

The metric’s name.

category: String

The metric’s category.

send_in_pings: Vec<String, Global>

List of ping names to include this metric in.

lifetime: Lifetime

The metric’s lifetime.

disabled: bool

Whether or not the metric is disabled.

Disabled metrics are never recorded.

dynamic_label: Option<String>

Dynamic label.

When a LabeledMetric<T> factory creates the specific metric to be recorded to, dynamic labels are stored in the specific label so that we can validate them when the Glean singleton is available.

Implementations

Creates a new metadata object.

Whether this metric should be recorded.

The list of storages this metric should be recorded into.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.