[−][src]Trait metrics_core::Recorder
A value that records metrics.
Required methods
fn record_counter<K: AsRef<str>>(&mut self, key: K, value: u64)
Records a counter.
From the perspective of an recorder, 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 exporter side, both are provided.
fn record_gauge<K: AsRef<str>>(&mut self, key: K, value: i64)
Records a gauge.
From the perspective of a recorder, 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 exporter side, both are provided.
fn record_histogram<K: AsRef<str>>(&mut self, key: K, values: &[u64])
Records a histogram.
Recorders are expected to tally their own histogram views, so this will be called with all of the underlying observed values, and callers will need to process them accordingly.