Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4586#discussion_r135764533
  
    --- Diff: 
flink-metrics/flink-metrics-prometheus/src/main/java/org/apache/flink/metrics/prometheus/PrometheusReporter.java
 ---
    @@ -130,7 +139,11 @@ public void notifyOfAddedMetric(final Metric metric, 
final String metricName, fi
                                metric.getClass().getName());
                        return;
                }
    -           collector.register();
    +           try {
    +                   collector.register();
    +           } catch (Exception e) {
    +                   LOG.warn("There was a problem registering metric {}: 
{}", metricName, e);
    --- End diff --
    
    We usually don't include placeholders for exceptions (because they are 
added implicitly), i.e. it should be ```LOG.warn("There was a problem 
registering metric {}.", metricName, e);```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to