Skip to content

Commit

Permalink
feature: adding sentry to insigths project (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanJaeger authored Jun 14, 2024
1 parent 8403437 commit 140baee
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions insights/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
from pathlib import Path

import environ
import sentry_sdk
from django.utils.log import DEFAULT_LOGGING
from sentry_sdk.integrations.django import DjangoIntegration

environ.Env.read_env(env_file=(environ.Path(__file__) - 2)(".env"))

Expand Down Expand Up @@ -230,6 +232,16 @@
# CORS CONFIG
CORS_ORIGIN_ALLOW_ALL = True

# Sentry configuration

USE_SENTRY = env.bool("USE_SENTRY", default=False)

if USE_SENTRY:
sentry_sdk.init(
dsn=env.str("SENTRY_DSN"),
integrations=[DjangoIntegration()],
environment=env.str("ENVIRONMENT", default="develop"),
)

USE_EDA = env.bool("USE_EDA", default=False)

Expand Down

0 comments on commit 140baee

Please sign in to comment.