Skip to main content

up_and_down_counter

Macro up_and_down_counter 

Source
macro_rules! up_and_down_counter {
    ($($tt:tt)*) => { ... };
}
Expand description

Records a delta to the named counter (as an i64) with the given attributes.

Unlike counter, the delta may be negative. This maps to OTel’s UpDownCounter.

spin_telemetry::metrics::up_and_down_counter!(spin.metric_name = -1, metric_attribute = "value");