add stack trace processor and refactor introspection processor to reduce code duplication

@stof So this PR was motivated by uncaught exceptions occurring in production, where there is no explicit call to the logger. Please correct me if I'm wrong, but as I'm reading the documentation, it looks like using the context would only work when explicitly logging an exception and adding the stack trace on a per-usage basis?