pub struct Registry { /* private fields */ }
Expand description
Keeps track of all streaming collector instances
Implementations§
source§impl Registry
impl Registry
sourcepub fn get() -> &'static Self
pub fn get() -> &'static Self
Get the Registry singleton, and spawn the pruning task if it hasn’t already been launched.
sourcepub fn stream_text(prefix: Option<String>) -> BoxStream<'static, String>
pub fn stream_text(prefix: Option<String>) -> BoxStream<'static, String>
Produce a stream of String chunks that represent all known metrics in the Prometheus exposition format.
This will include the MetricFamily’s that have been registered with the prometheus crate and then supplement the output with our own set of registered streaming collectors.
The optional prefix parameter is used to “namespace” the returned metric names.
sourcepub fn stream_json() -> BoxStream<'static, String>
pub fn stream_json() -> BoxStream<'static, String>
Produce a stream of String chunks that represent all known metrics in the informal kumomta json format.
This will include the MetricFamily’s that have been registered with the prometheus crate and then supplement the output with our own set of registered streaming collectors.