-
Notifications
You must be signed in to change notification settings - Fork 888
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
Consider using Context as the unique way to specify parenthood #510
Comments
Context
For the same reasons we have a |
I support this motion. |
I think we should at least remove the SpanContext option, mainly because of the issues outlined in open-telemetry/oteps#58. If we want to go further, after that, we can actually remove SpanContext completely from any public facing API (methods to get span+trace ID move to Span, sampled flag and tracestate is better hidden away in the context anyway). And then it's a small step to remove Span and replace it with tracer operations that take a context argument (see open-telemetry/oteps#73, open-telemetry/oteps#68). |
Supporting passing a Span is important for user that don't want to use |
I don't think that's a good argument. Why should we support users who don't want to use Context? Why would users not want to use Context? |
Inspired by @anuraaga's comment #875 (comment), an alternative which I think is less elegant but certainly more compatible, is to store a (parent) Context in the SpanContext. Then we can continue passing just SpanContext and we will still be able to pass information from extract to inject. Of course, if the user wants to add more info to the Context in-between, it would still be better to use Context. |
from the maintainers mtg discussion today, talked about this issue and the related PR #875 and it was decided to bump this to P1 to concentrate on the decision if this is necessary for spec trace freeze. cc @carlosalberto @tedsuo |
I would be in the support of this as well. I think removing parenting via span context is the easiest and least controversial parts of this proposal. In a post OTEP-66 world, having a handle on a span context, but not the span, or a context is going to be very uncommon. Removing the ability to parent by a span is slightly more controversial, but likely necessary if correlations, or anything else from the context need to be accessed at span start or span finish time. This will impact use cases where context is managed explicitly and has implications for the languages that support Tracer.withSpan() or similar functionality. I think overall, this will prevent bugs and expected surprises when trying to parent using a span alone. |
from the maintainers mtg today, assigning to @Oberon00 since he has an open pr on this |
…open-telemetry#510) (open-telemetry#1079) * Update compliance matrix for open-telemetry#510. * Java implemented this already. * Add: SpanProcessor.OnStart receives parent Context
At this moment,
CorrelationContext
andSpan
instances being created can explicitly specify their parent:As part of OTEP 66, we could remove these and have a single one specifying
Context
:The text was updated successfully, but these errors were encountered: