Struct opentelemetry::sdk::metrics::Accumulator
source · [−]pub struct Accumulator(_);
metrics
only.Expand description
Accumulator implements the OpenTelemetry Meter API. The Accumulator is bound
to a single Processor
.
The Accumulator supports a collect API to gather and export current data.
Collect
should be arranged according to the processor model. Push-based
processors will setup a timer to call collect
periodically. Pull-based
processors will call collect
when a pull request arrives.
Implementations
sourceimpl Accumulator
impl Accumulator
sourcepub fn collect(
&self,
cx: &Context,
locked_processor: &mut dyn LockedProcessor
) -> usize
pub fn collect(
&self,
cx: &Context,
locked_processor: &mut dyn LockedProcessor
) -> usize
Traverses the list of active records and observers and exports data for each active instrument.
During the collection pass, the LockedProcessor
will receive
one export
call per current aggregation.
Returns the number of records that were checkpointed.
Trait Implementations
sourceimpl Clone for Accumulator
impl Clone for Accumulator
sourcefn clone(&self) -> Accumulator
fn clone(&self) -> Accumulator
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for Accumulator
impl Debug for Accumulator
sourceimpl MeterCore for Accumulator
impl MeterCore for Accumulator
sourcefn new_sync_instrument(
&self,
descriptor: Descriptor
) -> Result<Arc<dyn SyncInstrumentCore + Send + Sync + 'static>, MetricsError>
fn new_sync_instrument(
&self,
descriptor: Descriptor
) -> Result<Arc<dyn SyncInstrumentCore + Send + Sync + 'static>, MetricsError>
Create a new synchronous instrument implementation.
sourcefn new_async_instrument(
&self,
descriptor: Descriptor
) -> Result<Arc<dyn AsyncInstrumentCore + Send + Sync + 'static>, MetricsError>
fn new_async_instrument(
&self,
descriptor: Descriptor
) -> Result<Arc<dyn AsyncInstrumentCore + Send + Sync + 'static>, MetricsError>
Create a new asynchronous instrument implementation. Read more
Auto Trait Implementations
impl !RefUnwindSafe for Accumulator
impl Send for Accumulator
impl Sync for Accumulator
impl Unpin for Accumulator
impl !UnwindSafe for Accumulator
Blanket Implementations
sourceimpl<T> AnyMeterCore for Twhere
T: 'static + MeterCore,
impl<T> AnyMeterCore for Twhere
T: 'static + MeterCore,
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