processor_content_modifier: add support for OTel Logs Resource and Scopes#8989
Merged
processor_content_modifier: add support for OTel Logs Resource and Scopes#8989
Conversation
…opes
The following patch extends the processor to allow to modify the resources and scopes
of Logs generated by an OpenTelemetry source.
The following new contexts are supported:
- otel_resource_attributes: alter resource attributes
- otel_scope_name: manipulate the scope name
- otel_scope_version: manipulate the scope version
- otel_scope_attributes: alter the scope attributes
example:
----- fluent-bit.yaml -----
pipeline:
inputs:
- name: opentelemetry
port: ${FLUENT_BIT_TEST_LISTENER_PORT}
processors:
logs:
- name: content_modifier
context: otel_resource_attributes
action: upsert
key: "new_attr"
value: "my_val"
- name: content_modifier
context: otel_resource_attributes
action: delete
key: "service.name"
- name: content_modifier
context: otel_scope_attributes
action: upsert
key: "my_new_scope_attr"
value: "123"
- name: content_modifier
context: otel_scope_name
action: upsert
value: "new scope name"
- name: content_modifier
context: otel_scope_version
action: upsert
value: "3.1.0"
outputs:
- name: stdout
match: '*'
- name: opentelemetry
match: '*'
host: 127.0.0.1
port: ${TEST_SUITE_HTTP_PORT}
----- end of file -----
Signed-off-by: Eduardo Silva <eduardo@calyptia.com>
0576b6f to
e05bdff
Compare
3 tasks
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.
The following patch extends the processor to allow to modify the resources and scopes of Logs generated by an OpenTelemetry source.
The following new contexts are supported:
example: fluent-bit.yaml
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-testlabel 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.