pub trait AsyncCounter<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 values.

Required Methods

Records an increment 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.