diff --git a/config/settings/base.py b/config/settings/base.py index 3352589..39c5f33 100644 --- a/config/settings/base.py +++ b/config/settings/base.py @@ -16,7 +16,6 @@ from django.urls import reverse_lazy import environ from django.utils.translation import gettext_lazy as _ -import sentry_sdk env = environ.Env( @@ -826,10 +825,7 @@ UNFOLD_STUDIO_PERMISSION = lambda request: request.user.is_authenticated PLAUSIBLE_DOMAIN = env("PLAUSIBLE_DOMAIN") -sentry_sdk.init( - dsn="https://31aaeeb3a42f9a8c1b26272a0cb8ad3e@o4507991743725568.ingest.us.sentry.io/4511127356768256", - send_default_pii=True, -) +# Sentry is configured only in production.py – not here. INTERNAL_WEBHOOK_SECRET = env('INTERNAL_WEBHOOK_SECRET', default='super-secret-key-12345') diff --git a/config/settings/production.py b/config/settings/production.py index 9185dd4..24c463a 100644 --- a/config/settings/production.py +++ b/config/settings/production.py @@ -1,10 +1,20 @@ -# import sentry_sdk +import sentry_sdk from .base import * from celery.schedules import crontab DEBUG = False +# ----------------------------------------------------------------------- +# Sentry – only active in production (not in develop/test environments) +# ----------------------------------------------------------------------- +sentry_sdk.init( + dsn="https://31aaeeb3a42f9a8c1b26272a0cb8ad3e@o4507991743725568.ingest.us.sentry.io/4511127356768256", + send_default_pii=True, + environment="production", + # traces_sample_rate=0.2, # uncomment to enable performance tracing +) + #It is currently active CORS_ALLOW_ALL_ORIGINS = True