[−][src]Macro metrics::increment
Increments a counter by one.
Counters represent a single monotonic value, which means the value can only be incremented, not decremented, and always starts out with an initial value of zero.
Example
// A basic increment: increment!("some_metric_name"); // Specifying labels: increment!("some_metric_name", "service" => "http"); // We can also pass labels by giving a vector or slice of key/value pairs: let dynamic_val = "woo"; let labels = [("dynamic_key", format!("{}!", dynamic_val))]; increment!("some_metric_name", &labels);