-
Notifications
You must be signed in to change notification settings - Fork 38k
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
Reactor stacktrace-mode is not configurable #23827
Comments
You're saying stracktrace mode but pointing to a line where a checkpoint is inserted, so I'm not 100% sure I undertsand what you mean. For the stacktrace mode there is nothing specific in the Spring Framework. It is supported in Boot through a property and the devtools and in any it's just about calling As for the checkpoint, it is always inserted because it is a very lightweight feature. That is my understanding based on discussions with the Reactor team. @simonbasle or @smaldini do you have any comments with regards to |
@rstoyanchev @beltram |
Thanks for clarifying. @beltram it seems we're fine so I'll close but feel free to comment. |
Thank you for the quick and thorough answer. I realize now I should have given more context 😄 @GetMapping
fun someErrors(): Mono<*> {
val errorA = IllegalStateException("Error A").toMono<Any>()
val errorB = IllegalStateException("Error B").toMono<Any>()
return Mono.zipDelayError(errorA, errorB)
} I was then catching them as a CompositeException in a ControllerAdvice like this I have set up a reproducer for my issue available here. |
in reactor this stackless exception is the only mechanism through which we can display extra information (often the only meaningful information) about reactive parts. I guess with these settings you only get pinpointed traces from |
reflection based on classname is one option, still. I'd argue that you WANT that information somewhere in your logs though... |
@beltram thanks for the details and sample. @simonbasle so the case is Arguably there should be a way to get the actual errors only for exception handling purposes. One option would be for Either way the Javadoc of both |
@beltram @rstoyanchev would an json.put("errors",
Exceptions.unwrapMultiple(zipDelayedError)
.stream()
.filter(e -> !Exceptions.isBacktrace(e))
); It would probably not be perfect in the sense that the implementation would have to rely on reflection as well, due to package strucuture, but at least it would be a public API to check for checkpoint and |
Could the message of the exception ("checkpoint") be used for the filtering? Either way given that this is an exceptional condition, the use of reflection is probably not a very big concern. This method would at least save the application from having to know the details of this. I would also say that if such an option is provided, and an application can opt into this filtering, then there should be two variants of |
opened reactor/reactor-core#1953 |
Thanks @simonbasle, could you also add these as goals (as a reminder):
|
I am closing this as the intent for WebFlux checkpoint is to always be on. Rather we're looking for a way to make it easy to separate actual errors from synthetic ones added by checkpoints. |
Hi, according to #22105 I should be able to configure Reactor's stacktrace mode by configuration. After digging a bit I think it is not the case.
Spring's Webflux Handler does not take any property into account in DispatcherHandler here.
Moreover 'description' is always non-null which causes AssemblySnapshot to be always 'checkpointed' thus always appending a debug exception.
This is not the expected behaviour IMO.
Thanks in advance for having a look
The text was updated successfully, but these errors were encountered: