-
Notifications
You must be signed in to change notification settings - Fork 904
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
Clarify that IsValid and IsRemote are APIs on SpanContext #771
Conversation
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
@@ -14,6 +14,8 @@ Table of Contents | |||
* [Tracer](#tracer) | |||
* [Tracer operations](#tracer-operations) | |||
* [SpanContext](#spancontext) | |||
* [IsValid](#isvalid) |
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.
I know I missed that we had IsValid (#753), but I think this was my mistake. It is actually clear enough in the spec already IMHO. If we add headings for IsValid and IsRemote, we should also add headings for SpanId, TraceId, TraceFlags, TraceState, and that would be a lot of headings.
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.
They will come because there is an issue about format of trace id / span id formats that we expose. Tried to keep PRs small :)
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.
I'm approving because I don't want to have this hanging in the air and I don't think it's making the spec worse, but I think the clarification is not really needed either.
Trivial change, don't have to wait 48h :) |
I think that this information (isValid) is kind of duplicate and redundant. if this "api" is meant to return true only if spanId and traceId are valid what is really the purpose of keeping this extra information on context - this sounds for me like really redundant thing. This information can be simply checked by some helper function so no reason to keep it on context. WDYT ? |
@obecny The spec does not specify how it should be implemented but I'm pretty sure the intended way is indeed exposing a helper function checking spanId and traceID just as you mentioned rather than storing an actual flag. |
…etry#771) Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
Signed-off-by: Bogdan Drutu bogdandrutu@gmail.com
Updates #753
Changes
Clarifies that
IsValid
andIsRemote
are APIs.