-
Notifications
You must be signed in to change notification settings - Fork 17
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
Decide if service.name
should be required
#11
Comments
@tsloughter is erlang setting it via a resource detector or is the SDK detecting the service name? |
Initially I was in favour of making it required because the config file is expected to wholly be used by itself and not be layered with other configuration sources (eg env vars or SDK options). Making However, setting |
Can still achieve this by doing something like:
|
@MikeGoldsmith right, re-using this config would require
|
... what @jack-berg said 😄 |
@codeboten the SDK's resource detector runner does it after running all detectors. |
Ah, that is nice. Thanks for pointing out how to evaluate env vars 👍🏻 |
I'll have to check if any others do similar to Erlang. I can't imagine we are the only ones who are able to get the service name without the user essentially setting it twice. |
I asked around and one other is .net which also has the ability to discover the service name https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/blob/6f4e6a67994d8b042f74351c828b4e2b115079c7/src/OpenTelemetry.AutoInstrumentation/Configurations/ServiceNameConfigurator.cs#L24 |
Resolved by #68 Please close. |
It isn't required to set
OTEL_SERVICE_NAME
, however the SDKs will setservice.name
to unknown_service when it isn't configured. Making it required allows users to correctly set it upfront, rather than finding out later that the service name isn't set.That being said, there are a few different mechanisms out there that set the service name automatically (i.e. resource detectors)
Originally posted by @tsloughter in #6 (comment)
The text was updated successfully, but these errors were encountered: