pub trait Metered<T>
where T: ToMeterValue,
{ // Required method fn meter_with_tags<'a>( &'a self, key: &'a str, value: T ) -> MetricBuilder<'a, 'a, Meter>; // Provided method fn meter(&self, key: &str, value: T) -> Result<Meter, MetricError> { ... } }
Expand description

Trait for recording meter values.

Meter values measure the rate at which events occur. These rates are determined by the server, the client simply indicates when they happen. Meters can be thought of as increment-only counters. Examples include things like number of requests handled or number of times something is flushed to disk.

The following types are valid for meters:

  • u64

See the Statsd spec for more information.

Note that tags are a Datadog extension to Statsd and may not be supported by your server.

Required Methods§

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

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

Provided Methods§

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

Record a meter value with the given key

Implementors§

§

impl<T> Metered<T> for StatsdClient
where T: ToMeterValue,