[ https://issues.apache.org/jira/browse/FLINK-7502?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16145154#comment-16145154 ]
ASF GitHub Bot commented on FLINK-7502: --------------------------------------- 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);``` > PrometheusReporter improvements > ------------------------------- > > Key: FLINK-7502 > URL: https://issues.apache.org/jira/browse/FLINK-7502 > Project: Flink > Issue Type: Improvement > Components: Metrics > Affects Versions: 1.4.0 > Reporter: Maximilian Bode > Assignee: Maximilian Bode > Priority: Minor > > * do not throw exceptions on metrics being registered for second time > * allow port ranges for setups where multiple reporters are on same host > (e.g. one TaskManager and one JobManager) > * do not use nanohttpd anymore, there is now a minimal http server included > in [Prometheus JVM client|https://github.com/prometheus/client_java] -- This message was sent by Atlassian JIRA (v6.4.14#64029)