Repository navigation
feat(storage): record gcp.storage.client.network.io debug metric on gRPC - #15230
Open
nidhiii-27 wants to merge 9 commits into
Open
nidhiii-27 wants to merge 9 commits into
nidhiii-27 wants to merge 9 commits into
Conversation
Record Debug-tier gcp.storage.client.network.io (unit "By", exact 7-key attributes) on gRPC calls by attaching a ClientStreamTracer.Factory when debug metrics are enabled, accumulating transmit/receive wire bytes across streams and flushing on call close. [Generated-by: AI]
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces network I/O tracking to the gRPC metrics interceptor by adding a recordNetworkIo method to StorageClientMetrics and implementing a NetworkIoTracerFactory in StorageGrpcMetricsInterceptor to trace inbound and outbound wire sizes. It also includes comprehensive unit tests to verify the recording of these metrics under various configurations. I have no feedback to provide.
…-network-io-metric [Generated-by: AI]
…-network-io-metric Resolve the StorageClientMetricsTest conflict: drop the duplicated record*_recordsExact* tests and narrow the network.io unit test to the skip-non-positive/disabled behavior (exact attributes, unit and directions stay covered by the interceptor test). [Generated-by: AI]
…-network-io-metric [Generated-by: AI]
…nit test [Generated-by: AI]
[Generated-by: AI]
nidhiii-27
marked this pull request as ready for review
November 26, 2026 06:05
nidhiii-27
requested review from
Dhriti07 and
cpriti-os
and removed request for
a team
November 26, 2026 06:05
cpriti-os
requested changes
Nov 26, 2026
…est for Java 8 compatibility Replace Mockito.mock(StreamController.class) with TestUtils.nullStreamController() in stubMidStreamReadFailure to avoid ByteBuddy JDK 8 failures when copying JSpecify @NullMarked annotations from StreamController. [Generated-by: AI]
…lientStreamTracer - Merge origin-auth/feat/storage-server-unreached-metric (1d45947) - Track outbound/inbound wire bytes and network.path per ClientStreamTracer via streamCreated/streamClosed - Clarify gcp.storage.client.network.io metric description and NetworkIoTracerFactory javadoc - Add inboundWireSize non-positive guard assertions and multi-stream DirectPath/CloudPath test
Bring in the Java 8 compatibility fix for GrpcStorageImplTest (TestUtils.nullStreamController() instead of Mockito.mock(StreamController.class)) from feat/storage-grpc-veneer-operation-metrics (#14729). [Generated-by: AI]
This branch has not been deployed
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.
Summary
Stacked on #15229.
Adds Debug-tier
gcp.storage.client.network.io(LongCounter, unitBy) on gRPC calls to track socket-layer wire bytes transmitted and received.Changes
StorageClientMetrics: addrecordNetworkIo(Context, String networkPath, long transmitBytes, long receiveBytes)emitting exact 7-key attributes (gcp.client.service,gcp.client.version,gcp.client.artifact,rpc.system.name,server.address,network.path,network.io.directionwith valuestransmitandreceive).StorageGrpcMetricsInterceptor: attach aClientStreamTracer.FactoryviacallOptions.withStreamTracerFactory(...)whennetwork.iois enabled, accumulating outbound/inbound wire bytes across the stream and flushing totals ononClose.StorageClientMetricsTestandStorageGrpcMetricsInterceptorTestcovering symmetric/asymmetric byte counts, disabled debug metrics, and exact attribute sets.[Generated-by: AI]