-
Notifications
You must be signed in to change notification settings - Fork 783
Trace information is missing when exception is thrown from JmsListeners methods #1663
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
Comments
I wonder how My point is that even if we merge spring-projects/spring-amqp#1287 one day, it's approach is not going to help here. On the other hand we can't merge that fix yet because it is a big breaking change in behavior. And from here I crave to know how it is instrumented for Thanks for understanding! |
Sorry, Spring Kafka provides proxy feature for listener. It comes as a feature of the
Well, any way I think you do advising only of the listener method anyway, not including error handling: https://github.com/spring-cloud/spring-cloud-sleuth/blob/master/spring-cloud-sleuth-brave/src/main/java/org/springframework/cloud/sleuth/brave/instrument/messaging/SleuthKafkaAspect.java#L103. Therefore what you are asking is just out of support at the moment everywhere. |
For spring-kafka we added the ability to decorate the consumer/producer spring-projects/spring-kafka#1520 We could do something similar for |
However, Since we already wrap |
Here is what we have for JMS: https://github.com/spring-cloud/spring-cloud-sleuth/blob/master/spring-cloud-sleuth-brave/src/main/java/org/springframework/jms/config/TracingJmsListenerEndpointRegistry.java#L226. So, probably the result is the same - the error handling is not included into a tracing context. |
I took a quick look at this, as it was kind of expected, it seems this is caused by the same thing, the error handling happens after the Span is closed, I created a sample project for it using the JMS Example: https://github.com/jonatan-ivanov/sleuth-gh-1663 This is where the tracing instrumentation happens: TracingJmsListenerEndpointRegistry.java#L274-L284 |
I'm closing this in favor of spring-projects/spring-framework#26532 |
Describe the bug
When an exception is thrown from a method annotated with @JmsListener all trace information is lost when it reaches the any implementation of error handler.
Tested on Spring Cloud Sleuth 2.2.3.RELEASE version.
It looks like the cause may be the same as in #1659 and #1660.
The text was updated successfully, but these errors were encountered: