Skip to main content

Module metrics

Module metrics 

Source
Expand description

Dependency-free metrics registry rendering Prometheus text exposition format. Counters and histograms only (what the SLA criteria need), all lock-free on the hot path (atomics; registration takes a short mutex).

Structs§

Counter
A monotonically increasing counter.
Histogram
Fixed-bucket latency histogram (microsecond samples).
Registry
A registry mapping metric names (+ optional fixed labels) to metrics.

Constants§

DEFAULT_LATENCY_BOUNDS_US
Default latency bucket upper bounds in microseconds: 50µs … 10s.
WIDE_LATENCY_BOUNDS_US
Wide latency bucket upper bounds in microseconds: 1ms … 300s.