-
Notifications
You must be signed in to change notification settings - Fork 895
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
Define the fallback tracer name for invalid values. #1534
Define the fallback tracer name for invalid values. #1534
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a changelog entry. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally I would prefer to use "" as a fallback and treat that as invalid value
. That way we are consistent with our protocol as well.
I think it's worth comparing this with a missing service name, which is quite bad and we already have some fallback value for it. A missing/blank instrumentation library feels very much meh, i.e. a blank string would do just fine as a fallback with very little downside. |
Co-authored-by: Armin Ruech <[email protected]>
Co-authored-by: Armin Ruech <[email protected]>
Indeed, I had considered this as well, and was wondering whether we should try to go with "unknown_name" or a similar one, to be in line with that a missing service name ends up doing ;) |
The now says that a missing service name is not an error (just an unknown service name), while a missing instrumentation name is an API usage error. Note that a missing service name naturally appears by doing nothing in particular while you have to decide to pass an empty string or null to GetTracer to get an invalid instrumentation name. |
specification/trace/api.md
Outdated
null or throwing an exception. | ||
default Tracer implementation MUST be returned as a fallback rather than returning | ||
null or throwing an exception, and `name` SHOULD be the set to the | ||
"`<INVALID INSTRUMENTATION NAME PROVIDED>`" literal, in order to signal that the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"`<INVALID INSTRUMENTATION NAME PROVIDED>`" literal, in order to signal that the | |
string `<INVALID INSTRUMENTATION NAME PROVIDED>`, in order to signal that the |
@carlosalberto Please add a changelog entry that this fallback is now specified for SDK implementations. |
@Oberon00 @carlosalberto can you please document why empty string is not good? When it comes to receiving empty string from a source what does that mean? I would vote for empty string since it means less unnecessary bytes on the wire and this case has to be treated by the receiver anyway. |
From the discussion today: we want to allow the user passing |
@open-telemetry/specs-approvers Please re-review ;) |
@carlosalberto pls resolve couple suggestions from @yurishkuro before merging. Thank you! |
Co-authored-by: Yuri Shkuro <[email protected]>
Fixes #1472
Keeps the original invalid value (to be handled by the backends instead), while asking implementations to log this as an error.