Expand description
Local Prometheus collectors for supervisor metrics.
Compiled only when the prometheus feature is enabled. The collectors
live in a process-local Registry (NOT the prometheus crate’s default
global registry, so host services that already own a registry don’t
collide with us). Hosts that want to expose these metrics call
registry() and either:
- Serve
registry().gather()directly from their/metricshandler, or - Use
prometheus::Registry::registeron each individual collector to merge them into the host’s own registry.
The atomic counters in SupervisorMetrics remain the authoritative
in-process source of truth; this module just mirrors them into
Prometheus-shaped collectors.
Structs§
- Collectors
- The supervisor’s local prometheus collectors.
Functions§
- collectors
- Return the lazily-initialized supervisor collectors.
- registry
- Return the local prometheus registry that owns the supervisor collectors.