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

[demo] Set service.name based on the app.kubernetes.io/name value #1383

Open
rogercoll opened this issue Oct 14, 2024 · 2 comments
Open

[demo] Set service.name based on the app.kubernetes.io/name value #1383

rogercoll opened this issue Oct 14, 2024 · 2 comments
Labels
chart:demo Issues related to opentelemetry-demo helm chart

Comments

@rogercoll
Copy link
Contributor

At the moment, the service.name value is set with the value of the well-known app.kubernetes.io/component label.

app.kubernetes.io/component def: The component within the application architecture. Given example: app.kubernetes.io/component: "database"
app.kubernetes.io/name def: The name of the application. A non-unique name.
https://kubernetes.io/docs/reference/labels-annotations-taints/

Sample labels:

Labels:           
                  app.kubernetes.io/component=cartservice
                  app.kubernetes.io/instance=my-otel-demo
                  app.kubernetes.io/name=my-otel-demo-cartservice
                  opentelemetry.io/name=my-otel-demo-cartservice
                  pod-template-hash=5cbd96f4c5

service.name semconv definition: Logical name of the service. MUST be the same for all instances of horizontally scaled services.

If I have multiple otel-demo deployments and I want to scale a specific's deployment services, I would be scaling based on the my-otel-demo-cartservice (app.kubernetes.io/name) value, not on the component's value as it would mean scaling all the cluster deployments. The component label seems a very high level attributes to base the service.name value on.

What do you think if we set the service.name value on the app.kubernetes.io/name label instead?

On going semconv proposal: open-telemetry/semantic-conventions#236

@TylerHelmuth TylerHelmuth added the chart:demo Issues related to opentelemetry-demo helm chart label Oct 15, 2024
@rogercoll rogercoll changed the title [demo] Set app.kubernetes.io/name based on the service.name value [demo] Set service.name based on the app.kubernetes.io/name value Oct 16, 2024
@puckpuck
Copy link
Contributor

We only support installing the demo once within a namespace. Scaling mechanisms should be able to target workloads to specific namespaces only.

@thomheymann
Copy link

Based on my findings in https://github.com/elastic/observability-dev/issues/3864#issuecomment-2511471566 this change would also make the service name consistent with the way it is set by Elastic Agent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chart:demo Issues related to opentelemetry-demo helm chart
Projects
None yet
Development

No branches or pull requests

4 participants