Добавил Sentry

This commit is contained in:
Viner Abubakirov
2026-01-04 13:12:44 +05:00
parent db113ef5d1
commit aca3931abd
6 changed files with 52 additions and 1 deletions

View File

@@ -182,3 +182,17 @@ AXES_COOLOFF_TIME = 0.25 # in hours
AXES_LOCK_OUT_AT_FAILURE = True
AXES_VERBOSE = True
AXES_LOCKOUT_PARAMETERS = [["ip_address", "user_agent"]]
# Sentry Configuration
SENTRY_DSN = os.getenv("SENTRY_DSN", "")
if SENTRY_DSN and not DEBUG:
import sentry_sdk
from sentry_sdk.integrations.django import DjangoIntegration
sentry_sdk.init(
dsn=SENTRY_DSN,
integrations=[DjangoIntegration()],
traces_sample_rate=1.0,
send_default_pii=True
)