-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs(outputs): Clarify buffer limits behavior and fix spec wording #15999
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! This should clarify things much better.
Also just noticed in the specs: "Telegraf will not make any attempt to limit the size on disk taken by these files beyond cleaning up WAL files for metrics that have successfully been flushed to their output source."
Perhaps the last word should be destination instead of source ?
I agree changing to "destination" here would be clearer wording, feel free to make that change as well!
There is also And Im not so sure anymore, never used tracking metrics, but seems to be write to a buffer WAL file only, perhaps what is meant is that the metric is only handed over to the output plugin (in which case output source would make sense probably), to be written to output destination later (as in external system, file, stdout...). I would rather leave changing "source" to "destination" in this spec to someone more knowledgeable about Telegraf internals. Perhaps the first occurrence is correct and should be "output source" and only the previously discussed second occurrence needs changing - as |
This line is actually more incorrect now, it should say something like |
Okay, Ive updated it, makes sense. The previous wording almost got me thinking there is some "in between" state where the metric is "in the output plugin", but not sent to the actual output destination yet. Glad to hear that is not the case. But we should verify the tracking metrics being "accepted" with the WAL buffer - Im new to the WAL on disk buffer strategy, but I see it is persisted across telegraf instances/restarts, are we sure tracking metrics are "accepted" only when they are flushed from the WAL to the actual output destination ? For example, I see this comment in the on disk buffer test code:
|
Download PR build artifacts for linux_amd64.tar.gz, darwin_arm64.tar.gz, and windows_amd64.zip. 📦 Click here to get additional PR build artifactsArtifact URLs |
Tracking data is only relevant on the current instance of telegraf, the contract is that if a tracking metric is not accepted, the input plugin that generated it will not assume that metric is "done," and will send it again if asked for more metrics. However on a new instance of telegraf, this tracking data has no way to inform the input, so these metrics have to be removed from the buffer and be reacquired again from the input plugin with new tracking data. |
Makes sense, the changes should be good then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for updating this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Hr0bar!
Summary
As discussed in #15908 , clarifying the behavior of output buffer behavior when it fills up in general, fixing incorrect specs wording and adding related useful note to docs of outpus.azure_monitor.
Hopefully the wording is clear enough?
Also just noticed in the specs: "Telegraf will not make any attempt to limit the size on disk taken by these files beyond cleaning up WAL files for metrics that have successfully been flushed to their output source."
Perhaps the last word should be destination instead of source ?
Checklist
Related issues
#15908