feat(storage): implement high-precision microsecond telemetry for Bidi reads - #20197
Open
sahusneha2004 wants to merge 1 commit into
Open
feat(storage): implement high-precision microsecond telemetry for Bidi reads#20197sahusneha2004 wants to merge 1 commit into
sahusneha2004 wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request adds detailed latency metrics for bidirectional read streams (bidi) in the GCS client, updates the HTTP client's OpenWriter to correctly wrap errors when max retry attempts are reached, and introduces comprehensive retry and header tests for both HTTP and gRPC. The review feedback highlights a potential nil pointer dereference on result.session in processDataRanges, suggests improving the precision of duration-to-microsecond conversions by avoiding intermediate float conversions through duration.Seconds(), and recommends fixing a minor typo in a metric description.
sahusneha2004
force-pushed
the
feature/bidi-rapid-metrics
branch
2 times, most recently
from
July 23, 2026 12:00
5637775 to
a218023
Compare
…i reads - Added 7 new latency metrics for Bidi operations. - Switched to microsecond (_us) tracking. - Fixed histogram boundaries and optimized precision math. - Added defensive nil checks.
sahusneha2004
force-pushed
the
feature/bidi-rapid-metrics
branch
from
July 23, 2026 12:06
a218023 to
f7bb1b6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces 7 new high-precision microsecond-level latency metrics for Bi-directional (Bidi) Read operations in the GCS Go SDK. This allows developers to monitor and pinpoint bottlenecks in download performance with microsecond granularity, distinguishing between SDK overhead, network transit, and server processing.
Key Metrics Added:
gcp.storage.client.bidi.stream_open_latency_us
gcp.storage.client.bidi.network_handshake_latency_us
gcp.storage.client.bidi.server_metadata_latency_us
gcp.storage.client.bidi.end_to_end_range_read_latency_us
gcp.storage.client.bidi.server_network_transit_latency_us
gcp.storage.client.bidi.sdk_processing_overhead_us
gcp.storage.client.bidi.client_handoff_delay_us