pub trait ComponentMetricsExt {
// Required method
fn from_component_context(context: &ComponentContext) -> Self;
}
Expand description
Helper trait for working with [MetricsBuilder
].
Required Methods§
Sourcefn from_component_context(context: &ComponentContext) -> Self
fn from_component_context(context: &ComponentContext) -> Self
Creates a new instance with default tags derived from the given component context.
Sets the following default tags:
component_id
(the component ID,ComponentContext::component_id
)component_type
(the component type,ComponentContext::component_type
)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.