-
Notifications
You must be signed in to change notification settings - Fork 923
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
Add debug logs for http2 stream errors #4515
Conversation
19f0d12
to
53e331e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
if (logger.isDebugEnabled()) { | ||
logger.debug("{} HTTP/2 connection error:", ctx.channel(), cause); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (logger.isDebugEnabled()) { | |
logger.debug("{} HTTP/2 connection error:", ctx.channel(), cause); | |
} | |
logger.debug("{} HTTP/2 connection error:", ctx.channel(), cause); |
We use isDebugEnabled
when it takes cost to create instances that are logged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I thought that there would be some cost if a throwable was passed in.
Went through the code and verified at least logback
terminates early 👍
@@ -111,13 +112,20 @@ protected final void onConnectionError(ChannelHandlerContext ctx, boolean outbou | |||
|
|||
handlingConnectionError = true; | |||
if (Exceptions.isExpected(cause) || isGoAwaySentException(cause, connection())) { | |||
// Ignore silently. | |||
logger.debug("{} HTTP/2 connection error:", ctx.channel(), cause); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you know the error is safely ignored. How about setting the level to trace
to log the cause
only when users really want to delve into something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea 👍
Codecov ReportBase: 74.05% // Head: 74.06% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #4515 +/- ##
============================================
+ Coverage 74.05% 74.06% +0.01%
- Complexity 18167 18177 +10
============================================
Files 1536 1537 +1
Lines 67378 67426 +48
Branches 8520 8526 +6
============================================
+ Hits 49894 49939 +45
- Misses 13412 13418 +6
+ Partials 4072 4069 -3
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @jrhee17!
Motivation: When the target release version changed from 1.21.0 to 1.20.3, some PRs were already merged into the master branch. So their milestone should be changed and the release notes also need to be updated. Modifications: - Add #4515, #4507, #4484 and #4492 to the release notes. Result: Update the missing issues and PRs.
Motivation:
We sometimes encounter situations where HTTP/2 header frames are lost due to an exception.
Although a RST frame is sent in this case, remotes are still able to send data for the offending stream, which ends up in error logs which armeria doesn't understand.
e.g.
Although normally it might be noisy to be alerted of such failures, it might be useful to view such logs when debugging.
Modifications:
StreamError
Result: