spin_telemetry

Macro counter

Source
macro_rules! counter {
    ($metric:ident $(. $suffixes:ident)*  = $metric_value:expr $(, $attrs:ident=$values:expr)*) => { ... };
}
Expand description

Records an increment to the named counter with the given attributes.

The increment may only be an i64 or f64. You must not mix types for the same metric.

counter!(spin.metric_name = 1, metric_attribute = "value");