Skip to content

chore(Telemetry): set service.name from in telemetry release.name #1701

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Syndlex
Copy link
Contributor

@Syndlex Syndlex commented Jun 2, 2025

set service.name in telemetry from release.name

the default value is "otel-contrib" and this is irritating in telemetry values

@Syndlex Syndlex requested review from dmitryax, TylerHelmuth, povilasv and a team as code owners June 2, 2025 15:17
@@ -12,4 +12,4 @@ maintainers:
- name: jaronoff97
- name: TylerHelmuth
icon: https://opentelemetry.io/img/logos/opentelemetry-logo-nav.png
appVersion: 0.127.0
appVersion: 0.127.1
Copy link
Contributor

Choose a reason for hiding this comment

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

you need to change the chart version not the app version here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

wow sorry.

Never contribute after 9 hours of work.

the default value is "otel-contrib" and this is irritating in telemetry values
@Syndlex Syndlex force-pushed the chore/service_name branch from 5e13d2a to 1cd2ed1 Compare June 3, 2025 06:20
@Syndlex Syndlex requested a review from jaronoff97 June 3, 2025 06:35
@@ -43,6 +43,11 @@ metrics:
{{- end }}
{{- end }}

{{- define "opentelemetry-collector.telemetry.resource" -}}
resource:
service.name: "{{ .Release.Name }}"
Copy link
Member

Choose a reason for hiding this comment

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

I'm not actually sure whats typical for OTel's service.name semantic and a helm install. Should it be the release name or the fullname?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that's a create question.
I like name more. Because in full name I always have Somethink like "PROD-"
Everything is better than "otel-contrib"

Copy link
Contributor

Choose a reason for hiding this comment

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

If the default service.name was functional in previous releases, this could be a breaking change and should be documented in release notes. Users may have alerts tied to the current service.name value, especially for collector internal metrics.

I’d suggest using fullname instead, as it matches the collector’s k8s service name and better supports multiple chart instances in the same namespace or as subcharts. Open to considering all options though.

Copy link
Member

Choose a reason for hiding this comment

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

Oh good point, I forgot the collector had a default service name.

@Syndlex we need to make this optional.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What was the default service name?
When I do not set anything it is "otel-contrib" for me.
In my eyes this is would be wrong.

Optional would just mean don't setting it. Because it's setable from the current chart.

Copy link
Member

@TylerHelmuth TylerHelmuth Jun 6, 2025

Choose a reason for hiding this comment

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

When I do not set anything it is "otel-contrib" for me.

ya this is the default for the otel-contrib distro. For the k8s distro it would be otel-k8s.

We can't automatically set a new value for users since it will change their internal telemetry. They might have triggers, SLOs, boards, or other things that are expecting otel-contrib.

I agree it is already settable in .Values.config, but a lot of people don't realize you can do that. We could offer an option in the chart like serviceName: "" that when unset does nothing, but when set automatically configures the resource.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants