pub struct LastValueAggregator { /* private fields */ }
Available on crate feature
metrics
only.Expand description
Aggregates last value events.
Trait Implementations§
Source§impl Aggregator for LastValueAggregator
impl Aggregator for LastValueAggregator
Source§fn update(&self, number: &Number, _descriptor: &Descriptor) -> Result<()>
fn update(&self, number: &Number, _descriptor: &Descriptor) -> Result<()>
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 + Send + Sync>,
_descriptor: &Descriptor,
) -> Result<()>
fn synchronized_move( &self, other: &Arc<dyn Aggregator + Send + Sync>, _descriptor: &Descriptor, ) -> Result<()>
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 + Send + Sync),
_descriptor: &Descriptor,
) -> Result<()>
fn merge( &self, other: &(dyn Aggregator + Send + Sync), _descriptor: &Descriptor, ) -> Result<()>
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 LastValueAggregator
impl Debug for LastValueAggregator
Source§impl LastValue for LastValueAggregator
impl LastValue for LastValueAggregator
Source§fn last_value(&self) -> Result<(Number, SystemTime)>
fn last_value(&self) -> Result<(Number, SystemTime)>
The last value of the currently aggregated metrics
Auto Trait Implementations§
impl !Freeze for LastValueAggregator
impl RefUnwindSafe for LastValueAggregator
impl Send for LastValueAggregator
impl Sync for LastValueAggregator
impl Unpin for LastValueAggregator
impl UnwindSafe for LastValueAggregator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Available on crate feature
trace
only.Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Available on crate feature
trace
only.