sentry: Initialize sentry in AppConfig ready hook.

This breaks an import cycle that prevented django-stubs from inferring
types for django.conf.settings.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2022-09-23 21:50:42 -07:00
committed by Tim Abbott
parent a5cf3b3975
commit 676d40d66b
2 changed files with 6 additions and 4 deletions

View File

@@ -1224,10 +1224,6 @@ TWO_FACTOR_PATCH_ADMIN = False
# Allow the environment to override the default DSN
SENTRY_DSN = os.environ.get("SENTRY_DSN", SENTRY_DSN)
if SENTRY_DSN:
from .sentry import setup_sentry
setup_sentry(SENTRY_DSN, get_config("machine", "deploy_type", "development"))
SCIM_SERVICE_PROVIDER = {
"USER_ADAPTER": "zerver.lib.scim.ZulipSCIMUser",