[][src]Trait cadence::Metered

pub trait Metered {
    fn meter_with_tags<'a>(
        &'a self,
        key: &'a str,
        value: u64
    ) -> MetricBuilder<Meter>; fn mark(&self, key: &str) -> MetricResult<Meter> { ... }
fn mark_with_tags<'a>(&'a self, key: &'a str) -> MetricBuilder<Meter> { ... }
fn meter(&self, key: &str, value: u64) -> MetricResult<Meter> { ... } }

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.

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: u64
) -> MetricBuilder<Meter>

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

Loading content...

Provided methods

fn mark(&self, key: &str) -> MetricResult<Meter>

Record a single metered event with the given key

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

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

fn meter(&self, key: &str, value: u64) -> MetricResult<Meter>

Record a meter value with the given key

Loading content...

Implementors

impl Metered for StatsdClient[src]

Loading content...