Trait opentelemetry::sdk::export::metrics::AggregatorSelector [−][src]
pub trait AggregatorSelector: Debug { fn aggregator_for(
&self,
descriptor: &Descriptor
) -> Option<Arc<dyn Aggregator + Send + Sync>>; }
This is supported on crate feature
metrics
only.Expand description
AggregatorSelector supports selecting the kind of Aggregator
to use at
runtime for a specific metric instrument.
Required methods
fn aggregator_for(
&self,
descriptor: &Descriptor
) -> Option<Arc<dyn Aggregator + Send + Sync>>
[src]
fn aggregator_for(
&self,
descriptor: &Descriptor
) -> Option<Arc<dyn Aggregator + Send + Sync>>
[src]This allocates a variable number of aggregators of a kind suitable for the requested export.
When the call returns None
, the metric instrument is explicitly disabled.
This must return a consistent type to avoid confusion in later stages of the metrics export process, e.g., when merging or checkpointing aggregators for a specific instrument.
This call should not block.
Implementors
fn aggregator_for(
&self,
descriptor: &Descriptor
) -> Option<Arc<dyn Aggregator + Send + Sync>>
[src]