Skip to content

Commit 0b882df

Browse files
.
1 parent 9d05831 commit 0b882df

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

sentry_sdk/utils.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
from sentry_sdk.consts import (
3030
DEFAULT_ADD_FULL_STACK,
3131
DEFAULT_MAX_STACK_FRAMES,
32-
DEFAULT_MAX_VALUE_LENGTH,
3332
EndpointType,
3433
)
3534
from sentry_sdk._types import Annotated, AnnotatedValue, SENSITIVE_DATA_SUBSTITUTE
@@ -730,7 +729,7 @@ def single_exception_from_error_tuple(
730729
if client_options is None:
731730
include_local_variables = True
732731
include_source_context = True
733-
max_value_length = DEFAULT_MAX_VALUE_LENGTH # fallback
732+
max_value_length = None # fallback
734733
custom_repr = None
735734
else:
736735
include_local_variables = client_options["include_local_variables"]
@@ -1211,7 +1210,7 @@ def strip_string(value, max_length=None):
12111210
return value
12121211

12131212
if max_length is None:
1214-
max_length = DEFAULT_MAX_VALUE_LENGTH
1213+
return value
12151214

12161215
byte_size = _get_size_in_bytes(value)
12171216
text_size = len(value)

tests/test_serializer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def test_no_trimming_if_max_request_body_size_is_always(body_normalizer):
165165
assert result == data
166166

167167

168-
def test_max_value_length_default(body_normalizer):
168+
def test_no_value_truncation_by_default(body_normalizer):
169169
data = {"key": "a" * (1_000_000)}
170170

171171
result = body_normalizer(data)

0 commit comments

Comments
 (0)