[][src]Macro metrics::decrement_gauge

decrement_gauge!() { /* proc-macro */ }

Decrements a gauge.

Gauges represent a single value that can go up or down over time, and always starts out with an initial value of zero.

Example

// A basic gauge:
decrement_gauge!("some_metric_name", 42.2222);

// Specifying labels:
decrement_gauge!("some_metric_name", 66.6666, "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))];
decrement_gauge!("some_metric_name", 42.42, &labels);