-
Notifications
You must be signed in to change notification settings - Fork 894
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
Recommendation for service.name to be autodetected when not manually set #3210
Comments
After reviewing previous issues I see why this decision was made. I do wonder if it could instead be up to the auto instrumentor to decide if they want to provide a better default value for the user in case it's needed as in my case. The other option I suppose would be for the user to decide if they really do want a fallback or default as part of configuration. |
I agree with issue and I do not think that it is only applicable for ASP.NET. It is not rare the instrumented application works on top some "hosting process" such us However, some ecosystems could bring some useful defaults. This would be extremely useful especially for auto-instrumentations.
Option 1 (resource detectors)I think that the spec allows using additional "resource detectors". I guess we can create/use more detectors that would set the Am I correct? If not then GOTO: option 2 Option 2 (allow other names)Alternatively , we can change in the specification to allow different values than E.g.
Would such change in the specification be seen as backwards compatible? The |
Big +1 to this because I already thought this was the spec and not that it was simply "user defined or unknown".
In Erlang we use the OTP Release name and version for the service name because this is basically always what is wanted and the user can override with configuration or the environment variable. So I wouldn't want it to be "recommended", it should still be "required", but allow for well defined name and versions to be used from a particular language or framework. |
From the spec triage meeting - @carlosalberto will follow up |
This is how I view it. I don't think that any change is required unless we want to clarify that users can use resource detectors to detect any resource attribute. The requirement that the SDK provide an ultimate fallback is only there because the |
From 07-2023-03-07 OTel Spec SIG meeting It is acceptable to use resource detectors which is already done e.g. by Java . The SDKs should apply the the resource detectors before falling to the There was no consensus if it needs to be explicitly defined in the specification. |
@open-telemetry/specs-approvers I think this issue can be closed. |
What are you trying to achieve?
I believe changing service.name to Recommended instead of Required will allow SDKs to properly set the values when not found to an appropriate default instead of (unknown_service). This is a terrible default for many cases. One in particular is an AspNet Framework application that uses (see: open-telemetry/opentelemetry-dotnet#2781).
There are many other cases where there is not an appropriate way to set the service.name at a feasible default when it is not specified or specified ONLY by an Environment variable.
What did you expect to see?
service.name should be set as Recommended instead of Required. This will allow SDK libraries to set defaults when the user hasn't specified them, or they are unable to specify them in certain cases.
Additional context.
Other tickets that have problems when service.name should not be required
1
2
3
4
See an appropriate default set here by the splunk library.
The text was updated successfully, but these errors were encountered: