From 3e91ee8ce7ab8659958120fce621b47af8894f20 Mon Sep 17 00:00:00 2001 From: Vinicius Cunha Date: Thu, 14 Jul 2022 18:22:46 -0300 Subject: [PATCH] update BatchDataSender to show the cause of IOException --- .../com/newrelic/telemetry/transport/BatchDataSender.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/telemetry-core/src/main/java/com/newrelic/telemetry/transport/BatchDataSender.java b/telemetry-core/src/main/java/com/newrelic/telemetry/transport/BatchDataSender.java index 81acb849..5bfdbb88 100644 --- a/telemetry-core/src/main/java/com/newrelic/telemetry/transport/BatchDataSender.java +++ b/telemetry-core/src/main/java/com/newrelic/telemetry/transport/BatchDataSender.java @@ -196,8 +196,8 @@ private Response sendPayload(byte[] payload, UUID requestId, String batchType) } catch (IOException e) { String message = String.format( - "IOException (message: %s) while trying to send data to New Relic. %s retry recommended", - e.getMessage(), batchType); + "IOException (message: %s, cause: %s) while trying to send data to New Relic. %s retry recommended", + e.getMessage(), e.getCause(), batchType); logger.warn(message); throw new RetryWithBackoffException(message, e); }