-
Notifications
You must be signed in to change notification settings - Fork 893
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
Specify IsValid and IsRemote as required #914
Specify IsValid and IsRemote as required #914
Conversation
Please fix this more generally. Right now the spec also says
Is this a MUST?
Are both identifiers a MUST? Are TraceFlags and TraceState a MUST? etc |
@Oberon00 In contrast to the two mentioned APIs, which I could interpret as "suggesting names and behavior", if implemented, the other parts can only be interpreted as given IMHO. If it would say "The OpenTelemetry SpanContext representation MUST conform to the W3C TraceContext specification.", this would impose a MUST on the spec itself (which wouldn't make any sense), rather than implementations, wouldn't it? |
You could simplify+clarify this at once by just saying "SpanContext MUST conform to the W3C TraceContext specification". The sentence you suggested does indeed sound odd. |
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.
Approving this, because while incomplete it is an improvement over the current situation.
@Oberon00 Personally I think the current wording is fine. "SpanContext conforms to the W3C TraceContext spec" implies that anyone implementing it will also have to conform to it. When the spec says "SpanContext contains two identifiers", an implementation that only implements one is not implementing SpanContext. The section is about defining SpanContext itself and not the requirements for how SpanContext should be defined by the spec. |
@@ -195,16 +195,15 @@ The API should not expose details about how they are internally stored. | |||
|
|||
### 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.
Can we just add the sentence "The API MUST provide all operations specified in the following subsections" instead?
Does it say anywhere that SpanContext MUST be implemented? |
It says:
|
Overall LGTM. Maybe you want to apply @Oberon00's suggestion in order to not have to use MUST for every operation ;) |
@arminru Please rebase too ;) |
@carlosalberto I think the current wording is quite fine. If I put that sentence in the section above, I would still have to write something like "There MUST be an API ..." or "An API ... MUST be provided" or at least "The API ... is defined as ...". Otherwise it will just be an odd sounding mention of some behavior, so we wouldn't save any spare words here. The original wording does not really make up proper sentences:
|
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.
lgtm
@@ -47,6 +47,8 @@ Updates: | |||
([#611](https://github.com/open-telemetry/opentelemetry-specification/pull/611)) | |||
- Version attributes no longer have a prefix such as semver: | |||
([#873](https://github.com/open-telemetry/opentelemetry-specification/pull/873)) | |||
- Explicitly specify the SpanContext APIs IsValid and IsRemote as required |
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.
Do we really need a changelog entry for such clarifications?
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 didn't add one at first but then thought it couldn't hurt to make SIG maintainers aware of it, just in case they interpreted it differently in the past. Not all have filled out the compliance matrix yet and adding the entry was easier than inspecting the missing repos.
@arminru Please rebase so we can merge it. |
Fixes #908.
I explicitly specified both APIs as required, which I think was the initial intention.
According to the spec-compliance-matrix, only JS is known to not have implementedIsValid
.--> implemented in the meantime
Apart from that, I slightly reworded
IsRemote
to not have the API spec dictate how it should be implemented.