Files
spring-cloud-sleuth/spring-cloud-sleuth-core
Marcin Grzejszczak 4203566d87 Exceptions that escape SpringMVC DispatcherServlet should be logged with trace & span IDs
without this change any exception that is not caught by a filter, get caught and logged by server's internals (e.g. Tomcat's Valve). To make the Valve log the exception together with the tracing information we would have to allow the tracing context remain in the thread after TraceFilter gets executed. That is problematic cause we're polluting the ThreadLocal and would have to assume that some component will eventually clear the context.

with this change we're trying to solve the issue from a different angle. Whenever an uncaught exception is thrown, we are already catching it in the `catch(...) {}` clause. It's enough to just log it at the error level and that way, regardless of the underlying server implementation (Tomcat, Undertow) we will log the uncaught exception and rethrow it.

fixes #714
2017-11-03 22:41:50 +01:00
..
2017-10-24 08:48:01 +00:00