roger-mike commented on a change in pull request #14770:
URL: https://github.com/apache/beam/pull/14770#discussion_r629540306



##########
File path: sdks/python/apache_beam/io/gcp/gcsio.py
##########
@@ -586,7 +589,25 @@ def __init__(self, client, path, buffer_size):
         auto_transfer=False,
         chunksize=self._buffer_size,
         num_retries=20)
-    self._client.objects.Get(self._get_request, download=self._downloader)
+
+    # Create a request count metric
+    resource = resource_identifiers.GoogleCloudStorage(self._bucket)
+    labels = {
+        monitoring_infos.SERVICE_LABEL: 'Storage',
+        monitoring_infos.METHOD_LABEL: 'GcsObjectsInsert',
+        monitoring_infos.RESOURCE_LABEL: resource,
+        monitoring_infos.GCS_BUCKET_LABEL: self._bucket,
+    }
+    service_call_metric = ServiceCallMetric(
+        request_count_urn=monitoring_infos.API_REQUEST_COUNT_URN,
+        base_labels=labels)
+
+    try:
+      response = self._client.objects.Get(

Review comment:
       Is this response going to return multiple errors as in the [BigQuery 
implementation](https://github.com/apache/beam/blob/309fc99a8a94a8dc42a4e817002cc084da5a2811/sdks/python/apache_beam/io/gcp/bigquery_tools.py#L640)?




-- 
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.

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


Reply via email to