sunjincheng121 commented on a change in pull request #13334:
URL: https://github.com/apache/flink/pull/13334#discussion_r484336876



##########
File path: 
flink-python/src/main/java/org/apache/flink/python/metric/FlinkMetricContainer.java
##########
@@ -106,9 +106,12 @@ private void updateMetrics(String stepName) {
 
        private boolean isUserMetric(MetricResult metricResult) {
                MetricName metricName = metricResult.getKey().metricName();
+               String urn = ((MonitoringInfoMetricName) metricName).getUrn();
                return (metricName instanceof MonitoringInfoMetricName) &&
-                       ((MonitoringInfoMetricName) metricName).getUrn()
-                               
.contains(MonitoringInfoConstants.Urns.USER_COUNTER);
+                       
(urn.contains(MonitoringInfoConstants.Urns.USER_SUM_INT64) ||

Review comment:
       `MetricName` is an interface, and we can have many Implementations, and 
for this method `isUserMetric` we only accept the `MonitoringInfoMetricName` 
for now, So, I think would be OK to keep this check. 
   What to you think?




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