Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Refactor filebeat connector #12997
Refactor filebeat connector #12997
Changes from all commits
16cdf67
04210d7
83117f6
dda8565
6242461
d21cd2d
1a908e8
d819318
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
NIT: What if we centralize this operation in a single method?
Note that the
err
is not mandatory but could be used if values should not be changed or not.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.
Maybe it's worth it to have a central method that change the default values of the meta or fields in an event. I am just trying to put myself in the following mind:
Where would I look for default added fields or meta?
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.
I considered this, but not only for fields and meta. This function basically merges some default ClientConfig with the one provided by the input. So I was wondering how generic this merge should be. But yet the order might be somewhat filebeat specific, so I decided to postpone it if there is need.
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.
I am OK to postpone it, it might be premature to extract it.
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.
Worth to log it in debug? it would be explicit but might scare people. :)
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.
I wouldn't log it here. If we log it, then we should also log the input type and maybe some config id. This information is lost here. So far GuaranteedSend is the default for everyone and no input allows users to change this.
If an input supports multiple modes in the future, then it should log the mode being used.