-
Notifications
You must be signed in to change notification settings - Fork 647
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
No-op span ID generation #159
Comments
I think we should just forwad the TraceContext headers as-is (if at all). I think the specification backs me up: In https://www.w3.org/TR/trace-context/#design-overview:
The more specific wording is is in https://www.w3.org/TR/trace-context/#mutating-the-traceparent-field:
(bold & cursive added by me) Apart from the spec, I don't see the added value in deliberately going out of our way to break the parent-child chain in traces. |
Not sure if the pass-through behavior was intended ONLY for proxy scenario (where one incoming call results in one outgoing call), or if this applies to a normal service scenario: If service A calls B using |
That's the consequence: They have the same trace-parent P. Basically the whole uninstrumented service U reuses the node of the parent and one can no longer distinguish whether some service C was called directly from P or through U. |
It just came to my mind that with sampling we potentially have the very same behavior when some intermediate span is not sampled. EDIT: Or do we break the trace in these cases? I'm not up to speed with the sampling spec. |
I can see one difference - if I see service C being called several times using the same trace-parent, I know it must have to do with some broken thing between P and C. |
In practice, usually that would indeed indicate that something is broken. But in theory, you can do the following (pseudo-python because I'm lazy): with tracer.start_span('call hello') as span:
headers = dict()
propagators.inject(span.get_context(), headers, headers.__setitem__)
myuninstrumentedhttplib.get('http://example.com/hello', headers)
myuninstrumentedhttplib.get('http://example.org/hello', headers) # Call another service with the same parent |
Blocking on some decisions in spec, W3C. In particular whether/how the context is propagated in the API package. |
Is this defined by the spec yet? The behavior we've chosen now is that extensions create a new (no-op in the case of no SDK) span. |
I'll follow up on this issue to find the spec issue. |
|
Our existing propagation unit tests covers this scenario here: opentelemetry-python/opentelemetry-api/tests/propagators/test_global_httptextformat.py Lines 63 to 68 in 872975b
|
Closes open-telemetry#159 Signed-off-by: Olivier Albertini <[email protected]>
The text was updated successfully, but these errors were encountered: