Conversation
Contributor
Author
|
Note that this PR is built on top of #8883 commit. Because raw endpoint unit testing should fail without that PR's change. |
c08585c to
4c2493e
Compare
Member
|
FYI: #8883 has been merged. |
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
In metadata case, we didn't support for formatting metadata in out_lib. So, we didn't write down the tests for them. Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
4c2493e to
8e004d4
Compare
edsiper
requested changes
Jun 3, 2024
plugins/in_splunk/splunk_config.c
Outdated
| /* Link to parent list */ | ||
| mk_list_add(&splunk_token->_head, &ctx->auth_tokens); | ||
|
|
||
| token = strtok(NULL, ","); |
Member
There was a problem hiding this comment.
we avoid using strtok(2) function since it modifies the original buffer.
plugins/in_splunk/splunk.c
Outdated
| }, | ||
|
|
||
| { | ||
| FLB_CONFIG_MAP_BOOL, "store_token_to_metadata", "true", |
Member
There was a problem hiding this comment.
I would suggest a little change to `store_token_in_metadata"
plugins/in_splunk/splunk_config.c
Outdated
| if (tmp) { | ||
| tmp_tokens = flb_strdup(tmp); | ||
|
|
||
| token = strtok(tmp_tokens, ","); |
Member
There was a problem hiding this comment.
avoid strtok(). you can use flb_utls_split instead
plugins/in_splunk/splunk_config.c
Outdated
|
|
||
| tmp = flb_input_get_property("splunk_token", ctx->ins); | ||
| if (tmp) { | ||
| tmp_tokens = flb_strdup(tmp); |
plugins/in_splunk/splunk_prot.c
Outdated
| } | ||
| else { | ||
| return SPLUNK_AUTH_UNAUTHORIZED; | ||
| mk_list_foreach_safe(head, tmp, &ctx->auth_tokens) { |
Member
There was a problem hiding this comment.
if the list entry won't be deleted, you can use mk_list_foreach() , the _safe_ version aims to provide an extra pointer to deal with cases where entries/nodes are being removed.
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
edsiper
approved these changes
Jun 5, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
In this enhancement, I implemented capabilities for storing metadata into records and handle multiple HEC tokens in configuration.
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:
For injecting HEC tokens into records case
For injecting HEC tokens into metadata case (default behavior)
For injecting HEC tokens into records case
For injecting HEC tokens into metadata case (default behavior)
For injecting HEC tokens into records case
For injecting HEC tokens into metadata case (default behavior)
If this is a change to packaging of containers or native binaries then please confirm it works for all targets.
ok-package-testlabel to test for all targets (requires maintainer to do).Documentation
fluent/fluent-bit-docs#1387
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.