diff --git a/node/config/settings/sentry.py b/node/config/settings/sentry.py index 233e1413..db1e0ecb 100644 --- a/node/config/settings/sentry.py +++ b/node/config/settings/sentry.py @@ -1,5 +1,7 @@ import os +SENTRY_MAX_STRING_LENGTH = 4096 + if not SENTRY_DSN: # type: ignore # noqa: F821 SENTRY_DSN = os.getenv('SENTRY_DSN') @@ -7,10 +9,13 @@ 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')