pub enum DogStatsDActionOwned {
Count(String, i64, Vec<Tag>),
Distribution(String, f64, Vec<Tag>),
Gauge(String, f64, Vec<Tag>),
Histogram(String, f64, Vec<Tag>),
Set(String, i64, Vec<Tag>),
}Expand description
The DogStatsDActionOwned enum gathers the metric types that can be sent to the DogStatsD
server. This type takes ownership of the relevant data to support the sidecar better.
For documentation on the dogstatsd metric types: https://docs.datadoghq.com/metrics/types/?tab=count#metric-types
Originally I attempted to combine this type with DogStatsDAction but this GREATLY complicates
the types to the point of insanity. I was unable to come up with a satisfactory approach that
allows both the data-pipeline and sidecar crates to use the same type. If a future rustacean
wants to take a stab and open a PR please do so!
Variants§
Count(String, i64, Vec<Tag>)
Distribution(String, f64, Vec<Tag>)
Gauge(String, f64, Vec<Tag>)
Histogram(String, f64, Vec<Tag>)
Set(String, i64, Vec<Tag>)
Cadence only support i64 type as value but Golang implementation uses string (https://github.com/DataDog/datadog-go/blob/331d24832f7eac97b091efd696278fe2c4192b29/statsd/statsd.go#L230) and PHP implementation uses float or string (https://github.com/DataDog/php-datadogstatsd/blob/0efdd1c38f6d3dd407efbb899ad1fd2e5cd18085/src/DogStatsd.php#L251)