0.2.3.7
- Add optional sentry integration
This commit is contained in:
parent
2be35bce53
commit
1993338120
3 changed files with 45 additions and 1 deletions
|
|
@ -49,3 +49,16 @@ TEMPLATES = [
|
|||
AXES_HANDLER = "axes.handlers.database.AxesDatabaseHandler"
|
||||
|
||||
REGISTRATION_OPEN = False
|
||||
|
||||
# Optionally use sentry integration
|
||||
try:
|
||||
from sentry_sdk import init as sentry_init
|
||||
from sentry_sdk.integrations.django import CeleryIntegration, DjangoIntegration
|
||||
|
||||
sentry_init(
|
||||
dsn=os.environ.get("SENTRY_DSN"),
|
||||
integrations=[DjangoIntegration(), CeleryIntegration()],
|
||||
send_default_pii=False,
|
||||
)
|
||||
except ImportError:
|
||||
pass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue