macro_rules! record_gauge {
($collector:expr, $name:expr, $value:expr) => { ... };
}Expand description
Records a gauge metric with the current timestamp
A gauge represents a value that can go up or down over time, such as current memory usage, active connections, or queue depth.
§Arguments
$collector- TheMetricCollectorinstance to record to$name- The metric name as a string or string slice$value- The gauge value as an f64
§Example
ⓘ
record_gauge!(collector, "active_orders", 42.0);
record_gauge!(collector, "memory_usage_mb", 1024.5);