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§
Sourcefn bind(&self, attributes: &[KeyValue]) -> Arc<dyn SyncBoundInstrumentCore>
fn bind(&self, attributes: &[KeyValue]) -> Arc<dyn SyncBoundInstrumentCore>
Creates an implementation-level bound instrument, binding an attribute set with this instrument implementation.
Sourcefn record_one(&self, number: Number, attributes: &[KeyValue])
fn record_one(&self, number: Number, attributes: &[KeyValue])
Capture a single synchronous metric event.