pub trait Distributed<T>where
T: ToDistributionValue,{
// Required method
fn distribution_with_tags<'a>(
&'a self,
key: &'a str,
value: T,
) -> MetricBuilder<'_, '_, Distribution>;
// Provided method
fn distribution(&self, key: &str, value: T) -> MetricResult<Distribution> { ... }
}
Expand description
Trait for recording distribution values.
Similar to histograms, but applies globally. A distribution can be used to instrument logical objects, like services, independently from the underlying hosts.
The following types are valid for distributions:
u64
f64
See the Datadog docs for more information.
Note that tags and distributions are a Datadog extension to Statsd and may not be supported by your server.
Required Methods§
Record a single distribution value with the given key and return a
MetricBuilder
that can be used to add tags to the metric.
Provided Methods§
Sourcefn distribution(&self, key: &str, value: T) -> MetricResult<Distribution>
fn distribution(&self, key: &str, value: T) -> MetricResult<Distribution>
Record a single distribution value with the given key