tvalentyn commented on code in PR #32027:
URL: https://github.com/apache/beam/pull/32027#discussion_r1711836741


##########
sdks/python/apache_beam/metrics/monitoring_infos.py:
##########
@@ -214,6 +214,11 @@ def int64_user_distribution(namespace, name, metric, 
ptransform=None):
     ptransform: The ptransform id used as a label.
   """
   labels = create_labels(ptransform=ptransform, namespace=namespace, name=name)
+  if metric.count <= 0:
+    raise TypeError(
+        'Expected a non zero distribution count for %s metric but received %s' 
%
+        (metric, metric.count))

Review Comment:
   you probably meant metric.name here



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