Expand description
Prometheus metrics: install the global recorder once per process and serve GET /metrics
for scraping. Real signals only โ latency, escalations, what got served, what dropped.
Functionsยง
- handler
GET /metricsโ render the current Prometheus scrape payload.- install
- Install the global Prometheus recorder, once per process, and return a handle that renders
the scrape payload. Safe to call more than once:
OnceLock::get_or_initruns the install exactly once even under concurrent callers, so repeat calls (e.g. from every test that builds ancrate::proxy::app) just reuse the cached handle instead of re-installing.