opentelemetry::metrics

Trait Observer

source
pub trait Observer {
    // Required methods
    fn observe_f64(
        &self,
        inst: &dyn AsyncInstrument<f64>,
        measurement: f64,
        attrs: &[KeyValue],
    );
    fn observe_u64(
        &self,
        inst: &dyn AsyncInstrument<u64>,
        measurement: u64,
        attrs: &[KeyValue],
    );
    fn observe_i64(
        &self,
        inst: &dyn AsyncInstrument<i64>,
        measurement: i64,
        attrs: &[KeyValue],
    );
}
Expand description

Records measurements for multiple instruments in a callback.

Required Methods§

source

fn observe_f64( &self, inst: &dyn AsyncInstrument<f64>, measurement: f64, attrs: &[KeyValue], )

Records the f64 value with attributes for the observable.

source

fn observe_u64( &self, inst: &dyn AsyncInstrument<u64>, measurement: u64, attrs: &[KeyValue], )

Records the u64 value with attributes for the observable.

source

fn observe_i64( &self, inst: &dyn AsyncInstrument<i64>, measurement: i64, attrs: &[KeyValue], )

Records the i64 value with attributes for the observable.

Implementors§