Skip to main content

init_prometheus

Function init_prometheus 

Source
pub fn init_prometheus() -> &'static PrometheusHandle
Expand description

Initialize the Prometheus metrics recorder.

This is idempotent - calling it multiple times returns the same handle. Must be called early in server startup to avoid losing metrics.

Note: This does NOT spawn the upkeep task. Call start_upkeep_task() separately after the tokio runtime is running to enable metric cleanup.