-
Notifications
You must be signed in to change notification settings - Fork 896
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
Make creating new spanids for server spans optional #359
Comments
pulling in conversations around this that are occuring in the original python ticket: open-telemetry/opentelemetry-python#236 (comment)
@Oberon00 I don't disagree, but at the same time I think that support for the standard propagation systems is critical to OpenTelemetry's success. My company uses B3 headers internally, and it will be very difficult to argue our continued contribution to OpenTelemetry knowing that we can't really use it without widespread standard changes to all of our services. |
One thing to note is that this would have implications for sampling. For example, when merging OTEP 6, the attributes argument was added so that informed sampling decisions can be made. This argument would then probably be required for the extract call. Of course, this also interacts with open-telemetry/oteps#66 "Separate Layer for Context Propagation" (almost everything does, it seems). So assuming we would currently have |
Is that sample choice necessary? I figured that the Span could be annotated with various metadata that would be available to the SpanProcessor to decide whether to propagate. Is the concern this line?
I figured that the integration is responsible for STARTING the span, just not creating one. would that solve that issue? |
Just as a point of discussion, I'm wondering if we have to support shared IDs between client and server spans. The worst thing that will happen if we don't support the shared ID use case, is that RPC spans in Zipkin backends will be represented as two operations. I imagine that other non-Zipkin tracing backends will have issues with shared span IDs, but may want to be able to use B3 as a propagation format for interoperability purposes. I'm not sure this is the right thing to do, but it could be an option to consider. |
+1 to what @mwear said - to my knowledge Zipkin backend/UI will function just fine if the server span gets a new ID. In the worst case, this can be a configuration parameter to the SDK, which is how Jaeger SDKs support compatibility with Zipkin's shared span model - when a new span is started AND is tagged as server kind, the tracer reuses the inbound span ID for the server span. |
I just checked with my team and we're using B3 propagation, but chose not to emit the same spanid because of the desire to actually evaluate the server's understanding of the timing separate from the client. Since no one has really spoken up to the value of supporting shared span IDs, I guess it's not worth tackling or changing spec to enable yet. In the meantime though, I'll be filing a PR to make the need for spawning a new span id on servers explicit in the spec. |
Fixes open-telemetry#359. Standardizing the behavior of the creation of server span ids helps ensure server behavior will be the same regardless of the language used. In practice, the negative consequences of SpanID being different for client and server in storage systems that expect it are minimal, at worst appearing as separate spans.
We've been working toward implementing B3 propagation properly, and have encountered a need to clarify the expected behavior for server spans.
Link for more info: open-telemetry/opentelemetry-python#236
Background
B3 propagation explicitly states the need for server spans to share the span id of the client span. This is done to enable joining them together for the consumer (I believe zipkin is the practical example here: https://zipkin.io/pages/instrumenting.html)
https://github.com/openzipkin/b3-propagation#overall-process
Although I don't see a lot of explicit mentions, I believe this contradicts the behavior that tracecontext is advocating, which is different span ids for client and server spans. I don't see mention of this in the w3c spec, but it was called out here:
https://github.com/open-telemetry/opentelemetry-specification/blob/27b738b74eeb10560dc0308554a1d626cb93df79/specification/data-rpc.md#grpc
Proposal
This ticket should be a general discussion for the problem, but I'll throw at a proposal to kick off the discussion.
I am proposing that the specification explicitly calls out that integrations / extensions should NOT create new spans, instead deferring that responsibility to the propagator. This then delegates the control of whether to create a new span or not to the propagator, enabling both B3 and tracecontext in OpenTelemetry.
The text was updated successfully, but these errors were encountered: