Adding sentry to monitor errors
This commit is contained in:
@@ -1,11 +1,23 @@
|
||||
import os
|
||||
|
||||
from pathlib import Path
|
||||
import sentry_sdk
|
||||
from sentry_sdk.integrations.django import DjangoIntegration
|
||||
|
||||
|
||||
SCOPE = os.getenv("SCOPE", "production")
|
||||
|
||||
sentry_sdk.init(
|
||||
dsn=os.getenv("SENTRY_DSN"),
|
||||
integrations=[DjangoIntegration()],
|
||||
environment=SCOPE,
|
||||
send_default_pii=False,
|
||||
traces_sample_rate=1.0,
|
||||
)
|
||||
|
||||
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
|
||||
|
||||
# SECURITY WARNING: keep the secret key used in production secret!
|
||||
SECRET_KEY = os.getenv("SECRET_KEY", "changeme")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user