influxdata / influxdata/telegraf
(Optional) limit on sampleRate for statsd input plugin
- Dominant language
- Go
- Stars
- 17.8k
- Forks
- 5.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 161
Description
### Use Case
Currently when providing a high sample rate to `statsd` input plugin (e.g. `valid:0|ms|@0.000000001` ) it causes
https://github.com/influxdata/telegraf/blob/ee8dd87dd3f2683099de6ce33640d1b3cc7c3898/plugins/inputs/statsd/statsd.go#L870-L872
to "hang" quite a bit. Would it be "sensible" to enforce a reasonable limit on this number with the option to modify it?
### Expected behavior
Currently the main issue that this operation can take quite a bit of time. It is more of "preference" thing to fix/implement this.
### Actual behavior
It runs for quite some time
### Additional info
-
Contributor guide
Research direction
Start by reading plugins/inputs/statsd/statsd.go around lines 870-872, where the high sample rate causes the long-running operation. Determine a reasonable configurable limit for sampleRate and define completion as preventing excessive processing while preserving valid statsd input behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100