Skip to main content

install_global

Function install_global 

Source
pub fn install_global() -> Result<PrometheusHandle, BuildError>
Expand description

Installs the Prometheus recorder globally and registers HELP text for every metric.

Call once at server startup before accepting requests. Returns the PrometheusHandle needed to scrape the /metrics endpoint.

ยงErrors

Returns BuildError when bucket configuration or recorder installation fails (e.g., a global recorder is already installed).