Skip to main content

SyncInstrument

Trait SyncInstrument 

pub trait SyncInstrument<T>: Send + Sync {
    // Required method
    fn measure(&self, measurement: T, attributes: &[KeyValue]);
}
Available on crate features metrics and opentelemetry only.
Expand description

An SDK implemented instrument that records measurements synchronously.

Required Methods§

fn measure(&self, measurement: T, attributes: &[KeyValue])

Records a measurement synchronously.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§