newrelic / newrelic-telemetry-sdk-java

Java library for sending telemetry data to New Relic
Apache License 2.0
41 stars 37 forks source link

Need full stack trace to diagnose connectivity issues #279

Closed briankrug closed 2 years ago

briankrug commented 2 years ago

Metrics are failing to send to NewRelic in our applications. A warning message is logged but it only says:

IOException (message: Error posting metrics to New Relic) while trying to send data to New Relic. MetricBatch retry recommended

This is not particularly helpful. If a full stack trace were also logged with the warning message that would be greatly beneficial in understanding why it is failing. The change would be at the following location: https://github.com/newrelic/newrelic-telemetry-sdk-java/blob/6502f5ab18098e4626e38adb92a6b74fc585fa08/telemetry-core/src/main/java/com/newrelic/telemetry/transport/BatchDataSender.java#L201

kford-newrelic commented 2 years ago

Added additional cause information via #294

kford-newrelic commented 2 years ago

@briankrug Thank you for this feature request. We've recently added more information about the exception thrown to the latest SDK release but we don't have the engineering bandwidth to follow up and add the full stack trace as you suggested. Not selected for the product roadmap.

kjozsa commented 1 year ago

@kford-newrelic you want a pull request of , e ? :slightly_smiling_face:

kford-newrelic commented 1 year ago

@kjozsa sure! If that's all it is, that'd be great!