method metric.gauge
A gauge (a value that goes up and down). The same name and labels give the same series.
Example:
use std.obs { metric }
fn main() io {
let g = metric.gauge("queue_length", "jobs waiting")
g.set(5.0)
g.dec()
print("{g.value()}")
}Output
4.0
pub(api) static fn gauge(name: str, help: str = "", labels: Map<str, str> = {:}) -> Gauge ioSince. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
name | str |
help | str = "" |
labels | Map<str, str> = {:} |
Returns
Effects
io
Defined in: std/obs/obs.oxl:821