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

Add support for k8s labels such as app.kubernetes.io/name #3112

Closed
zeitlinger opened this issue Jul 8, 2024 · 6 comments · Fixed by #3204
Closed

Add support for k8s labels such as app.kubernetes.io/name #3112

zeitlinger opened this issue Jul 8, 2024 · 6 comments · Fixed by #3204
Labels
area:auto-instrumentation Issues for auto-instrumentation enhancement New feature or request

Comments

@zeitlinger
Copy link
Member

zeitlinger commented Jul 8, 2024

Component(s)

auto-instrumentation

Is your feature request related to a problem? Please describe.

k8s labels such as app.kubernetes.io/name are recommended to set the app name and similar

See https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/

this should be supported by the otel operator

Describe the solution you'd like

This mapping should work for the following labels:

  • app.kubernetes.io/name - service.name
  • app.kubernetes.io/instance - service.instance.id
  • app.kubernetes.io/version - service.version
  • app.kubernetes.io/part-of - service.namespace

And for the following annotations:

Describe alternatives you've considered

No response

Additional context

No response

@jaronoff97
Copy link
Contributor

@zeitlinger is this different from this issue? Wondering if i can merge these together.

@zeitlinger
Copy link
Member Author

@zeitlinger is this different from this issue? Wondering if i can merge these together.

didn't know about it
looks very similar

  • the prefix in my pr is opentelemetry.io/resource. instead of resource.opentelemetry.io/ - I don't have a strong preference
  • I also have support for common k8s variables (see description)
  • I think I've handled more edge cases in my pr

@jaronoff97
Copy link
Contributor

I think i prefer the resource.opentelemetry.io/, and agreed, I think your PR handles more. I'm going to close that issue and PR in favor of this one.

@zeitlinger
Copy link
Member Author

resource.opentelemetry.io/

changed

@jaronoff97 jaronoff97 added discuss-at-sig This issue or PR should be discussed at the next SIG meeting and removed needs triage labels Aug 28, 2024
@jaronoff97
Copy link
Contributor

@zeitlinger i added the discuss-at-sig label as it seems from Tyler's comment on the PR that there's some bigger picture stuff we need to figure out in order to not break users. We have a SIG meeting tomorrow (8/29) at noon EST where we will discuss this.

@zeitlinger
Copy link
Member Author

@zeitlinger i added the discuss-at-sig label as it seems from Tyler's comment on the PR that there's some bigger picture stuff we need to figure out in order to not break users. We have a SIG meeting tomorrow (8/29) at noon EST where we will discuss this.

great - I'll join

@jaronoff97 jaronoff97 removed the discuss-at-sig This issue or PR should be discussed at the next SIG meeting label Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:auto-instrumentation Issues for auto-instrumentation enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants