feat(agent): output buffer persistence
Summary
Implements the write-through buffer persistence strategy detailed in the spec added in #14928.
Currently this PR is mostly a draft of separating the output buffer into multiple implementations, as well as experimentation with a WAL file library. Largest outstanding issue is around metric serialization to []byte.
- Using the influx parser+serializer causes a cyclical import, but also drops the metric value type field. However this is probably the cleanest option to investigate since it would make the WAL files easy to re-import
- Another suggestion was to use
encoding/gob, which is what the PR is currently doing. However this has issues with un-exported fields, so I need to look more into how to work around this
Checklist
- [X] No AI generated code was used in this PR
Related issues
Related to #802, #14805
@DStrand1,
Thanks for the PR, super excided to see this. To capture what we talked about in pairs; specifically, to have you address some of the initial comments and switch to the proposed WAL library.
Let's plan to talk through where you are at or any issues with the new library in Monday's pairs.
Thanks!
Remaining comments are related to using the WAL file Batch function, I will work on switching to that next
Download PR build artifacts for linux_amd64.tar.gz, darwin_arm64.tar.gz, and windows_amd64.zip. Downloads for additional architectures and packages are available below.
:relaxed: This pull request doesn't significantly change the Telegraf binary size (less than 1%)
:package: Click here to get additional PR build artifacts
Artifact URLs
Superseded by #15564