Skip to main content

DogStatsdClient

Trait DogStatsdClient 

Source
pub trait DogStatsdClient:
    Send
    + Sync
    + 'static {
    // Required methods
    fn increment(&self, name: &str, value: f64, tags: &[(String, String)]);
    fn histogram(&self, name: &str, value: f64, tags: &[(String, String)]);
    fn distribution(&self, name: &str, value: f64, tags: &[(String, String)]);
}
Expand description

The subset of the DogStatsD client API the exporter uses.

tags are (name, value) pairs in wire order. Implementations format them as name:value for their transport.

Required Methods§

Source

fn increment(&self, name: &str, value: f64, tags: &[(String, String)])

Add value to the counter name.

Source

fn histogram(&self, name: &str, value: f64, tags: &[(String, String)])

Record value in the histogram name.

Source

fn distribution(&self, name: &str, value: f64, tags: &[(String, String)])

Record value in the distribution name.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§