Skip to main content

Module metrics

Module metrics 

Source
Expand description

Metrics primitives shared by the whole crate.

MetricsRegistry is a passive, lock-free counter/histogram container and MetricsEventSink fills it from crate::observe::FrameworkEvents. Both live at the bottom of the dependency graph so low layers (mounts, HTTP) can update or expose counters without depending on the exporter built on top of them (crate::metrics).

Structs§

CachePadded
Cache-line padded wrapper for hot atomics.
Histogram
Fixed-boundary histogram for latency metrics.
MetricsEventSink
EventSink implementation that records events into a MetricsRegistry.
MetricsRegistry
Metrics registry containing all server-level counters and histograms.

Functions§

registry_from_sink
Extract the metrics registry from an event sink, if the sink is a MetricsEventSink. Used to wire per-mount frame counters into the global registry.