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/07/10 15:16:34 UTC

[GitHub] [flink] NicoK commented on a change in pull request #8990: [FLINK-13104][metrics] Updated request callback to log warning on failure

NicoK commented on a change in pull request #8990: [FLINK-13104][metrics] Updated request callback to log warning on failure
URL: https://github.com/apache/flink/pull/8990#discussion_r302106163
 
 

 ##########
 File path: flink-metrics/flink-metrics-datadog/src/main/java/org/apache/flink/metrics/datadog/DatadogHttpClient.java
 ##########
 @@ -133,6 +143,11 @@ public void onFailure(Call call, IOException e) {
 
 		@Override
 		public void onResponse(Call call, Response response) throws IOException {
+
+			if (!response.isSuccessful()) {
+				getLogger().warn(FAILED_SENDING_REQUEST_TO_DATADOG, response.code());
 
 Review comment:
   Regarding the logging: why not add the response's body? It may just contain an error message(?). Or better, just include `response` and let its `toString()` implementation decide what is important.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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