Use Case
I ingest StatsD counters where a single event can increment by values greater than 1 (for example metric:2|c, metric:5|c).
I can compute rate in post-processing from the counter sum, but I also need the number of counter events received per metric per gather window.
I cannot change the application instrumentation to emit a second *_count:1|c metric, so this needs to be handled in Telegraf inputs.statsd.
Expected behavior
For counter metrics (|c), Telegraf should provide an optional field that tracks event occurrences (number of counter updates received), not only the summed counter value.
Example option (name open to maintainers):
counter_event_count = true
When enabled, output for a counter metric should include:
value = sum of increments (existing behavior)
event_count = number of counter packets/events seen in the gather interval
This should work regardless of increment size (1, 2, 10, etc.), with no app-side change required.
Actual behavior
inputs.statsd only emits the aggregated counter sum (value) for |c metrics.
No per-metric event count field is emitted.
If increment values vary, event count cannot be derived from value alone (for example total 3 can be 3 once or 1+2).
So today there is no accurate way to get per-counter event count without changing app instrumentation or modifying the plugin.
Additional info
No response
Use Case
I ingest StatsD counters where a single event can increment by values greater than 1 (for example
metric:2|c,metric:5|c).I can compute rate in post-processing from the counter sum, but I also need the number of counter events received per metric per gather window.
I cannot change the application instrumentation to emit a second
*_count:1|cmetric, so this needs to be handled in Telegrafinputs.statsd.Expected behavior
For counter metrics (|c), Telegraf should provide an optional field that tracks event occurrences (number of counter updates received), not only the summed counter value.
Example option (name open to maintainers):
counter_event_count = trueWhen enabled, output for a counter metric should include:
value = sum of increments (existing behavior)event_count = number of counter packets/events seen in the gather intervalThis should work regardless of increment size (1, 2, 10, etc.), with no app-side change required.
Actual behavior
inputs.statsdonly emits the aggregated counter sum (value) for |c metrics.No per-metric event count field is emitted.
If increment values vary, event count cannot be derived from value alone (for example total 3 can be 3 once or 1+2).
So today there is no accurate way to get per-counter event count without changing app instrumentation or modifying the plugin.
Additional info
No response