-
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
in_http: use 'tag_key' option when json array is received #9590
in_http: use 'tag_key' option when json array is received #9590
Conversation
Example configuration:
Log output from testing the change:
Json array sent to http input:
|
Valgrind output
|
Any chance this can be reviewed and the bugfix released? This is kind of blocking from going to the latest version of FluentBit. |
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.
Basically, this change is reasonable.
I found a tiny needed to improve point.
Could you follow this suggestion?
When a json array is received by http input, it doesn't use the 'tag_key' option and always sets the tag to 'http.N'. So this fixes the bug and also adds test cases to test for both json object and json array. Signed-off-by: Ankur Patel <imankurpatel000@gmail.com>
a046f56
to
723fa77
Compare
@imankurpatel000, thanks for working on this! @cosmo0920, thank you for reviewing the PR quickly. I'm hopeful that this fix can be merged and deployed soon. my team really needs this fix published. |
When a json array is received by http input, it doesn't use the 'tag_key' option and always sets the tag to 'http.N'. So this fixes the bug and also adds test cases to test for both json object and json array.
Fixes #9589
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
We definitely want to backport this but I would like to confirm first if the PR looks ok before creating new release PR.
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.