logo
pub trait AsyncGauge<T>: Send + Sync {
    fn observe(&self, cx: &Context, value: T, attributes: &[KeyValue]);
}
Available on crate feature metrics only.
Expand description

An SDK implemented instrument that records independent readings.

Required Methods

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