influxdata / influxdata/telegraf
Configuration option to drop oldest or newest data in the buffer when buffer is full
- Dominant language
- Go
- Stars
- 17.8k
- Forks
- 5.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 161
Description
### Use Case
Similar to https://github.com/influxdata/telegraf/issues/15208
(accommodating temporary high-write bursts to and influxdb instance)
Sometimes the newest data is more important to keep than the oldest data (if your computer failed, would you care more about what happened right before the failure or 5 minutes before the failure?)
Sometimes the oldest data is more important to keep than the newest data (ex: which events happened first in this very large burst of events?)
### Expected behavior
I expected to see a configuration option like "buffer_drop_strategy" which would default to "drop_oldest".
### Actual behavior
No configuration option to specify which metrics (newest or oldest) are dropped from the buffer.
### Additional info
_No response_
Contributor guide
Research direction
No files, tests, or entry points are named. Start by locating the buffer implementation and its configuration handling, then determine how a buffer-full condition selects metrics to discard; done means a configurable drop strategy supports both oldest and newest data, with the documented default behavior covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- observability-sre
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100