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

[receiver/k8scluster] Add Node resource attributes #30343

Merged

Conversation

povilasv
Copy link
Contributor

@povilasv povilasv commented Jan 9, 2024

Description:

I would like to use k8s cluster receiver to get more information about Node, such as Container Runtime Version, OS version and OS description.

This is how it looks when using kind:

k8s_node_allocatable_cpu_{container_runtime="containerd", container_runtime_version="1.6.9", k8s_kubelet_version="v1.25.3", k8s_node_name="kind-control-plane", k8s_node_uid="29b8a758-ac58-45e7-9091-b9ed2e285be9", os_description="Ubuntu 22.04.1 LTS", os_version="6.6.10-arch1-1"}

Link to tracking Issue:

#30342

Testing:

  • tested locally in kind
    Documentation:
  • generated

@povilasv povilasv force-pushed the k8scluster/add-resource-attributes branch 2 times, most recently from d10af64 to 523ab3c Compare January 9, 2024 09:12
@povilasv povilasv marked this pull request as ready for review January 9, 2024 11:16
@povilasv povilasv requested a review from a team January 9, 2024 11:16
@@ -162,6 +162,21 @@ resource_attributes:
type: string
enabled: false

k8s.container_runtime.version:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be a little closer to the existing container semconv I think this should be k8s.container.runtime.version.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm given we have prefix containerd:// maybe we can actually do:

container.runtime = containerd
container.runtime.version = 1.2.23

This would be more aligned to the doc you linked.

Thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated, this is how it looks when using kind:

k8s_node_allocatable_cpu_{container_runtime="containerd", container_runtime_version="1.6.9", k8s_kubelet_version="v1.25.3", k8s_node_name="kind-control-plane", k8s_node_uid="29b8a758-ac58-45e7-9091-b9ed2e285be9", os_description="Ubuntu 22.04.1 LTS", os_version="6.6.10-arch1-1"}

@povilasv povilasv force-pushed the k8scluster/add-resource-attributes branch 2 times, most recently from 4960f74 to a5e2694 Compare January 12, 2024 12:01
@povilasv povilasv force-pushed the k8scluster/add-resource-attributes branch from a5e2694 to 9968a41 Compare January 12, 2024 12:04
@povilasv povilasv requested a review from TylerHelmuth January 12, 2024 12:32
@dmitryax dmitryax merged commit 7b5d84b into open-telemetry:main Jan 12, 2024
85 checks passed
@github-actions github-actions bot added this to the next release milestone Jan 12, 2024
cparkins pushed a commit to AmadeusITGroup/opentelemetry-collector-contrib that referenced this pull request Feb 1, 2024
)

**Description:**
I would like to use k8s cluster receiver to get more information about
Node, such as Container Runtime Version, OS version and OS description.

This is how it looks when using kind:
```
k8s_node_allocatable_cpu_{container_runtime="containerd", container_runtime_version="1.6.9", k8s_kubelet_version="v1.25.3", k8s_node_name="kind-control-plane", k8s_node_uid="29b8a758-ac58-45e7-9091-b9ed2e285be9", os_description="Ubuntu 22.04.1 LTS", os_version="6.6.10-arch1-1"}

```

**Link to tracking Issue:**

open-telemetry#30342
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants