zio / zio-metrics-connectors

Monitoring, Metrics and Diagnostics for ZIO
https://zio.dev/zio-metrics-connectors
Apache License 2.0
30 stars 24 forks source link

Fix sending histogram values twice for datadog #48

Closed petoalbert closed 1 year ago

petoalbert commented 1 year ago

The datadog connector uses real-time MetricListener to push histogram updates as Datadog's distribution metric to the datadog agent, but uses the statsd snapshot-based reported for everything else. (The DogStatsD protocol is a superset of StatsD). For this to work proerly, we have to filter out every histogram metric from the statsd reporter, otherwise it will also report these as gauges with the same name.

Before this fix, when running the sample app with datadog layer:

myHistogram:5.133927562076841:48.52615926085349|d
myHistogram:4|g|#le:20.0
myHistogram:7|g|#le:30.0

After the fix:

myHistogram:5.133927562076841:48.52615926085349|d