pub struct Accumulator(/* private fields */);
Available on crate feature
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.
Trait Implementations§
Source§impl Clone for Accumulator
impl Clone for Accumulator
Source§fn clone(&self) -> Accumulator
fn clone(&self) -> Accumulator
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Accumulator
impl Debug for Accumulator
Source§impl MeterCore for Accumulator
impl MeterCore for Accumulator
Source§fn new_sync_instrument(
&self,
descriptor: Descriptor,
) -> Result<Arc<dyn SyncInstrumentCore>>
fn new_sync_instrument( &self, descriptor: Descriptor, ) -> Result<Arc<dyn SyncInstrumentCore>>
Create a new synchronous instrument implementation.
Source§fn record_batch_with_context(
&self,
_cx: &Context,
attributes: &[KeyValue],
measurements: Vec<Measurement>,
)
fn record_batch_with_context( &self, _cx: &Context, attributes: &[KeyValue], measurements: Vec<Measurement>, )
Atomically record a batch of measurements.
Source§fn new_async_instrument(
&self,
descriptor: Descriptor,
runner: Option<AsyncRunner>,
) -> Result<Arc<dyn AsyncInstrumentCore>>
fn new_async_instrument( &self, descriptor: Descriptor, runner: Option<AsyncRunner>, ) -> Result<Arc<dyn AsyncInstrumentCore>>
Create a new asynchronous instrument implementation. Read more
Source§fn new_batch_observer(&self, runner: AsyncRunner) -> Result<()>
fn new_batch_observer(&self, runner: AsyncRunner) -> Result<()>
Register a batch observer
Auto Trait Implementations§
impl Freeze for Accumulator
impl !RefUnwindSafe for Accumulator
impl Send for Accumulator
impl Sync for Accumulator
impl Unpin for Accumulator
impl !UnwindSafe for Accumulator
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.