-
Notifications
You must be signed in to change notification settings - Fork 889
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
Proposal: remove restriction that SpanContext must be a sealed/final class #970
Comments
I would vote for making this P1 @open-telemetry/technical-committee. We need a decision here. See also linked PR #969 |
from the issue triage mtg today with TC, marking this as P1 because we need to make a decision on this issue by end of day today @bogdandrutu |
I've always been +1 to have SpanContext as interface. Do we have written explanation somewhere why that would be a bad thing? |
@yurishkuro See rejected OTEP open-telemetry/oteps#58 |
Thanks for the link. From what I can see there, there were no convincing arguments why SpanContext as interface would be bad, aside from the ref-counting in C++ argument, which seemed to be resolved in that discussion. |
I'm fine with un-sealing it too. |
"Unsealing" is ok as long as the contract specifies:
One of the reason we wanted it to be "sealed" was that we don't want to deal with any random length for traceid/spanid/flags etc. And it was one of the most important thing we agreed on during the initial merging requirements between OC and OT. |
Sounds fair to me. |
I think the spec that requires
SpanContext
is too limiting to language authors since it brings language concerns (class inheritance) into the cross-language spec. Languages may have a language-specific reason to allow a non-sealedSpanContext
. For example, in Java, we have a need to hide the implementation ofSpanContext
from a user app to prevent compatibility issues between auto instrumentation and the app which without special care, can share classpath and have collisions. This can be done efficiently ifSpanContext
is an interface - two interfaces, one in the app, the other in the agent, but one implementation generated by the agent. Otherwise, we are stuck with two implementations, that copy between each other. In some sense, the fact that we rewrite the usage ofSpanContext
by a user through severe bytecode manipulation already seems to be incompliant with the spirit of this spec of wanting only one implementation of `SpanContext. This is an issue specific to Java instrumentation - I'd recommend the spec not be a blocker in creating solutions to such issues.The text was updated successfully, but these errors were encountered: