pub trait Distributed<T>
where T: ToDistributionValue,
{ // Required method fn distribution_with_tags<'a>( &'a self, key: &'a str, value: T ) -> MetricBuilder<'a, 'a, Distribution>; // Provided method fn distribution( &self, key: &str, value: T ) -> Result<Distribution, MetricError> { ... } }
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§

fn distribution_with_tags<'a>( &'a self, key: &'a str, value: T ) -> MetricBuilder<'a, 'a, Distribution>

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§

fn distribution(&self, key: &str, value: T) -> Result<Distribution, MetricError>

Record a single distribution value with the given key

Implementors§

§

impl<T> Distributed<T> for StatsdClient
where T: ToDistributionValue,