-
Notifications
You must be signed in to change notification settings - Fork 720
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
tracing-opentelemetry: Add opentelemetry::Context
propagation
#2345
base: master
Are you sure you want to change the base?
Conversation
opentelemetry::Context
propagation
assert_eq!( | ||
OtelContext::current().span().span_context().trace_id(), | ||
trace_id | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inner_span
is not holding a parent, this currently evaluates to None
:
if let Some(parent) = attrs.parent() { |
@jtescher any thoughts as to why the test is preventing a Lines 71 to 76 in eca60a6
Am I missing something in the test harness? tracing/tracing-opentelemetry/src/subscriber.rs Lines 1232 to 1254 in eca60a6
These are the logs:
|
Hm this approach may actually have to be re-assessed, dropping the otel context guards will replace the previously active context so the order dependence of entering and exiting will likely cause issues. |
Would having access to the |
Motivation
After some discussion as to the motivation of this PR: open-telemetry/opentelemetry-rust#893
an alternative solution was proposed for allowing spans to implicitly propagate otel context:
Allow spans to propagate and drop otel context IDs when spans are entered and exited
Solution
Add
otel::Context
toOpenTelemetrySubscriber
foron_enter
andon_exit