-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[processor/k8sattributes] Operator resource attributes #37114
Open
zeitlinger
wants to merge
14
commits into
open-telemetry:main
Choose a base branch
from
zeitlinger:operator-resource-attributes
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[processor/k8sattributes] Operator resource attributes #37114
zeitlinger
wants to merge
14
commits into
open-telemetry:main
from
zeitlinger:operator-resource-attributes
Conversation
This file contains 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
zeitlinger
requested review from
dmitryax,
fatsheep9146,
TylerHelmuth,
ChrsMark and
a team
as code owners
January 9, 2025 14:34
fatsheep9146
reviewed
Jan 9, 2025
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.
Could you please add a changelog and also updating the document to describe how to use this feature?
zeitlinger
changed the title
Operator resource attributes
[processor/k8sattributes] Operator resource attributes
Jan 10, 2025
@fatsheep9146 added changelog and docs I also tried adding e2e tests - but didn't get it to work. Please advise if/how to do this. |
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.
Description
The OTel operator has a set of rules to create resource attributes - which is described here.
This PR allows the collector to create resource attributes with the same logic.
Why
If the operator supplies resource attributes (that are sent with OTLP), it seems redundant that the collector should be able to do the same - it will just overwrite the resource attribute with identical values.
This feature gets interesting if you are not only getting all data from OTLP - but some data elsewhere, e.g. from the file log receiver.
It's crucial to use the same values for resource attributes across signals - this makes correlation possible.
For example, it allows you to find file based the log entries on the same service instance as a trace you're viewing (around the same time).
Alternatives
The same result can be achieved using the transforprocessor - but it's a very long and hard-to-understand configuration.
It that way, it's similar to the container parser.
Testing
Unit tests were added - e2e tests later
Documentation
Added here
This also has a complete config.