Trait prometheus::core::Collector

source ·
pub trait Collector: Sync + Send {
    // Required methods
    fn desc(&self) -> Vec<&Desc>;
    fn collect(&self) -> Vec<MetricFamily>;
}
Expand description

An interface for collecting metrics.

Required Methods§

source

fn desc(&self) -> Vec<&Desc>

Return descriptors for metrics.

source

fn collect(&self) -> Vec<MetricFamily>

Collect metrics.

Implementors§