metrics

Function metrics 

Source
pub fn metrics() -> &'static MetricsCore
Expand description

Get the global metrics instance

Panics if not initialized - call init() first.

Panic conditions:

  • If init() has not been called yet, this function will panic with a clear message. Prefer passing &MetricsCore explicitly in library code to avoid relying on globals.