-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 service.name resource attribute to the collector's own telemetry #6152
Add service.name resource attribute to the collector's own telemetry #6152
Conversation
7ddfc9f
to
2927551
Compare
@jpkrohling looks like builder is failing because it imports a specific version of the Collector instead of the latest code in local directory (and the previous version doesn't contain the newly added BuildInfo.ServiceName field). Should we change builder to import latest Collecor or there is some other thinking behind this that I am not aware? [UPDATE]: nevermind. Discussed with Bogdan and eliminated this change from the PR. All is good. |
6c92422
to
3cd1854
Compare
Codecov ReportBase: 91.87% // Head: 91.77% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #6152 +/- ##
==========================================
- Coverage 91.87% 91.77% -0.11%
==========================================
Files 219 217 -2
Lines 13533 13359 -174
==========================================
- Hits 12434 12260 -174
Misses 870 870
Partials 229 229
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
I think we have 3 open questions:
Seems like we have different opinions here. Perhaps other @open-telemetry/collector-approvers and @open-telemetry/collector-contrib-approvers can chime in and suggest some arguments that help us answer these questions (i.e. provide some motivation why you think so)? |
Who do you ask for? Every distro can do what they want. If a distro owner comes and ask me, I would suggest a different service name since is a different service (even though has lots of common things with the core service).
I think so.
I've never seen a long name like |
The specification says of It also describes related fields, including My interpretation of this is that Applying this to Tigran's questions, I think |
Why? I think the configuration in the end should belong to the final user and not to the distributor, since this is a service deployed/monitored by that user not by the distributor. If the distributor also deploys this for the final user they control the config so they can do whatever they want. |
Ok, fair point. I guess I'm confused about whether the |
We do support this already in the end user config. You can specify However, |
I am asking on behalf of the end user. What is the best from their perspective? If they happen to deploy Collectors from different distros do they want them to appear as the same service or as different services in their backend? |
My two cents:
Ultimately the user should have the ability to set whatever
Sure, but I don't have strong feelings on this at all.
I'd vote shorter name as the default. |
Yes, that's exactly what we already do in this PR. We allow the user to override |
Yup, I'm agreeing with this PR's implementation. As for actual default value, I'll put a vote in for |
I see a lot of support for using |
342e359
to
b6b5b2c
Compare
Resolves open-telemetry#6136 - The default service.name is set to BuildInfo.Command (equals to "otelcol" for this repo). - The service.name can be overridden by the end user via telemetry config setting.
b6b5b2c
to
6373d16
Compare
@open-telemetry/collector-approvers I changed the default for |
Hi!. Can anyone please tell me in which section of the configuration the service.name can be set? Unfortunately I had no luck finding it in the documentation. Thank you! |
As far as I remember: service:
telemetry:
resource:
service.name: <any string here> |
I was surprised to find that setting |
@sjparkinson that is because the Collector doesn't use the Go OTel SDK by default yet (but we're almost there). If you enable the featuregate to use the Otel Go exporter then those env vars should work. |
Resolves #6136