Open cce opened 7 years ago
@JonathanMace pointed out that during the DT workshop in February he already opened tickets for adding a reference partway through (#42) as well as a response-path reference type (#43), so this ticket is redundant.
Jonathan also has a cool picture in https://github.com/opentracing/specification/issues/42#issuecomment-281665745
I'm curious if there would be interest in adding a "ParentOf" reference type for modeling cases where context is propagated upstream from a child to a parent span, rather than from parent to child as "ChildOf" models.
This line of thought comes from discussions we had at the last distributed tracing workshop with @JonathanMace about comparing the OpenTracing model to his research on event-based models like X-Trace that support a wider array of reference types like fan-in, spans that are batched together, etc.
You could imagine using "ParentOf" to capture context that was propagated upstream in response headers, using Inject/Extract as with request headers. (This could also open the possibility of propagating baggage upstream as well.)
To do it, I believe you would need a way to add references to an existing span, which I don't see in the spec — I only see a way to add references when you start a new span. The spec does say this though about future reference types:
I could imagine that to support a future reference types for spans that are batched together, you might also want to be able to call
Span.AddReference()
to add references after a span has already been created, e.g. if you don't have the whole batch of references available when creating the new span, or need to iterate over them.Loosely-related ticket proposing a reference type between traces: #51