-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[receiver/k8sclusterreceiver] Add missing attributes to entities in experimental entity feature #39038
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
Conversation
…lowing entities Container - container.name - container.uid - k8s.pod.name - k8s.pod.uid Pod - k8s.namespace.name - k8s.pod.name Workload - k8s,namespace.name
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.
I missed couple of things
…match semantic conventions
…me and container.image.tag.
@@ -23,6 +24,9 @@ const ( | |||
containerKeyStatus = "container.status" | |||
containerKeyStatusReason = "container.status.reason" | |||
containerCreationTimestamp = "container.creation_timestamp" | |||
containerName = "k8s.container.name" | |||
containerImageName = "container.image.name" | |||
containerImageTag = "container.image.tag" |
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.
containerImageTag = "container.image.tag" | |
containerImageTags = "container.image.tags" |
I think this needs to be alist based on https://opentelemetry.io/docs/specs/semconv/attributes-registry/container/#container-image-tags
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.
@povilasv , the current struct for sending metadata only allows values of type string. We can change the label to 'container.image.tags' but changing the value to a list will be very big change.
IMO, we can use the label container.image.tag since its also used here
Also even though an image may contain multiple tags the container spec references a specific tag so the multiple tags maybe relevant for the 'Image' entity it may not be relevant for the container entity.
@dmitryax , do you have any opinion?
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.
Since the collector currently doesn't send any container.image.tags
attribute, only container.image.tag
, it'd be in inconsistent state sending data that cannot be easily correlated. I believe, in order to migrate from container.image.tag
to container.image.tags
attribute, we need to apply the changes to all sources consistently via a feature gate, maybe even keeping the old behavior as an option.
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.
@povilasv, is this good to go from your perspective?
Good to go |
The failing test is unrelated, #39210 |
…xperimental entity feature (open-telemetry#39038) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Modified entity payloads to include additional attributes for the following entities. Some of which are mentioned here - Container - k8s.container.name - container.image.name - container.image.tag - k8s.pod.name - k8s.pod.uid - k8s.namespace.name - k8s.node.name Pod - k8s.namespace.name - k8s.pod.name Workload - k8s.namespace.name <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Partially Resolves: open-telemetry#38687 <!--Describe what testing was performed and which tests were added.--> #### Testing Updated unit tests to validate the desired attributes for the mentioned entities are included in the metadata for that entity <!--Describe the documentation added.--> #### Documentation None. <!--Please delete paragraphs that you did not use before submitting.-->
…xperimental entity feature (open-telemetry#39038) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Modified entity payloads to include additional attributes for the following entities. Some of which are mentioned here - Container - k8s.container.name - container.image.name - container.image.tag - k8s.pod.name - k8s.pod.uid - k8s.namespace.name - k8s.node.name Pod - k8s.namespace.name - k8s.pod.name Workload - k8s.namespace.name <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Partially Resolves: open-telemetry#38687 <!--Describe what testing was performed and which tests were added.--> #### Testing Updated unit tests to validate the desired attributes for the mentioned entities are included in the metadata for that entity <!--Describe the documentation added.--> #### Documentation None. <!--Please delete paragraphs that you did not use before submitting.-->
…xperimental entity feature (open-telemetry#39038) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Modified entity payloads to include additional attributes for the following entities. Some of which are mentioned here - Container - k8s.container.name - container.image.name - container.image.tag - k8s.pod.name - k8s.pod.uid - k8s.namespace.name - k8s.node.name Pod - k8s.namespace.name - k8s.pod.name Workload - k8s.namespace.name <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Partially Resolves: open-telemetry#38687 <!--Describe what testing was performed and which tests were added.--> #### Testing Updated unit tests to validate the desired attributes for the mentioned entities are included in the metadata for that entity <!--Describe the documentation added.--> #### Documentation None. <!--Please delete paragraphs that you did not use before submitting.-->
Description
Modified entity payloads to include additional attributes for the following entities. Some of which are mentioned here -
Container
Pod
Workload
Link to tracking issue
Partially Resolves: #38687
Testing
Updated unit tests to validate the desired attributes for the mentioned entities are included in the metadata for that entity
Documentation
None.