[ 
https://issues.apache.org/jira/browse/BEAM-11985?focusedWorklogId=656892&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-656892
 ]

ASF GitHub Bot logged work on BEAM-11985:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 28/Sep/21 20:28
            Start Date: 28/Sep/21 20:28
    Worklog Time Spent: 10m 
      Work Description: ajamato commented on a change in pull request #15562:
URL: https://github.com/apache/beam/pull/15562#discussion_r717925985



##########
File path: sdks/python/apache_beam/internal/metrics/metric.py
##########
@@ -223,3 +223,31 @@ def convert_to_canonical_status_string(self, status):
         http_status_code in http_to_canonical_gcp_status):
       return http_to_canonical_gcp_status[http_status_code]
     return str(http_status_code)
+
+  @staticmethod
+  def convert_to_grpc_status_string(grpc_status):

Review comment:
       please rename variable grpc_status -> grpc_status_code

##########
File path: sdks/python/apache_beam/internal/metrics/metric.py
##########
@@ -223,3 +223,31 @@ def convert_to_canonical_status_string(self, status):
         http_status_code in http_to_canonical_gcp_status):
       return http_to_canonical_gcp_status[http_status_code]
     return str(http_status_code)
+
+  @staticmethod
+  def convert_to_grpc_status_string(grpc_status):
+    # type: (int) -> str
+
+    """Converts a grpc status to a canonical GCP status code string."""

Review comment:
       Replace this comment
   """
   Converts the bigtable error code to a canonical GCP status code string.
   
   This Bigtable client library is not using the canonical http status code 
values (i.e. https://cloud.google.com/apis/design/errors)"
   Instead they are numbered using an enum with these values corresponding to 
each status code:
   https://cloud.google.com/bigtable/docs/status-codes
   """
   
   Please also add Args and Returns pydoc comment

##########
File path: sdks/python/apache_beam/internal/metrics/metric.py
##########
@@ -223,3 +223,31 @@ def convert_to_canonical_status_string(self, status):
         http_status_code in http_to_canonical_gcp_status):
       return http_to_canonical_gcp_status[http_status_code]
     return str(http_status_code)
+
+  @staticmethod
+  def convert_to_grpc_status_string(grpc_status):

Review comment:
       please rename function to:
   bigtable_error_code_to_grpc_status_string
   
   




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


Issue Time Tracking
-------------------

    Worklog Id:     (was: 656892)
    Time Spent: 5h 50m  (was: 5h 40m)

> Python Bigtable - Implement IO Request Count metrics
> ----------------------------------------------------
>
>                 Key: BEAM-11985
>                 URL: https://issues.apache.org/jira/browse/BEAM-11985
>             Project: Beam
>          Issue Type: Test
>          Components: io-py-gcp
>            Reporter: Alex Amato
>            Assignee: Benjamin Gonzalez
>            Priority: P3
>          Time Spent: 5h 50m
>  Remaining Estimate: 0h
>
> Reference PRs (See BigQuery IO example) and detailed explanation of what's 
> needed to instrument this IO with Request Count metrics is found in this 
> handoff doc:
> [https://docs.google.com/document/d/1lrz2wE5Dl4zlUfPAenjXIQyleZvqevqoxhyE85aj4sc/edit'|https://docs.google.com/document/d/1lrz2wE5Dl4zlUfPAenjXIQyleZvqevqoxhyE85aj4sc/edit'?authuser=0]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to