wavefrontHQ / wavefront-sdk-java

Wavefront Core Java SDK
Apache License 2.0
6 stars 23 forks source link

[MONIT-29250] Include stack traces in `run()` methods #236

Closed oppegard closed 2 years ago

oppegard commented 2 years ago

Add support in MessageDepupingLogger to include a Throwable forincluding a stack trace in log output.

Used new logger method in:

Testing Notes Manually tested with test harness app:

Sent tracing span: 'getAllUsers' to proxy
Jun 08, 2022 3:48:49 PM com.wavefront.sdk.common.clients.WavefrontClient run
WARNING: Unable to report to Wavefront cluster: 
java.io.IOException: attempt to flush closed sender
    at com.wavefront.sdk.common.clients.WavefrontClient.flush(WavefrontClient.java:632)
    at com.wavefront.sdk.common.clients.WavefrontClient.run(WavefrontClient.java:619)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
    at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)