Skip to content

Commit 760aa90

Browse files
authored
ref: Remove MAX_EVENT_BYTES (#4630)
Remove `MAX_EVENT_BYTES` (which doesn't seem to be used anyway?) Ref #4172
1 parent d5b0aa4 commit 760aa90

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

sentry_sdk/serializer.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,6 @@
3939
serializable_str_types = (str, bytes, bytearray, memoryview)
4040

4141

42-
# Maximum length of JSON-serialized event payloads that can be safely sent
43-
# before the server may reject the event due to its size. This is not intended
44-
# to reflect actual values defined server-side, but rather only be an upper
45-
# bound for events sent by the SDK.
46-
#
47-
# Can be overwritten if wanting to send more bytes, e.g. with a custom server.
48-
# When changing this, keep in mind that events may be a little bit larger than
49-
# this value due to attached metadata, so keep the number conservative.
50-
MAX_EVENT_BYTES = 10**6
51-
5242
# Maximum depth and breadth of databags. Excess data will be trimmed. If
5343
# max_request_body_size is "always", request bodies won't be trimmed.
5444
MAX_DATABAG_DEPTH = 5

tests/integrations/sqlalchemy/test_sqlalchemy.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@
1414
import sentry_sdk
1515
from sentry_sdk.consts import DEFAULT_MAX_VALUE_LENGTH, SPANDATA
1616
from sentry_sdk.integrations.sqlalchemy import SqlalchemyIntegration
17-
from sentry_sdk.serializer import MAX_EVENT_BYTES
1817
from sentry_sdk.tracing_utils import record_sql_queries
19-
from sentry_sdk.utils import json_dumps
2018

2119

2220
def test_orm_queries(sentry_init, capture_events):
@@ -256,8 +254,6 @@ def processor(event, hint):
256254

257255
(event,) = events
258256

259-
assert len(json_dumps(event)) > MAX_EVENT_BYTES
260-
261257
# Some spans are discarded.
262258
assert len(event["spans"]) == 1000
263259

0 commit comments

Comments
 (0)