[python] Is it possible for Sentry to log all raised exceptions, including caught exceptions automatically?


#1

Hi!

Is it possible for Sentry to log all raised exceptions, including caught exceptions automatically even if I don’t explicitly log the error in the ‘except block’?

I’m trying to find exceptions that are getting swallowed that lacks proper logging code.

Cheers!


#2

There is no such function in the SDK. It is possible to write an integration for this, but you would find that you get a lot of noise from entirely unproblematic exceptions such as KeyError or IndexError that are caught as part of the “don’t ask for permission, but for forgiveness” mantra. Not to mention StopIteration.