statsd_exporter icon indicating copy to clipboard operation
statsd_exporter copied to clipboard

Add DogStatsD extended aggregation support

Open GrgDev opened this issue 1 year ago • 1 comments

This PR aims to add the ability for statsd exporter to receive DogStatsD extended aggregation metrics. It is a feature I requested in Issue #557 and I wanted to try to implement it myself following the in-issue commented advice from @glightfoot.

Summary of Implementation

When DogStatsD has extended aggregation enabled, instead of sending:

my_distribution_metric:21|d|#all,my,tags
my_distribution_metric:43.2|d|#all,my,tags
my_distribution_metric:1657|d|#all,my,tags

it sends

my_distribution_metric:21:43.2:1657|d|#all,my,tags

This PR updates the LineToEvents function in the specific case of more than one : left of the initial |. If so, assume it is an extended aggregation line, convert it back into its multi-line non-aggregated form, then pass it onto the rest of the function as the samples. The logic enforces that this form of aggregation metrics must be only of the types of distribution, histogram, or timing.

GrgDev avatar May 30 '24 18:05 GrgDev

@glightfoot Friendly nudge

GrgDev avatar Jun 10 '24 17:06 GrgDev