-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
OpenTelemetry: context of sender not active in consumer #38061
Comments
/cc @brunobat (opentelemetry), @radcortez (opentelemetry) |
I'm also facing this issue (the other way around,: an HTTP Request that uses However, I'm not sure if it's a bug or an enhancement request. The docs (here and/or here) says that only |
I stumbled upon the same problem. My way to work around it is to pass @ConsumeEvent("TEST-EVENT")
public String testEvent(MyEventObj event) {
try (var _ = event.getOtelContext().makeCurrent()) {
// do work
}
} Would love to have this implicitly done by the EventBus itself. |
I faced the same when blocking = true or virtualThread= true. |
Describe the bug
When a
@ConsumeEvent
method is executed the OpenTelementry context of the sender is not active.The result of this is that logging MDC, and further calls do not get a tracing context.
Annotating the method with
@WithSpan
does activate a context, but it is not based on the existing context.Stepping though the code I can see that the underlying Vert.x Message does have the existing context stored in the
trace
field.Expected behavior
The Opentelemetry context of message sender is active, a new span is created when
@WithSpan
is used.Actual behavior
@WithSpan
activates a context, but it is not based on the context of the sender.Without
@WithSpan
no context is active, and rest client calls does not get a traceid.How to Reproduce?
A reproducer: https://github.com/computerlove/quarkus-trace-mdc-eventbus
It creates a Thread that first set up a OpenTracing Context, sends a event bus message, which sends a rest request.
Output of
uname -a
orver
na
Output of
java -version
21
Quarkus version or git rev
3.6.4
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: