pub trait AsyncGauge<T>: Send + Sync {
    // Required method
    fn observe(&self, cx: &Context, value: T, attributes: &[KeyValue]);
}
Expand description

An SDK implemented instrument that records independent readings.

Required Methods§

source

fn observe(&self, cx: &Context, value: T, attributes: &[KeyValue])

Records the state of the instrument.

It is only valid to call this within a callback. If called outside of the registered callback it should have no effect on the instrument, and an error will be reported via the error handler.

Implementors§