Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BC-276 Increase maximum string length for Sentry. #207

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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