pub trait MetricType {
    fn meta(&self) -> &CommonMetricDataInternal;

    fn with_name(&self, _name: String) -> Self
        Self: Sized
, { ... } fn with_dynamic_label(&self, _label: String) -> Self
        Self: Sized
, { ... } fn should_record(&self, glean: &Glean) -> bool { ... } }
Expand description

A MetricType describes common behavior across all metrics.

Required Methods§

Access the stored metadata

Provided Methods§

Create a new metric from this with a new name.

Create a new metric from this with a specific label.

Whether this metric should currently be recorded

This depends on the metrics own state, as determined by its metadata, and whether upload is enabled on the Glean object.