Skip to main content

registry

Function registry 

Source
pub fn registry() -> &'static Registry
Expand description

Return the local prometheus registry that owns the supervisor collectors.

Host services typically gather() this from their /metrics handler:

use prometheus::Encoder;
let registry = rustrade_supervisor::prometheus::registry();
let mut buf = Vec::new();
prometheus::TextEncoder::new()
    .encode(&registry.gather(), &mut buf)
    .unwrap();