Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions node/config/settings/sentry.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
import os

SENTRY_MAX_STRING_LENGTH = 4096

if not SENTRY_DSN: # type: ignore # noqa: F821
SENTRY_DSN = os.getenv('SENTRY_DSN')

if SENTRY_DSN:
import logging

import sentry_sdk
from sentry_sdk import utils
from sentry_sdk.integrations.celery import CeleryIntegration
from sentry_sdk.integrations.django import DjangoIntegration
from sentry_sdk.integrations.logging import LoggingIntegration

utils.MAX_STRING_LENGTH = SENTRY_MAX_STRING_LENGTH

handlers = LOGGING['root']['handlers'] # type: ignore # noqa: F821
if 'pre_sentry_handler' not in handlers:
handlers.append('pre_sentry_handler')
Expand Down