Expand description
Lightweight in-process metrics collection.
This crate intentionally avoids external dependencies or exporters. It stores counters, gauges, and histograms in memory and can render a simple text representation for debugging or log capture.
Structs§
Functions§
- add_
counter - Add a value to a counter (saturating on overflow).
- inc_
counter - Increment a counter by 1.
- observe_
histogram - Observe a histogram value (stored as count/sum/min/max).
- render_
text - Render metrics in a simple text format.
- set_
enabled - Enable or disable metrics collection globally.
- set_
gauge - Set a gauge to an explicit value.
- snapshot
- Snapshot the current metrics into an owned struct.