You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/01/31 11:58:46 UTC

[GitHub] zentol commented on a change in pull request #7582: [FLINK-11424][metrics]fix remove error type Gauge in DatadogHttpReporter

zentol commented on a change in pull request #7582: [FLINK-11424][metrics]fix remove error type Gauge in DatadogHttpReporter
URL: https://github.com/apache/flink/pull/7582#discussion_r252639049
 
 

 ##########
 File path: flink-metrics/flink-metrics-datadog/src/main/java/org/apache/flink/metrics/datadog/DatadogHttpReporter.java
 ##########
 @@ -126,11 +126,14 @@ public void report() {
 				g.getMetricValue();
 				request.addGauge(g);
 			} catch (Exception e) {
-				// Remove that Gauge if it's not of Number type
-				gauges.remove(entry.getKey());
+				LOGGER.warn("the Gauge {} is not of Number type", g.getMetric());
 
 Review comment:
   There are a few things I'd like to change here. First I'd like us to be able to differentiate between broken gauge implementations (throwing exceptions) and non-Number gauges (I guess resulting in a ClassCastException).
   
   Then, log on INFO either:
   `The Gauge {} will not be reported because only number types are supported by this reporter.`
   `The Gauge {} will not be reported because it threw an exception.`
   
   In case of a random exception, also log the exception on TRACE.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services