angoenka commented on a change in pull request #12817:
URL: https://github.com/apache/beam/pull/12817#discussion_r486688088



##########
File path: sdks/python/apache_beam/runners/dataflow/dataflow_metrics.py
##########
@@ -210,6 +210,14 @@ def _get_metric_value(self, metric):
       dist_sum = _get_match(
           metric.distribution.object_value.properties,
           lambda x: x.key == 'sum').value.integer_value
+      if not dist_sum:
+        # distribution metric is not meant to use on large values, but in case
+        # it is, the value can overflow and become double_value, the 
correctness
+        # of the value may not be guaranteed.
+        dist_sum = int(

Review comment:
       Should we also add the metric name in the logs for easier debugging.




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to