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

An SDK implemented async instrument that records increasing or decreasing values.

Required Methods

Records the increment or decrement to the counter.

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