[][src]Trait metrics_core::MetricsExporter

pub trait MetricsExporter {
    fn export_counter<K: AsRef<str>>(&mut self, key: K, value: u64);
fn export_gauge<K: AsRef<str>>(&mut self, key: K, value: i64);
fn export_histogram<K: AsRef<str>>(&mut self, key: K, value: u64); }

A value that exports collected metrics.

Required methods

fn export_counter<K: AsRef<str>>(&mut self, key: K, value: u64)

Exports a counter.

From the perspective of an exportr, a counter and gauge are essentially identical, insofar as they are both a single value tied to a key. From the perspective of a collector, counters and gauges usually have slightly different modes of operation.

For the sake of flexibility on the exportr side, both are provided.

fn export_gauge<K: AsRef<str>>(&mut self, key: K, value: i64)

Exports a gauge.

From the perspective of a exportr, a counter and gauge are essentially identical, insofar as they are both a single value tied to a key. From the perspective of a collector, counters and gauges usually have slightly different modes of operation.

For the sake of flexibility on the exportr side, both are provided.

fn export_histogram<K: AsRef<str>>(&mut self, key: K, value: u64)

Exports a histogram.

Exporters are expected to tally their own histogram views, which means this method will be called for each observed value in the underlying histogram.

Loading content...

Implementors

Loading content...