Skip to content

Commit

Permalink
Merge pull request #3211 from ccnmtl/enable-sentry
Browse files Browse the repository at this point in the history
Enable sentry
  • Loading branch information
ndittren authored Aug 23, 2024
2 parents a760a99 + a592145 commit b8d3feb
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
17 changes: 16 additions & 1 deletion footprints/settings_production.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
from footprints.settings_shared import * # noqa F403
import sys
from django.conf import settings
import sentry_sdk
from sentry_sdk.integrations.django import DjangoIntegration
from ctlsettings.production import common

from footprints.settings_shared import * # noqa F403


locals().update(
common(
project=project, # noqa F405
Expand All @@ -27,3 +33,12 @@
from footprints.local_settings import * # noqa F403 F405
except ImportError:
pass


if ('migrate' not in sys.argv) and \
('collectstatic' not in sys.argv) and \
hasattr(settings, 'SENTRY_DSN'):
sentry_sdk.init(
dsn=SENTRY_DSN, # noqa F405
integrations=[DjangoIntegration()],
)
16 changes: 15 additions & 1 deletion footprints/settings_staging.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
from footprints.settings_shared import * # noqa F403
import sys
from django.conf import settings
import sentry_sdk
from sentry_sdk.integrations.django import DjangoIntegration
from ctlsettings.staging import common

from footprints.settings_shared import * # noqa F403

locals().update(
common(
project=project, # noqa F405
Expand All @@ -27,3 +32,12 @@
from footprints.local_settings import * # noqa F403 F405
except ImportError:
pass

if ('migrate' not in sys.argv) and \
('collectstatic' not in sys.argv) and \
hasattr(settings, 'SENTRY_DSN'):
sentry_sdk.init(
dsn=SENTRY_DSN, # noqa F405
integrations=[DjangoIntegration()],
debug=True,
)

0 comments on commit b8d3feb

Please sign in to comment.