beam-telemetry / telemetry_metrics_statsd

Telemetry.Metrics reporter for StatsD-compatible metric servers
https://hexdocs.pm/telemetry_metrics_statsd
MIT License
75 stars 44 forks source link

Always report sum as a counter with DataDog formatter #47

Closed arkgil closed 3 years ago

arkgil commented 4 years ago

Previously, sum updates were reported as gauge increments/decrements. However, this sort of metric updates do not allow to view the sum of measurements in the DataDog dashboard, because with gauges, only the last measurement in the flush interval is shown.

With counter, it is possible to view the total sum of measurement values in a flush interval. To make sure that the actual sum and not a rate is displayed in the DataDog dashboard, the as_count() modifier should be used.

While this is a breaking change, the previous behaviour was simply wrong.