[][src]Trait cadence::prelude::Counted

pub trait Counted {
    fn count_with_tags<'a>(
        &'a self,
        key: &'a str,
        count: i64
    ) -> MetricBuilder<Counter>; fn incr(&self, key: &str) -> MetricResult<Counter> { ... }
fn incr_with_tags<'a>(&'a self, key: &'a str) -> MetricBuilder<Counter> { ... }
fn decr(&self, key: &str) -> MetricResult<Counter> { ... }
fn decr_with_tags<'a>(&'a self, key: &'a str) -> MetricBuilder<Counter> { ... }
fn count(&self, key: &str, count: i64) -> MetricResult<Counter> { ... } }

Trait for incrementing and decrementing counters.

Counters are simple values incremented or decremented by a client. The rates at which these events occur or average values will be determined by the server receiving them. Examples of counter uses include number of logins to a system or requests received.

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 count_with_tags<'a>(
    &'a self,
    key: &'a str,
    count: i64
) -> MetricBuilder<Counter>

Increment or decrement the counter by the given amount and return a MetricBuilder that can be used to add tags to the metric.

Loading content...

Provided methods

fn incr(&self, key: &str) -> MetricResult<Counter>

Increment the counter by 1

fn incr_with_tags<'a>(&'a self, key: &'a str) -> MetricBuilder<Counter>

Increment the counter by 1 and return a MetricBuilder that can be used to add tags to the metric.

fn decr(&self, key: &str) -> MetricResult<Counter>

Decrement the counter by 1

fn decr_with_tags<'a>(&'a self, key: &'a str) -> MetricBuilder<Counter>

Decrement the counter by 1 and return a `MetricBuilder that can be used to add tags to the metric.

fn count(&self, key: &str, count: i64) -> MetricResult<Counter>

Increment or decrement the counter by the given amount

Loading content...

Implementors

impl Counted for StatsdClient[src]

Loading content...