[−][src]Trait metrics::Recorder
A value that records metrics behind the facade.
Required methods
fn register_counter(
&self,
key: Key,
description: Option<&'static str>
) -> Identifier
&self,
key: Key,
description: Option<&'static str>
) -> Identifier
Registers a counter.
Callers may provide a description of the counter being registered. Whether or not a metric can be reregistered to provide a description, if one was already passed or not, as well as how descriptions are used by the underlying recorder, is an implementation detail.
fn register_gauge(
&self,
key: Key,
description: Option<&'static str>
) -> Identifier
&self,
key: Key,
description: Option<&'static str>
) -> Identifier
Registers a gauge.
Callers may provide a description of the counter being registered. Whether or not a metric can be reregistered to provide a description, if one was already passed or not, as well as how descriptions are used by the underlying recorder, is an implementation detail.
fn register_histogram(
&self,
key: Key,
description: Option<&'static str>
) -> Identifier
&self,
key: Key,
description: Option<&'static str>
) -> Identifier
Registers a histogram.
Callers may provide a description of the counter being registered. Whether or not a metric can be reregistered to provide a description, if one was already passed or not, as well as how descriptions are used by the underlying recorder, is an implementation detail.
fn increment_counter(&self, id: Identifier, value: u64)
Increments a counter.
fn update_gauge(&self, id: Identifier, value: f64)
Updates a gauge.
fn record_histogram(&self, id: Identifier, value: u64)
Records a histogram.
The value can be value that implements [IntoU64
]. By default, metrics
provides an
implementation for both u64
itself as well as Duration
.