shunping commented on code in PR #40142:
URL: https://github.com/apache/beam/pull/40142#discussion_r4067824581


##########
sdks/java/extensions/google-cloud-platform-core/src/main/java/org/apache/beam/sdk/extensions/gcp/util/Transport.java:
##########
@@ -119,6 +127,107 @@ public static Storage.Builder newStorageClient(GcsOptions 
options) {
     return storageBuilder;
   }
 
+  /**
+   * Wraps an {@link HttpRequestInitializer} so that HTTP execute and response 
interceptors
+   * increment {@link Counter} instances pre-bound to the given {@link 
MetricsContainer}. This
+   * guarantees that GCS HTTP metrics are attributed directly to the step that 
created the channel,
+   * even when requests execute on background worker threads.
+   *
+   * <p>The counters are exhaustive, so that a report can be checked for 
consistency:
+   *
+   * <ul>
+   *   <li>{@code request_count} counts every attempt, retries included, 
because the request
+   *       interceptor runs once per attempt.
+   *   <li>Every attempt ends up in exactly one of {@code status_2xx}, {@code 
status_3xx}, {@code

Review Comment:
   Fixed the javadocs.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to