-
Notifications
You must be signed in to change notification settings - Fork 896
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
Log the response cause that is raised after a request timed out #5150
Comments
Another option could be to modify |
Let me try this one~! 🚀 |
It would be nice if we also implemented a way to notify or log the late exceptions. My concern was that causes added after I propose the following idea:
if (shouldLogAdditionalException) {
ctx.log().whenAvailable(RequestLogProperty.ADDITIONAL_RESPONSE_CAUSE).thenApply(log -> {
// log the cause
logger.warn("A late response exception occurred after the response completes. ctx: {}",
ctx, log.additionalResponseCause());
});
} |
This has already been discussed, but for the record: Another problem with the above approach is that the garbage collection timing of |
Currently, an exception that is raised after a request is timed out on the server side is silently ignored.
Because the
RequestLog
is complete when the timeout response is sent to the client, there's no way to record the exception.This makes user hard to diagnose the problem. The only exception that users would see is the
RequestTimeouException
instead of the actual exception that may be the cause of the timeout.So, it would be nice if we could also log the exception so that users would use it for debugging.
One possible way to do this is using
UnhandledExceptionsReporter
here:armeria/core/src/main/java/com/linecorp/armeria/server/HttpServerHandler.java
Line 392 in 491841f
The text was updated successfully, but these errors were encountered: