Skip to main content

Crate rift_metrics

Crate rift_metrics 

Source
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§

Histogram
MetricsStore

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.