Do not report errors to Sentry in Django shells
Closes #759 (closed)
There is no easy way to tell Sentry to ignore exceptions whose stack trace contains django.core.management.commands.shell
or something that comes from its REPL. I had made multiple tests earlier with before_send
hooks and analyzing the traceback, but it's a mess. The only way I found to not enable Sentry on Django shells is to look for shell
or shell_plus
in the command line, and just not initialize Sentry at all when it's there.
Edited by Erwan Rouchet