-
Notifications
You must be signed in to change notification settings - Fork 1.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
output: Fix handling of metrics in output processor #8848
Conversation
This patch passes an cmt_out_context pointer so that output processors can modify metrics. Signed-off-by: Thiago Padilha <thiago@chronosphere.io>
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.
Looks good. And I'd overlooked for output side of processor functionality.
Thanks for tackling this.
Is there any chance to add unit tests for output patterns like as following file?
https://github.com/fluent/fluent-bit/blob/master/tests/runtime/processor_metrics_selector.c
f933746
to
73b276c
Compare
@cosmo0920 added a runtime test that attaches the processor to output. |
The added commit is OK. But it needs to fix commit message. |
73b276c
to
b275782
Compare
…ut processor Signed-off-by: Thiago Padilha <thiago@chronosphere.io>
b275782
to
a7082d7
Compare
@edsiper @cosmo0920 fixed commit message |
I approved for the workflows. Waiting for the results. |
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 tackling this. Looks good to me.
This patch passes an cmt_out_context pointer so that output processors can modify metrics.
Without this change, it is not possible to modify metrics in an output processor. Example config which reproduces:
Without the patch, we observe unmodified metrics:
With the patch, we see the filtered metrics:
valgrind output:
Enter
[N/A]
in the box, if an item is not applicable to your change.Testing
Before we can approve your change; please submit the following in a comment:
If this is a change to packaging of containers or native binaries then please confirm it works for all targets.
ok-package-test
label to test for all targets (requires maintainer to do).Documentation
Backporting
Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.