aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/settings.py
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2023-12-11 15:56:26 +0000
committerGravatar Chris Lovering <[email protected]>2023-12-11 17:09:33 +0000
commit11fc279717089a8774c6f58fdceec29d243a89d1 (patch)
treea8ace6e61c0645c178ed07228d0d60ac92ce636d /pydis_site/settings.py
parentUnify frozen fields logic into serializer mixin (#1169) (diff)
Enable sentry logging integration
Diffstat (limited to 'pydis_site/settings.py')
-rw-r--r--pydis_site/settings.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pydis_site/settings.py b/pydis_site/settings.py
index 9da9a156..61713c5c 100644
--- a/pydis_site/settings.py
+++ b/pydis_site/settings.py
@@ -10,6 +10,7 @@ For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""
+import logging
import os
import secrets
import sys
@@ -19,6 +20,7 @@ from socket import gethostbyname, gethostname
import environ
import sentry_sdk
+from sentry_sdk.integrations.logging import LoggingIntegration
from sentry_sdk.integrations.django import DjangoIntegration
env = environ.Env(
@@ -50,7 +52,7 @@ if GITHUB_APP_KEY and (key_file := Path(GITHUB_APP_KEY)).is_file():
if not STATIC_BUILD:
sentry_sdk.init(
dsn=env('SITE_DSN'),
- integrations=[DjangoIntegration()],
+ integrations=[DjangoIntegration(), LoggingIntegration(level=logging.DEBUG, event_level=logging.ERROR)],
send_default_pii=True,
release=f"site@{GIT_SHA}"
)