We have a Django setup where we init() sentry in the main settings file but I have not found a simple way of disabling sentry for local development.
With Raven I was able to just overwrite logging params in local settings file that overwrites main settings file but I no I find myself just editing the main settings file to comment out the sentry init.
Is there a better way to disable sentry init without touching the settings file?
I also checked the community forums for an answer to this but it seems there are less answers than here and couldn't find anything about it in docs.
You should be able to call init() multiple times. So in your local settings file you can call init() second time without arguments (and without the SENTRY_DSN envvar set) and it will disable the SDK.
Duplicate of #659
Most helpful comment
You should be able to call
init()multiple times. So in your local settings file you can callinit()second time without arguments (and without theSENTRY_DSNenvvar set) and it will disable the SDK.