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

Ensure that k8s labels and annotations follow SemConv #32440

Open
ChrsMark opened this issue Apr 16, 2024 · 8 comments
Open

Ensure that k8s labels and annotations follow SemConv #32440

ChrsMark opened this issue Apr 16, 2024 · 8 comments
Labels
discussion needed Community discussion needed never stale Issues marked with this label will be never staled and automatically removed on hold This is blocked by another PR/issue processor/k8sattributes k8s Attributes processor waiting-for:semantic-conventions Waiting on something on semantic-conventions to be stabilized

Comments

@ChrsMark
Copy link
Member

Component(s)

processor/k8sattributes

Describe the issue you're reporting

This is issue is to keep track of any pending task to align the k8sattributes processor with SemConv's pod's labels and annotations spec.

Ref PRs:

This might also applies on the kubeletstats and k8scluster receivers as well.

@ChrsMark ChrsMark added the needs triage New item requiring triage label Apr 16, 2024
@github-actions github-actions bot added the processor/k8sattributes k8s Attributes processor label Apr 16, 2024
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@TylerHelmuth TylerHelmuth added priority:p2 Medium and removed needs triage New item requiring triage labels Apr 17, 2024
@TylerHelmuth
Copy link
Member

TylerHelmuth commented Apr 17, 2024

We do need to do this, I'd prefer not doing it until the Kubernetes resource attributes are stabilized, that way we only have to do the breaking change once.

@TylerHelmuth TylerHelmuth added discussion needed Community discussion needed on hold This is blocked by another PR/issue and removed priority:p2 Medium labels Apr 17, 2024
Copy link
Contributor

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions github-actions bot added the Stale label Jun 17, 2024
@ChrsMark
Copy link
Member Author

Still valid. Should we mark this as "never stale" to avoid having this closed at some point in case we miss updating it?

@github-actions github-actions bot removed the Stale label Jun 18, 2024
@ChrsMark
Copy link
Member Author

Related to open-telemetry/semantic-conventions#1242.

@venkatesh-thatham
Copy link

venkatesh-thatham commented Jul 29, 2024

the k8sattributesprocessor is still using old semantic convention version v1.6.1 and the latest version v1.25.0 includes both k8s.cluster.name and k8s.container.restart_count.

when I try to add cluster name k8s attribute according to this semantic convention documentation, I'm getting validation error: "k8s.cluster.name is not a supported metadata field"

@TylerHelmuth TylerHelmuth added the never stale Issues marked with this label will be never staled and automatically removed label Aug 6, 2024
@TylerHelmuth
Copy link
Member

@venkatesh-thatham although k8s.cluster.name is the semantically correct value to represent the name of a kubernetes cluster in an attribute, the k8sattributesprocessor does not support adding that information to the telemetry. This is because there isn't a good way to get the information.

You should set an attribute with the static cluster name via an env var or static string using the resource processor or transformprocessor.

@ChrsMark
Copy link
Member Author

ChrsMark commented Aug 7, 2024

The resourcedetectionprocessor can also provide the k8s.cluster.name for some cloud providers.

@mx-psi mx-psi added the waiting-for:semantic-conventions Waiting on something on semantic-conventions to be stabilized label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion needed Community discussion needed never stale Issues marked with this label will be never staled and automatically removed on hold This is blocked by another PR/issue processor/k8sattributes k8s Attributes processor waiting-for:semantic-conventions Waiting on something on semantic-conventions to be stabilized
Projects
None yet
Development

No branches or pull requests

4 participants