-
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
feat(input.tail): Add initial_read_offset
config for controlling read behavior
#16342
base: master
Are you sure you want to change the base?
feat(input.tail): Add initial_read_offset
config for controlling read behavior
#16342
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 @wen-templari for your contribution! I do have some comments in the code. Please remember to run make docs
after changing the sample.conf
file...
Additionally I want to ask you to deprecate the from_beginning
option as it is replaced by the new one...
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 a lot @wen-templari!
@wen-templari I fixed some small formatting issues. Could you please solve the merge conflict?!? |
Hi @srebhan, I have resolved the merge conflicts. |
read_start
config for controlling read behaviorinitial_read_offset
config for controlling read behavior
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 |
Hi @srebhan, I updated the code to fix initialization on the |
Summary
This PR add a
initial_read_offset
config for tail plugin. This option gives user more control over the read behavior.It can take following options:
Use
saved-or-beginning
as default because it matches the previous defaultfrom_beginning = false
behavior.After setting
initial_read_offset
, thefrom_beginning
config will be ignored.Change store offset logic. Now the plugin will always store offset ignoring the
from_beginning
config.Checklist
Related issues
resolves #16237
replaces #16240