Github user tillrohrmann commented on a diff in the pull request: https://github.com/apache/flink/pull/2105#discussion_r68035265 --- Diff: flink-core/src/main/java/org/apache/flink/metrics/MetricRegistry.java --- @@ -170,8 +170,12 @@ public ScopeFormats getScopeFormats() { * @param group the group that contains the metric */ public void register(Metric metric, String metricName, AbstractMetricGroup group) { - if (reporter != null) { - reporter.notifyOfAddedMetric(metric, metricName, group); + try { + if (reporter != null) { + reporter.notifyOfAddedMetric(metric, metricName, group); + } + } catch (Exception e) { + LOG.error("Error while registering metric.", e); --- End diff -- Why do we add the try-catch here? `notifyOfAddedMetric` does not declare thrown exceptions. Thus we try to catch unchecked exceptions here? Which unchecked exceptions did you encounter here?
--- 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. ---