apm-agent-java icon indicating copy to clipboard operation
apm-agent-java copied to clipboard

Add support for SimpleAsyncUncaughtExceptionHandler to capture exceptions with Spring web mvc

Open jackshirazi opened this issue 4 years ago • 1 comments

Is your feature request related to a problem?

An error was not captured in APM

  • Spring web mvc > HTTP request > Spring web mvc framework > thread call(async)

APM debug logs

"....SimpleAsyncUncaughtExceptionHandler : Unexpected error occurred invoking async method: public void ..."
"Oct 25, 2021 @ 14:40:23.893","java.lang.Exception: null"
"Oct 25, 2021 @ 14:40:23.893","	at 
... (trace not relevant)

Describe the solution you'd like

The error is captured and visible in APM, with no stack traces in the logs

Describe alternatives you've considered

None

Additional context

None

jackshirazi avatar Oct 29 '21 09:10 jackshirazi

Alternatively, we could instrument apache-commons-logging to capture error logs as it is used in SimpleAsyncUncaughtExceptionHandler.

felixbarny avatar Oct 29 '21 11:10 felixbarny