-
Notifications
You must be signed in to change notification settings - Fork 471
fix(gcs_reader): gcs_download_bytes_count metrics is broken #3895
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
Conversation
|
/gemini summary |
|
/gemini review |
2a295c2 to
1ebd947
Compare
|
/gemini review |
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.
Code Review
This pull request effectively resolves the issue of duplicate instrumentation for gcs/download_bytes_count metrics. The core fix, which involves relocating the metric capturing logic to the startRead function, is sound and correctly ensures that metrics are recorded only once when a new GCS read is initiated. The propagation of the readType to the underlying readers is also handled well. I appreciate the thoroughness of adding new tests to cover both the old and new reader paths for sequential and random reads. My main feedback is a suggestion to refactor the new tests to reduce code duplication, which will improve maintainability.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3895 +/- ##
==========================================
- Coverage 82.40% 82.37% -0.03%
==========================================
Files 145 145
Lines 22773 22769 -4
==========================================
- Hits 18766 18757 -9
- Misses 3462 3466 +4
- Partials 545 546 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
/gemini review |
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.
Code Review
This pull request effectively addresses the issue of broken gcs_download_bytes_count metrics by correcting the duplicate instrumentation and ensuring the proper propagation of the read type. The refactoring to pass the read type as part of the request rather than holding it as state in the reader is a good improvement. The addition of specific tests for sequential and random read metrics provides good coverage for the fix. I have one suggestion to improve the maintainability of the new test code.
Description
Link to the issue in case of a bug fix.
b/443637302
Testing details
Any backward incompatible change? If so, please explain.
No