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
update interceptor logging for PCU #1097
base: master
Are you sure you want to change the base?
Conversation
/gcbrun |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #1097 +/- ##
=============================================
+ Coverage 70.75% 81.55% +10.79%
- Complexity 1571 1790 +219
=============================================
Files 100 102 +2
Lines 7859 7916 +57
Branches 967 974 +7
=============================================
+ Hits 5561 6456 +895
+ Misses 1886 1057 -829
+ Partials 412 403 -9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
The code is way too complex. Can you please add any background information relevant to this so that readers can figure out WHY/HOW this is working.
private void updateUploadId(@Nonnull String uploadId) { | ||
if (streamUploadId == null) { | ||
private void updateStreamUploadId(@Nonnull String uploadId) { | ||
if (Strings.isNullOrEmpty(streamUploadId) && !Strings.isNullOrEmpty(uploadId)) { |
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.
I guess streamUploadId and uploadId cannot be null?
|
||
logRecords | ||
.put(GoogleCloudStorageTracingFields.WRITE_OFFSET.name, request.getWriteOffset()) | ||
.put(GoogleCloudStorageTracingFields.FINALIZE_WRITE.name, request.getFinishWrite()) |
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.
FInish write is same as finalizewrite?
Fixed below 2 issues:
PCU had issue in logging
null
uploadIds.null
value.In Direct uploads incocationIds were gettign logged as
NOT-FOUND
.streamCreated
to update the Ids for tracing but there are cases when actual stream creation is delayed and sometimes even happened afteronMessage
is called . Updated the logic of updatign invocationid in tracers by updating it as soon as we get the request to start the tracer i.e.SimpleForwardingClientCall.start
.Added integration test to very the tracing for PCU calls.