-
Notifications
You must be signed in to change notification settings - Fork 2.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
[k8sattributesprocessor] Fall back to only container in pod in case no container name/id has been specified in the incoming resource attributes #36844
Merged
TylerHelmuth
merged 9 commits into
open-telemetry:main
from
bacherfl:feat/34189/container-fallback
Jan 13, 2025
Merged
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
…explicitly Signed-off-by: Florian Bacher <[email protected]>
Signed-off-by: Florian Bacher <[email protected]>
Signed-off-by: Florian Bacher <[email protected]>
Signed-off-by: Florian Bacher <[email protected]>
Signed-off-by: Florian Bacher <[email protected]>
ChrsMark
approved these changes
Dec 20, 2024
fatsheep9146
approved these changes
Dec 22, 2024
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.
Kindly ping @TylerHelmuth @dmitryax for a final review
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
TylerHelmuth
reviewed
Jan 9, 2025
TylerHelmuth
approved these changes
Jan 13, 2025
chengchuanpeng
pushed a commit
to chengchuanpeng/opentelemetry-collector-contrib
that referenced
this pull request
Jan 26, 2025
…o container name/id has been specified in the incoming resource attributes (open-telemetry#36844) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description This PR adds a fallback logic to the processor by adding the container attributes for an incoming resource without the container name/id being explicitly set, provided the related pod only contains one container. If there are more than one container in a pod, the container name/id still have to be set explicitly. <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes open-telemetry#34189 <!--Describe what testing was performed and which tests were added.--> #### Testing Added unit tests <!--Describe the documentation added.--> #### Documentation Adapted the readme to reflect the changes made in this PR <!--Please delete paragraphs that you did not use before submitting.--> --------- Signed-off-by: Florian Bacher <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
processor/k8sattributes
k8s Attributes processor
ready to merge
Code review completed; ready to merge by maintainers
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
This PR adds a fallback logic to the processor by adding the container attributes for an incoming resource without the container name/id being explicitly set, provided the related pod only contains one container. If there are more than one container in a pod, the container name/id still have to be set explicitly.
Link to tracking issue
Fixes #34189
Testing
Added unit tests
Documentation
Adapted the readme to reflect the changes made in this PR