Trait SyncInstrumentCore

Source
pub trait SyncInstrumentCore: InstrumentCore {
    // Required methods
    fn bind(&self, attributes: &[KeyValue]) -> Arc<dyn SyncBoundInstrumentCore>;
    fn record_one(&self, number: Number, attributes: &[KeyValue]);
    fn as_any(&self) -> &dyn Any;
}
Available on crate feature metrics only.
Expand description

The implementation-level interface to a generic synchronous instrument (e.g., ValueRecorder and Counter instruments).

Required Methods§

Source

fn bind(&self, attributes: &[KeyValue]) -> Arc<dyn SyncBoundInstrumentCore>

Creates an implementation-level bound instrument, binding an attribute set with this instrument implementation.

Source

fn record_one(&self, number: Number, attributes: &[KeyValue])

Capture a single synchronous metric event.

Source

fn as_any(&self) -> &dyn Any

Returns self as any

Implementors§