Skip to content

Commit 095fb6c

Browse files
feat(sdk): Trial higher envelope serialization limits (#103882)
Increase envelope serialization limits to dogfood getsentry/sentry-python#5103. Increases the maximum serialization breadth and depth for Python objects. For example, nested lists up to a depth of 100 are serialized before the object is truncated with `<broken_repr>`, replacing the previous limit of 5.
1 parent 7a2d7f0 commit 095fb6c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/sentry/utils/sdk.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from typing import TYPE_CHECKING, Any, NamedTuple
1010

1111
import sentry_sdk
12+
import sentry_sdk.serializer
1213
from django.conf import settings
1314
from django.db.utils import OperationalError
1415
from rest_framework.request import Request
@@ -475,6 +476,9 @@ def flush(
475476
from sentry_sdk.integrations.redis import RedisIntegration
476477
from sentry_sdk.integrations.threading import ThreadingIntegration
477478

479+
sentry_sdk.serializer.MAX_DATABAG_DEPTH = 100
480+
sentry_sdk.serializer.MAX_DATABAG_BREADTH = 100
481+
478482
sentry_sdk.init(
479483
# set back the sentry4sentry_dsn popped above since we need a default dsn on the client
480484
# for dynamic sampling context public_key population

0 commit comments

Comments
 (0)