Trait opentelemetry::metrics::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§
sourcefn observe_f64(
&self,
inst: &dyn AsyncInstrument<f64>,
measurement: f64,
attrs: &[KeyValue],
)
fn observe_f64( &self, inst: &dyn AsyncInstrument<f64>, measurement: f64, attrs: &[KeyValue], )
Records the f64 value with attributes for the observable.
sourcefn observe_u64(
&self,
inst: &dyn AsyncInstrument<u64>,
measurement: u64,
attrs: &[KeyValue],
)
fn observe_u64( &self, inst: &dyn AsyncInstrument<u64>, measurement: u64, attrs: &[KeyValue], )
Records the u64 value with attributes for the observable.
sourcefn observe_i64(
&self,
inst: &dyn AsyncInstrument<i64>,
measurement: i64,
attrs: &[KeyValue],
)
fn observe_i64( &self, inst: &dyn AsyncInstrument<i64>, measurement: i64, attrs: &[KeyValue], )
Records the i64 value with attributes for the observable.