Struct opentelemetry::sdk::metrics::aggregators::SumAggregator
source · [−]pub struct SumAggregator { /* private fields */ }
metrics
only.Expand description
An aggregator for counter events.
Trait Implementations
sourceimpl Aggregation for SumAggregator
impl Aggregation for SumAggregator
sourcefn 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
). Read more
sourceimpl Aggregator for SumAggregator
impl Aggregator for SumAggregator
sourcefn aggregation(&self) -> &dyn Aggregation
fn aggregation(&self) -> &dyn Aggregation
The interface to access the current state of this Aggregator.
sourcefn 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
sourcefn 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
sourcefn 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 more
sourceimpl Debug for SumAggregator
impl Debug for SumAggregator
sourceimpl Default for SumAggregator
impl Default for SumAggregator
sourcefn default() -> SumAggregator
fn default() -> SumAggregator
Returns the “default value” for a type. Read more
sourceimpl Sum for SumAggregator
impl Sum for SumAggregator
sourcefn sum(&self) -> Result<Number, MetricsError>
fn sum(&self) -> Result<Number, MetricsError>
The sum of the currently aggregated metrics
Auto Trait Implementations
impl RefUnwindSafe for SumAggregator
impl Send for SumAggregator
impl Sync for SumAggregator
impl Unpin for SumAggregator
impl UnwindSafe for SumAggregator
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more