Struct opentelemetry::sdk::metrics::aggregators::LastValueAggregator
source · [−]pub struct LastValueAggregator { /* private fields */ }
metrics
only.Expand description
Aggregates last value events.
Trait Implementations
sourceimpl Aggregation for LastValueAggregator
impl Aggregation for LastValueAggregator
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 LastValueAggregator
impl Aggregator for LastValueAggregator
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 LastValueAggregator
impl Debug for LastValueAggregator
sourceimpl LastValue for LastValueAggregator
impl LastValue for LastValueAggregator
sourcefn last_value(&self) -> Result<(Number, SystemTime), MetricsError>
fn last_value(&self) -> Result<(Number, SystemTime), MetricsError>
The last value of the currently aggregated metrics
Auto Trait Implementations
impl RefUnwindSafe for LastValueAggregator
impl Send for LastValueAggregator
impl Sync for LastValueAggregator
impl Unpin for LastValueAggregator
impl UnwindSafe for LastValueAggregator
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