Skip to content
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

Conversation

bacherfl
Copy link
Contributor

@bacherfl bacherfl commented Dec 16, 2024

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

@bacherfl bacherfl marked this pull request as ready for review December 16, 2024 13:34
@bacherfl bacherfl requested a review from a team as a code owner December 16, 2024 13:34
Signed-off-by: Florian Bacher <[email protected]>
Copy link
Contributor

@fatsheep9146 fatsheep9146 left a 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

Copy link
Contributor

github-actions bot commented Jan 5, 2025

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Jan 5, 2025
@fatsheep9146 fatsheep9146 added ready to merge Code review completed; ready to merge by maintainers and removed Stale labels Jan 5, 2025
@TylerHelmuth TylerHelmuth merged commit 32d50f5 into open-telemetry:main Jan 13, 2025
161 checks passed
@github-actions github-actions bot added this to the next release milestone 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
Projects
None yet
5 participants