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


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

Review Comment:
   Also if exception is uncaught, it can create a breaking change for users, so 
as much as possible I'd prefer to not enter the exception path or fail silently 



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