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

Open
zeitlinger opened this issue Jul 8, 2024 · 4 comments · May be fixed by #3204
Open

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

zeitlinger opened this issue Jul 8, 2024 · 4 comments · May be fixed by #3204
Labels
area:auto-instrumentation Issues for auto-instrumentation enhancement New feature or request needs triage

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

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 needs triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants