-
Notifications
You must be signed in to change notification settings - Fork 886
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
Merge SpanContext into DistributedContext #211
Comments
After talking about this offline with @reyang and @toumorokoshi, the tl;dr as I understand it is this: The W3C trace context is unlikely to change much before being adopted as a W3C recommendation, and it's generally safe to build against the current spec. The trace context includes the We shouldn't put trace data in the correlation context because we don't expect correlation context to be adopted as widely as trace context, and applications may choose to drop data from the correlation context or replace it with their own data. |
@toumorokoshi IIRC you suggested making propagators de/serialize the trace and correlation context in the same call instead of having separate types for each type of context. Would that solve this issue? What new problems would that introduce? |
Yep, that's what I'm planning on doing. I think the guidance from Gitter was to code a proposal to share. I'm fine closing this issue for now, since I no longer believe that this is the right approach, and no one else is championing it. |
After spending some time working on implementing propagators, there's a pattern that feels a little weird to me: the fact that propagators can return back both SpanContext and DistributedContext. I think this is because having to have two context propagation objects is more difficult to understand: there may be a chance to simplify here.
Specifically, I don't think there's anything in SpanContext that precludes it from using the DistributedContext. This could look like:
There are a few major benefits here:
If we go through with this, there may be value in passing in an existing DistributedContext object into extract. This enables multiple HTTPTextFormat or BinaryFormat propagators to add to the same object, enabling easy composition of multiple propagators.
The text was updated successfully, but these errors were encountered: