flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zentol <...@git.apache.org>
Subject [GitHub] flink pull request #4586: [FLINK-7502] [metrics] Improve PrometheusReporter
Date Tue, 29 Aug 2017 11:40:42 GMT
Github user zentol commented on a diff in the pull request:

    --- 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
    -		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 infrastructure@apache.org or file a JIRA ticket
with INFRA.

View raw message