Trait prometheus::Collector
[−]
[src]
pub trait Collector: Sync + Send { fn desc(&self) -> &Desc; fn collect(&self) -> MetricFamily; }
Collector
is the trait that can be used to collect metrics.
A Collector has to be registered for collection.
Required Methods
fn desc(&self) -> &Desc
desc
returns the descriptor for the metric collector.
fn collect(&self) -> MetricFamily
collect
collects the metric.