pub struct HistogramAggregator { /* private fields */ }
Available on crate feature
metrics
only.Expand description
This aggregator observes events and counts them in pre-determined buckets. It also calculates the sum and count of all events.
Trait Implementations§
Source§impl Aggregator for HistogramAggregator
impl Aggregator for HistogramAggregator
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),
desc: &Descriptor,
) -> Result<()>
fn merge( &self, other: &(dyn Aggregator + Send + Sync), desc: &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 Count for HistogramAggregator
impl Count for HistogramAggregator
Source§impl Debug for HistogramAggregator
impl Debug for HistogramAggregator
Source§impl Histogram for HistogramAggregator
impl Histogram for HistogramAggregator
Auto Trait Implementations§
impl !Freeze for HistogramAggregator
impl RefUnwindSafe for HistogramAggregator
impl Send for HistogramAggregator
impl Sync for HistogramAggregator
impl Unpin for HistogramAggregator
impl UnwindSafe for HistogramAggregator
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.