Struct glean_core::metrics::DualLabeledCounterMetric
source · pub struct DualLabeledCounterMetric { /* private fields */ }
Expand description
A dual labled metric
Dual labled metrics allow recording multiple sub-metrics of the same type, in relation to two dimensions rather than the single label provided by the standard labeled type.
Implementations§
source§impl DualLabeledCounterMetric
impl DualLabeledCounterMetric
sourcepub fn new(
meta: CommonMetricData,
keys: Option<Vec<Cow<'static, str>>>,
catgories: Option<Vec<Cow<'static, str>>>,
) -> DualLabeledCounterMetric
pub fn new( meta: CommonMetricData, keys: Option<Vec<Cow<'static, str>>>, catgories: Option<Vec<Cow<'static, str>>>, ) -> DualLabeledCounterMetric
Creates a new dual labeled counter from the given metric instance and optional list of labels.
sourcepub fn get<S: AsRef<str>>(&self, key: S, category: S) -> Arc<CounterMetric>
pub fn get<S: AsRef<str>>(&self, key: S, category: S) -> Arc<CounterMetric>
Gets a specific metric for a given key/category combination.
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 have a maximum of 111 characters, and may comprise any printable ASCII characters.
If an invalid label is used, the metric will be recorded in the special OTHER_LABEL
label.
Trait Implementations§
source§impl Debug for DualLabeledCounterMetric
impl Debug for DualLabeledCounterMetric
source§impl<UT> LiftRef<UT> for DualLabeledCounterMetric
impl<UT> LiftRef<UT> for DualLabeledCounterMetric
source§impl<UT> LowerError<UT> for DualLabeledCounterMetric
impl<UT> LowerError<UT> for DualLabeledCounterMetric
source§fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
source§impl<UT> LowerReturn<UT> for DualLabeledCounterMetric
impl<UT> LowerReturn<UT> for DualLabeledCounterMetric
source§type ReturnType = <Arc<DualLabeledCounterMetric> as LowerReturn<UniFfiTag>>::ReturnType
type ReturnType = <Arc<DualLabeledCounterMetric> as LowerReturn<UniFfiTag>>::ReturnType
source§fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
§fn handle_failed_lift(
error: LiftArgsError,
) -> Result<Self::ReturnType, RustCallError>
fn handle_failed_lift( error: LiftArgsError, ) -> Result<Self::ReturnType, RustCallError>
source§impl MallocSizeOf for DualLabeledCounterMetric
impl MallocSizeOf for DualLabeledCounterMetric
source§impl MetricType for DualLabeledCounterMetric
impl MetricType for DualLabeledCounterMetric
source§fn with_name(&self, _name: String) -> Selfwhere
Self: Sized,
fn with_name(&self, _name: String) -> Selfwhere
Self: Sized,
source§fn with_dynamic_label(&self, _label: DynamicLabelType) -> Selfwhere
Self: Sized,
fn with_dynamic_label(&self, _label: DynamicLabelType) -> Selfwhere
Self: Sized,
source§impl<UT> TypeId<UT> for DualLabeledCounterMetric
impl<UT> TypeId<UT> for DualLabeledCounterMetric
const TYPE_ID_META: MetadataBuffer = _
Auto Trait Implementations§
impl !Freeze for DualLabeledCounterMetric
impl RefUnwindSafe for DualLabeledCounterMetric
impl Send for DualLabeledCounterMetric
impl Sync for DualLabeledCounterMetric
impl Unpin for DualLabeledCounterMetric
impl UnwindSafe for DualLabeledCounterMetric
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
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Arc<>
Read more