-
Notifications
You must be signed in to change notification settings - Fork 566
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
Not able to propagate baggage in OpenTracingSpan #6970
Comments
The reason seems to be that OpenTracingSpan holds a final for the 'context' as it existed at that time in the constructor. So all baggage added to the span is never seen in the outdated context, even though it's retrievable with span.baggage("key") because that call asks the delegate. But if I add a span.activate() and use Span.current().orElseThrow().context() then it works as expected. The reason is that a new OpenTracingSpan is created by Span.current, so it now uses the most recent context. |
This looks related to PR #6692 |
I agree if by related you mean, before 6692 we couldn't put and get baggage at all. Now with this latest finding above you can find baggage on the Span that you added to a OpenTracingSpan. But the bug is that the baggage you can see doesn't get propagated unless you somehow acquire a newly created OpenTracingSpan. And the easiest way to do that is to activate the span, then call Span.current(), and not depend on the context() from the old Span where you actually created it. |
The reason this issue actually involves a bug in OpenTracingSpan is because I can't get helidon-tracing-jaeger to work for me, see #7009 As a workaround I'm using the following set of dependencies to "actually" use opentracing, not pseudo-opentracing that bridges to opentelemetry.
|
This issue is NOT fixed when using the dependencies above. Should I file a new issue for when jaeger-client is in use? |
I'm not able to propagate baggage items when opentracing is used in io.helidon.tracing.
Environment Details
Problem Description
Even though the baggage item I add to the span is retrievable from the span, it doesn't propagate to the remote endpoint.
See sample test code below.
Steps to reproduce
The text was updated successfully, but these errors were encountered: