-
Notifications
You must be signed in to change notification settings - Fork 77
[confgenerator] Create MergeInternalLoggingProcessor in FilesMixin to merge processor MultilineRules.
#2025
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
Conversation
confgenerator/logging_macros.go
Outdated
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 take it you're adding this so you can register only the receiver. If we correctly handle the merging, though, can't we just continue to register it as a receiver + processor?
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 did this because all of this 3P app receivers that have MultilineRules in the INPUT tail receiver don't register a processor. Arguably, after this change, there is no restriction anymore since the processor now could work as a standalone without the multiline parsing in the INPUT.
28e4dca to
a2aef14
Compare
...stdata/goldens/logging-receiver_elasticsearch_custom/golden/linux-gpu/fluent_bit_parser.conf
Outdated
Show resolved
Hide resolved
…o `LoggingReceiverFilesMixin`
…n second iteration of merging.
ff85480 to
ddb2b27
Compare
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.
LGTM!
There are some test failures (e.g. missing update goldens) which may be solved after removing some debug statements.
Thank you for all the help in this PR @quentinmit !
`yamlTag == "-"` doesn't work because the golden test contains its own copy of the code (!), so the change was a noop.
Now that we correctly merge multiline rules into inputs, it can safely be used as the first processor in a file pipeline.
|
Unfortunately we were still getting fluent-bit segfaults on some of the transformation tests. I think I might have finally fixed them (by removing the empty |
|
The four remaining test failures all appear to be unrelated flakes due to quota issues in our CI environment, so I'm going to merge this. |
Description
This PR creates the interface
InternalLoggingProcessorMergerto enableInternalLoggingReceiversto mergeInternalLoggingProcessorsfeatures into the receiver when possible and supported.Specifically the new method
MergeInternalLoggingProcessorofLoggingReceiverFilesMixinwill merge the processorLoggingProcessorParseMultilineRegex.Rules []MultilineRulesinto the files receiver.Details
Co-author @quentinmit : All the related
MULTILINE_PARSERlogic was updated so the "merging" only has to be implemented in one place. This reduces a lot of tech debt.This solution resembles the already implemented
MetricsProcessorMerger. This solution differs in the abstraction layer where this "merges" happen.MetricsProcessorMergerworks for aprocessorin an Ops Agent pipeline. In comparison,InternalLoggingProcessorMergerworks for aprocessorwithin aLoggingReceiverdefinition.Updates
InternalLoggingProcessorMergerwith methodMergeInternalLoggingProcessor.MergeInternalLoggingProcessormethod toLoggingReceiverFilesMixin.LoggingProcessorParseMultilineRegex.Rules []MultilineRulesinto the files receiver when possible.elasticseach_jsonreceiver and processor with this refactoring.Context
As described before in #2013, there are
fluent-bitdownsides/bugs related to havingMultilineRulesin a separateFILTERprocessor outside of theINPUT. This solution enables theprocessorto merge thisMultilineRulesto theINPUTreceiver when possible to avoid the downsides/bugs.Related issue
b/413410475
How has this been tested?
Checklist: