Trait opentelemetry::metrics::sdk_api::MeterCore [−][src]
pub trait MeterCore: Debug { fn record_batch_with_context(
&self,
cx: &Context,
labels: &[KeyValue],
measurements: Vec<Measurement>
); fn new_sync_instrument(
&self,
descriptor: Descriptor
) -> Result<Arc<dyn SyncInstrumentCore>>; fn new_async_instrument(
&self,
descriptor: Descriptor,
runner: Option<AsyncRunner>
) -> Result<Arc<dyn AsyncInstrumentCore>>; fn new_batch_observer(&self, runner: AsyncRunner) -> Result<()>; }
This is supported on crate feature
metrics
only.The interface an SDK must implement to supply a Meter implementation.
Required methods
fn record_batch_with_context(
&self,
cx: &Context,
labels: &[KeyValue],
measurements: Vec<Measurement>
)
[src]
&self,
cx: &Context,
labels: &[KeyValue],
measurements: Vec<Measurement>
)
Atomically record a batch of measurements.
fn new_sync_instrument(
&self,
descriptor: Descriptor
) -> Result<Arc<dyn SyncInstrumentCore>>
[src]
&self,
descriptor: Descriptor
) -> Result<Arc<dyn SyncInstrumentCore>>
Create a new synchronous instrument implementation.
fn new_async_instrument(
&self,
descriptor: Descriptor,
runner: Option<AsyncRunner>
) -> Result<Arc<dyn AsyncInstrumentCore>>
[src]
&self,
descriptor: Descriptor,
runner: Option<AsyncRunner>
) -> Result<Arc<dyn AsyncInstrumentCore>>
Create a new asynchronous instrument implementation.
Runner is None
if used in batch as the batch runner is registered separately.
fn new_batch_observer(&self, runner: AsyncRunner) -> Result<()>
[src]
Register a batch observer
Implementors
impl MeterCore for Accumulator
[src]
impl MeterCore for Accumulator
[src]fn new_sync_instrument(
&self,
descriptor: Descriptor
) -> Result<Arc<dyn SyncInstrumentCore>>
[src]
&self,
descriptor: Descriptor
) -> Result<Arc<dyn SyncInstrumentCore>>
fn record_batch_with_context(
&self,
_cx: &Context,
labels: &[KeyValue],
measurements: Vec<Measurement>
)
[src]
&self,
_cx: &Context,
labels: &[KeyValue],
measurements: Vec<Measurement>
)
fn new_async_instrument(
&self,
descriptor: Descriptor,
runner: Option<AsyncRunner>
) -> Result<Arc<dyn AsyncInstrumentCore>>
[src]
&self,
descriptor: Descriptor,
runner: Option<AsyncRunner>
) -> Result<Arc<dyn AsyncInstrumentCore>>
fn new_batch_observer(&self, runner: AsyncRunner) -> Result<()>
[src]
impl MeterCore for NoopMeterCore
[src]
impl MeterCore for NoopMeterCore
[src]fn new_sync_instrument(
&self,
_descriptor: Descriptor
) -> Result<Arc<dyn SyncInstrumentCore>>
[src]
&self,
_descriptor: Descriptor
) -> Result<Arc<dyn SyncInstrumentCore>>
fn new_async_instrument(
&self,
_descriptor: Descriptor,
_runner: Option<AsyncRunner>
) -> Result<Arc<dyn AsyncInstrumentCore>>
[src]
&self,
_descriptor: Descriptor,
_runner: Option<AsyncRunner>
) -> Result<Arc<dyn AsyncInstrumentCore>>
fn record_batch_with_context(
&self,
_cx: &Context,
_labels: &[KeyValue],
_measurements: Vec<Measurement>
)
[src]
&self,
_cx: &Context,
_labels: &[KeyValue],
_measurements: Vec<Measurement>
)