[−][src]Trait cadence::prelude::Histogrammed
Trait for recording histogram values.
Histogram values are positive values that can represent anything, whose statistical distribution is calculated by the server. The values can be timings, amount of some resource consumed, size of HTTP responses in some application, etc. Histograms can be thought of as a more general form of timers.
See the Statsd spec for more information.
Note that tags and histograms are a Datadog extension to Statsd and may not be supported by your server.
Required methods
fn histogram_with_tags<'a>(
&'a self,
key: &'a str,
value: u64
) -> MetricBuilder<'_, '_, Histogram>
&'a self,
key: &'a str,
value: u64
) -> MetricBuilder<'_, '_, Histogram>
Record a single histogram value with the given key and return a
MetricBuilder
that can be used to add tags to the metric.
fn histogram_duration_with_tags<'a>(
&'a self,
key: &'a str,
duration: Duration
) -> MetricBuilder<'_, '_, Histogram>
&'a self,
key: &'a str,
duration: Duration
) -> MetricBuilder<'_, '_, Histogram>
Record a single histogram value with the given key and return a
MetricBuilder
that can be used to add tags to the metric.
The duration will be converted to nanoseconds. If the duration cannot
be represented as a u64
an error will be deferred and returned when
MetricBuilder::try_send()
is called. Note that histograms are an
extension to Statsd, you'll need to check if they are supported by
your server and considered times.
Provided methods
fn histogram(&self, key: &str, value: u64) -> MetricResult<Histogram>
Record a single histogram value with the given key
fn histogram_duration(
&self,
key: &str,
duration: Duration
) -> MetricResult<Histogram>
&self,
key: &str,
duration: Duration
) -> MetricResult<Histogram>
Record a single histogram value with the given key.
The duration will be converted to nanoseconds. If the duration
cannot be represented as a u64
an error will be returned. Note
that histograms are an extension to Statsd, you'll need to check
if they are supported by your server and considered times.
Implementors
impl Histogrammed for StatsdClient
[src]
fn histogram_with_tags<'a>(
&'a self,
key: &'a str,
value: u64
) -> MetricBuilder<'_, '_, Histogram>
[src]
&'a self,
key: &'a str,
value: u64
) -> MetricBuilder<'_, '_, Histogram>
fn histogram_duration_with_tags<'a>(
&'a self,
key: &'a str,
duration: Duration
) -> MetricBuilder<'_, '_, Histogram>
[src]
&'a self,
key: &'a str,
duration: Duration
) -> MetricBuilder<'_, '_, Histogram>