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
Do not record wire timestamp when no request was transferred #1912
Conversation
Motivation: On the client side, it is possible that a request is not sent to the wire, e.g. when connection error or validation failure occurs. Modifications: - Make sure `REQUEST_FIRST_BYTES_TRANSFERRED` is available before logging wire receive. Result: - No more `RequestLogAvailabilityException` in `BraveClient` and `HttpTracingClient`. - Fixes line#1911
8e07ae6
to
36f9959
Compare
// The request might have failed even before it's sent, e.g. validation failure, connection error. | ||
if (log.isAvailable(RequestLogAvailability.REQUEST_FIRST_BYTES_TRANSFERRED)) { | ||
SpanTags.logWireSend(span, log.requestFirstBytesTransferredTimeNanos(), log); | ||
} |
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.
Shouldn't we do something like:
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.
Never mind, 😓 Misread the code. TT
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 👍
Codecov Report
@@ Coverage Diff @@
## master #1912 +/- ##
============================================
- Coverage 73.28% 73.26% -0.02%
+ Complexity 8980 8976 -4
============================================
Files 794 794
Lines 35170 35172 +2
Branches 4322 4322
============================================
- Hits 25774 25769 -5
+ Misses 7192 7190 -2
- Partials 2204 2213 +9
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #1912 +/- ##
============================================
- Coverage 73.28% 73.24% -0.05%
+ Complexity 8980 8974 -6
============================================
Files 794 794
Lines 35170 35172 +2
Branches 4322 4322
============================================
- Hits 25774 25761 -13
- Misses 7192 7201 +9
- Partials 2204 2210 +6
Continue to review full report at Codecov.
|
Thanks for reviewing. 😄 |
Motivation: On the client side, it is possible that a request is not sent to the wire, e.g. when connection error or validation failure occurs. Modifications: - Make sure `REQUEST_FIRST_BYTES_TRANSFERRED` is available before logging wire receive. Result: - No more `RequestLogAvailabilityException` in `BraveClient` and `HttpTracingClient`. - Fixes line#1911
Motivation:
On the client side, it is possible that a request is not sent to the
wire, e.g. when connection error or validation failure occurs.
Modifications:
REQUEST_FIRST_BYTES_TRANSFERRED
is available beforelogging wire receive.
Result:
RequestLogAvailabilityException
inBraveClient
andHttpTracingClient
.RequestLogAvailabilityException: REQUEST_FIRST_BYTES_TRANSFERRED
whenRequestLogAvailability
isCOMPLETE
#1911