Skip to content

feat: Disable string truncation for events by default - #6290

Merged
alexander-alderman-webb merged 1 commit into
masterfrom
webb/remove-string-truncation
May 19, 2026
Merged

feat: Disable string truncation for events by default#6290
alexander-alderman-webb merged 1 commit into
masterfrom
webb/remove-string-truncation

Conversation

@alexander-alderman-webb

@alexander-alderman-webbalexander-alderman-webb commented May 19, 2026

Copy link
Copy Markdown
Contributor

Description

Remove the default string limit applied when serializing envelopes by changing
max_value_length to default to None. Settingmax_value_length to None disables string truncation.

This follows the earlier limit increase in #4632.

Replace DEFAULT_MAX_VALUE_LENGTH with the value 1024 in tests, which was the original limit.

Issues

Closes SDK-1246

Reminders

@linear-code

Copy link
Copy Markdown

SDK-1246

@github-actions

github-actionsBot commented May 19, 2026

Copy link
Copy Markdown
Contributor

Codecov Results 📊

282 passed | Total: 282 | Pass Rate: 100% | Execution Time: 45.88s

📊 Comparison with Base Branch

MetricChange
Total Tests
Passed Tests
Failed Tests
Skipped Tests

✨ No test changes detected

All tests are passing successfully.

❌ Patch coverage is 66.67%. Project has 14857 uncovered lines.
❌ Project coverage is 33.5%. Comparing base (base) to head (head).

Files with missing lines (3)
FilePatch %Lines
utils.py51.50%⚠️ 454 Missing and 81 partials
serializer.py86.02%⚠️ 26 Missing and 11 partials
consts.py99.50%⚠️ 2 Missing
Coverage diff
@@ Coverage Diff @@## main #PR +/-##
==========================================
- Coverage 33.53% 33.50% -0.03%
==========================================
Files 190 190 —
Lines 22342 22340 -2
Branches 7576 7574 -2
==========================================
+ Hits 7492 7483 -9- Misses 14850 14857 +7- Partials 749 748 -1

Generated by Codecov Action

@alexander-alderman-webb
alexander-alderman-webb marked this pull request as ready for review May 19, 2026 09:42
@alexander-alderman-webb
alexander-alderman-webb requested a review from a team as a code ownerMay 19, 2026 09:42
@alexander-alderman-webbalexander-alderman-webb changed the title feat: Remove string truncation for eventsfeat: Remove string truncation for events by defaultMay 19, 2026
Comment threadsentry_sdk/consts.py

@sentrivanasentrivana left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make sure to call this out in the changelog and let people know how to mitigate if they run into trouble (max_value_length)

@alexander-alderman-webbalexander-alderman-webb changed the title feat: Remove string truncation for events by defaultfeat: Disable string truncation for events by defaultMay 19, 2026
@alexander-alderman-webb
alexander-alderman-webb merged commit 66824a4 into masterMay 19, 2026
157 checks passed
@alexander-alderman-webb
alexander-alderman-webb deleted the webb/remove-string-truncation branch May 19, 2026 12:08
mgaligniana pushed a commit to mgaligniana/sentry-python that referenced this pull request Aug 9, 2026
Remove the default string limit applied when serializing envelopes by changing
`max_value_length` to default to `None`. Setting `max_value_length` to `None` disables string truncation.
This follows the earlier limit increase in getsentry@4f9d326.
Replace `DEFAULT_MAX_VALUE_LENGTH` with the value 1024 in tests, which was the original limit.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@alexander-alderman-webb@sentrivana