-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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]: apply attribute value from retrieved k8s object if original value is empty #36466
Merged
andrzej-stencel
merged 10 commits into
open-telemetry:main
from
bacherfl:fix/36373/set-k8s-attributes
Dec 16, 2024
Merged
[processor/k8sattributes]: apply attribute value from retrieved k8s object if original value is empty #36466
andrzej-stencel
merged 10 commits into
open-telemetry:main
from
bacherfl:fix/36373/set-k8s-attributes
Dec 16, 2024
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
…tribute value is empty Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
github-actions
bot
requested review from
dmitryax,
fatsheep9146 and
TylerHelmuth
November 20, 2024 10:26
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
ChrsMark
approved these changes
Dec 6, 2024
@dmitryax, @fatsheep9146, @TylerHelmuth PTAL |
}, | ||
}, | ||
{ | ||
name: "attribute present - do not overwrite value", |
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.
Small nit
attribute present with non-empty value - do not overwrite value
fatsheep9146
approved these changes
Dec 12, 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.
Small nits
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
fatsheep9146
added
the
ready to merge
Code review completed; ready to merge by maintainers
label
Dec 12, 2024
sbylica-splunk
pushed a commit
to sbylica-splunk/opentelemetry-collector-contrib
that referenced
this pull request
Dec 17, 2024
…bject if original value is empty (open-telemetry#36466) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description This PR extends the previous check whether an attribute value has not been present with a check for an empty value in the original resource attributes. This way, attributes, such as `k8s.namespace.name` will be set based on the retrieved kubernetes resource also if the original value has been set to e.g. an empty string <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes open-telemetry#36373 <!--Describe what testing was performed and which tests were added.--> #### Testing Added unit tests --------- Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com> Co-authored-by: Christos Markou <chrismarkou92@gmail.com>
mterhar
pushed a commit
to mterhar/opentelemetry-collector-contrib
that referenced
this pull request
Dec 19, 2024
…bject if original value is empty (open-telemetry#36466) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description This PR extends the previous check whether an attribute value has not been present with a check for an empty value in the original resource attributes. This way, attributes, such as `k8s.namespace.name` will be set based on the retrieved kubernetes resource also if the original value has been set to e.g. an empty string <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes open-telemetry#36373 <!--Describe what testing was performed and which tests were added.--> #### Testing Added unit tests --------- Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com> Co-authored-by: Christos Markou <chrismarkou92@gmail.com>
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 extends the previous check whether an attribute value has not been present with a check for an empty value in the original resource attributes. This way, attributes, such as
k8s.namespace.name
will be set based on the retrieved kubernetes resource also if the original value has been set to e.g. an empty stringLink to tracking issue
Fixes #36373
Testing
Added unit tests