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
ObserverExceptionHandler for non async observers #29429
Comments
Standard CDI sync observers throw an exception and show you the track trace. |
I don't remember but we should at least log the exception cause as Weld does. |
Looking some more into the original issue, I think the reason might have been to reduce the noise from observer methods that can (deliberately?) sometimes throw an exception.
I agree. I wouldn't even mind showing the whole error but due to the above, I don't think I'll get by with that :) |
The root cause class and exception message should be enough. |
Description
I am facing a production issue right now, where all my log says is:
(I removed the FQCN, and replaced them with placeholders).
The above log is obiously not enough to figure out what the original exception was. Was it a TimeoutException while publishing to RabbitMQ, or was it a LazyInitException from some hibernate entity? The range of possibilities is simply to wide figure it out with this limited information.
I am not going to activate debug logging on the production system every time I face this issue. I need a solution which I configure once, and it just works.
Also, how it is implemented right now, this would lead to 2 lines logged. One error (the one above), and one debug.
The debug logs are not going into our usual monitoring solution - I would need to see the logs on the prod system.
This is where the logging is happening:
quarkus/independent-projects/arc/runtime/src/main/java/io/quarkus/arc/impl/EventImpl.java
Lines 473 to 480 in ef43e2a
For Async Observers, I found AsyncObserverExceptionHandler, which allows to modify how their exceptions are logged:
https://quarkus.io/guides/cdi-reference#exceptions-thrown-by-an-asynchronous-observer-method
For normal Observers, can either:
Implementation ideas
No response
The text was updated successfully, but these errors were encountered: