ConvertMetrics

Trait ConvertMetrics 

Source
pub trait ConvertMetrics<MF, C, B> {
    // Required methods
    fn metrics_from(&self, collectors: C) -> Result<MF>;
    fn create_push_details(
        &self,
        job: &str,
        url: &Url,
        grouping: &HashMap<&str, &str>,
        metrics: MF,
    ) -> Result<(Url, B, String)>;
}
Expand description

ConvertMetrics defines the interface for the implementation of your own prometheus logic to incorporate it into non_blocking::MetricsPusher or [blocking::MetricsPusher].

Required Methods§

Source

fn metrics_from(&self, collectors: C) -> Result<MF>

metric_families_from converts the given collectors to metric families.

Source

fn create_push_details( &self, job: &str, url: &Url, grouping: &HashMap<&str, &str>, metrics: MF, ) -> Result<(Url, B, String)>

create_push_details creates the input arguments for the [Push] clients methods.

Implementors§