[−][src]Macro metrics::gauge
Updates 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: gauge!("some_metric_name", 42.2222); // Specifying labels: 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))]; gauge!("some_metric_name", 42.42, &labels);