pub trait Gauged<T>
where T: ToGaugeValue,
{ // Required method fn gauge_with_tags<'a>( &'a self, key: &'a str, value: T ) -> MetricBuilder<'a, 'a, Gauge>; // Provided method fn gauge(&self, key: &str, value: T) -> Result<Gauge, MetricError> { ... } }
Expand description

Trait for recording gauge values.

Gauge values are an instantaneous measurement of a value determined by the client. They do not change unless changed by the client. Examples include things like load average or how many connections are active.

The following types are valid for gauges:

  • u64
  • f64

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 gauge_with_tags<'a>( &'a self, key: &'a str, value: T ) -> MetricBuilder<'a, 'a, Gauge>

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

Provided Methods§

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

Record a gauge value with the given key

Implementors§

§

impl<T> Gauged<T> for StatsdClient
where T: ToGaugeValue,