Struct opentelemetry::sdk::metrics::aggregators::SumAggregator
source · pub struct SumAggregator { /* private fields */ }
Available on crate feature
metrics
only.Expand description
An aggregator for counter events.
Trait Implementations§
source§impl Aggregation for SumAggregator
impl Aggregation for SumAggregator
source§fn kind(&self) -> &AggregationKind
fn kind(&self) -> &AggregationKind
A short identifying string to identify the
Aggregator
that was used to
produce the aggregation (e.g., AggregationKind::SUM
).source§impl Aggregator for SumAggregator
impl Aggregator for SumAggregator
source§fn aggregation(&self) -> &dyn Aggregation
fn aggregation(&self) -> &dyn Aggregation
The interface to access the current state of this Aggregator.
source§fn update(
&self,
_cx: &Context,
number: &Number,
descriptor: &Descriptor
) -> Result<(), MetricsError>
fn update( &self, _cx: &Context, number: &Number, descriptor: &Descriptor ) -> Result<(), MetricsError>
Update receives a new measured value and incorporates it into the
aggregation. Update calls may be called concurrently. Read more
source§fn synchronized_move(
&self,
other: &Arc<dyn Aggregator + Sync + Send + 'static>,
descriptor: &Descriptor
) -> Result<(), MetricsError>
fn synchronized_move( &self, other: &Arc<dyn Aggregator + Sync + Send + 'static>, descriptor: &Descriptor ) -> Result<(), MetricsError>
This method is called during collection to finish one period of aggregation
by atomically saving the currently-updating state into the argument
Aggregator. Read more
source§fn merge(
&self,
other: &(dyn Aggregator + Sync + Send),
descriptor: &Descriptor
) -> Result<(), MetricsError>
fn merge( &self, other: &(dyn Aggregator + Sync + Send), descriptor: &Descriptor ) -> Result<(), MetricsError>
This combines the checkpointed state from the argument
Aggregator
into this
Aggregator
. merge
is not synchronized with respect to update
or
synchronized_move
. Read moresource§impl Debug for SumAggregator
impl Debug for SumAggregator
source§impl Default for SumAggregator
impl Default for SumAggregator
source§fn default() -> SumAggregator
fn default() -> SumAggregator
Returns the “default value” for a type. Read more