Skip to content

Conversation

@JeffLuoo
Copy link
Contributor

@JeffLuoo JeffLuoo commented Sep 5, 2025

Fixes #42530

Description

Extract deployment name from replicaset name in the pod owner reference. Doesn't need to start the informer for the replicaset, reduce traffic to api server.

Link to tracking issue

Fixes #42530

Testing

Unit test, and test in kind cluster that trace still has container name attribute.

Documentation

@github-actions github-actions bot added the first-time contributor PRs made by new contributors label Sep 5, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Sep 5, 2025

Welcome, contributor! Thank you for your contribution to opentelemetry-collector-contrib.

Important reminders:

A maintainer will review your pull request soon. Thank you for helping make OpenTelemetry better!

@github-actions github-actions bot added the processor/k8sattributes k8s Attributes processor label Sep 5, 2025
@JeffLuoo JeffLuoo force-pushed the feature/k8s-deployment-name-from-replicaset branch 2 times, most recently from 0d3927d to d360653 Compare September 9, 2025 14:26
@JeffLuoo
Copy link
Contributor Author

JeffLuoo commented Sep 9, 2025

Hi @atoulme the PR needs a workflows approval to run the test. Thanks!

@JeffLuoo
Copy link
Contributor Author

Another gentle ping: @ChrsMark @dmitryax @TylerHelmuth @fatsheep9146

@dashpole
Copy link
Contributor

I think we definitely should add this (see #42530 (comment)). Since this is a heuristic, it is possible (although unlikely in my experience) that it could break someone. If that happens when the feature gate goes beta, I think we can add a config option to revert back to the previous behavior. But i've seen this heuristic used widely without any issues.

@JeffLuoo JeffLuoo force-pushed the feature/k8s-deployment-name-from-replicaset branch 2 times, most recently from 6137c53 to 6fad22a Compare September 12, 2025 18:12
Copy link
Member

@ChrsMark ChrsMark left a comment

Choose a reason for hiding this comment

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

I support this feature! Left a comment about making this configurable.

@JeffLuoo JeffLuoo force-pushed the feature/k8s-deployment-name-from-replicaset branch 2 times, most recently from 079892a to 904412f Compare September 15, 2025 14:42
@JeffLuoo JeffLuoo force-pushed the feature/k8s-deployment-name-from-replicaset branch from 904412f to ee555d1 Compare September 15, 2025 15:04
@JeffLuoo
Copy link
Contributor Author

JeffLuoo commented Sep 16, 2025

Hi @ChrsMark do I need repo owner to merge the change? Thanks!

@ChrsMark
Copy link
Member

Hi @ChrsMark do I need repo owner to merge the change? Thanks!

Typically few code-owners of the component need to approve and then a maintainer can merge :).

@ChrsMark
Copy link
Member

@JeffLuoo JeffLuoo force-pushed the feature/k8s-deployment-name-from-replicaset branch from 48822dd to be317da Compare September 18, 2025 14:40
@atoulme
Copy link
Contributor

atoulme commented Sep 22, 2025

Please address conflicts and mark ready for review again.

@atoulme atoulme marked this pull request as draft September 22, 2025 04:14
@JeffLuoo JeffLuoo force-pushed the feature/k8s-deployment-name-from-replicaset branch from 1f346f2 to 478984f Compare September 22, 2025 13:56
@JeffLuoo JeffLuoo marked this pull request as ready for review September 22, 2025 13:56
@JeffLuoo
Copy link
Contributor Author

atoulme Done.

@JeffLuoo JeffLuoo force-pushed the feature/k8s-deployment-name-from-replicaset branch from 478984f to 05792de Compare September 22, 2025 13:57
@JeffLuoo JeffLuoo force-pushed the feature/k8s-deployment-name-from-replicaset branch from 05792de to 98f8fcb Compare September 22, 2025 14:36
@JeffLuoo JeffLuoo requested a review from ChrsMark September 22, 2025 14:36
Copy link
Member

@ChrsMark ChrsMark left a comment

Choose a reason for hiding this comment

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

I'm fine adding this if other code-owners agree.
@TylerHelmuth @dmitryax @fatsheep9146 PTAL

@github-actions
Copy link
Contributor

Welcome, contributor! Thank you for your contribution to opentelemetry-collector-contrib.

Important reminders:

A maintainer will review your pull request soon. Thank you for helping make OpenTelemetry better!

@JeffLuoo JeffLuoo force-pushed the feature/k8s-deployment-name-from-replicaset branch from 98f8fcb to b9ba568 Compare September 30, 2025 15:00
@JeffLuoo
Copy link
Contributor Author

@TylerHelmuth A gentle ping for review.

Co-authored-by: Jina Jain <jjain@splunk.com>
@github-actions github-actions bot requested a review from TylerHelmuth October 24, 2025 19:23
@TylerHelmuth TylerHelmuth added the ready to merge Code review completed; ready to merge by maintainers label Oct 24, 2025
@github-actions
Copy link
Contributor

Welcome, contributor! Thank you for your contribution to opentelemetry-collector-contrib.

Important reminders:

A maintainer will review your pull request soon. Thank you for helping make OpenTelemetry better!

@TylerHelmuth TylerHelmuth merged commit f562ab5 into open-telemetry:main Oct 24, 2025
205 of 206 checks passed
@github-actions github-actions bot added this to the next release milestone Oct 24, 2025
@otelbot
Copy link
Contributor

otelbot bot commented Oct 24, 2025

Thank you for your contribution @JeffLuoo! 🎉 We would like to hear from you about your experience contributing to OpenTelemetry by taking a few minutes to fill out this survey. If you are getting started contributing, you can also join the CNCF Slack channel #opentelemetry-new-contributors to ask for guidance and get help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

first-time contributor PRs made by new contributors processor/k8sattributes k8s Attributes processor ready to merge Code review completed; ready to merge by maintainers waiting-for-code-owners

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[processor/k8sattributes] Add support for extracting deployment name purely from ownerReferences

8 participants