pub trait Histogrammed<T>
where T: ToHistogramValue,
{ // Required method fn histogram_with_tags<'a>( &'a self, key: &'a str, value: T ) -> MetricBuilder<'a, 'a, Histogram>; // Provided method fn histogram(&self, key: &str, value: T) -> Result<Histogram, MetricError> { ... } }
Expand description

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. Duration values are converted to nanoseconds before being emitted.

The following types are valid for histograms:

  • u64
  • f64
  • Duration

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: T ) -> MetricBuilder<'a, 'a, Histogram>

Record a single histogram value with the given key and return a MetricBuilder that can be used to add tags to the metric.

Provided Methods§

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

Record a single histogram value with the given key

Implementors§

§

impl<T> Histogrammed<T> for StatsdClient
where T: ToHistogramValue,