feat(core): Use `maxValueLength` on error messages by s1gr1d · Pull Request #18301 · getsentry/sentry-javascript · GitHub
Skip to content

feat(core): Use maxValueLength on error messages - #18301

Merged
s1gr1d merged 1 commit into
developfrom
sig/message-truncation
Nov 24, 2025
Merged

s1gr1d merged 1 commit into
developfrom
sig/message-truncation

Conversation

@s1gr1d

@s1gr1d s1gr1d commented Nov 24, 2025

Copy link
Copy Markdown
Member

It can happen that error messages are too long and exceed the maximum envelope size (mentioned in #18219). maxValueLength now also checks for long error messages and truncates them.

@github-actions

Copy link
Copy Markdown
Contributor

@s1gr1d
s1gr1d requested a review from andreiborza November 24, 2025 10:36
@github-actions

Copy link
Copy Markdown
Contributor

node-overhead report 🧳

Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.

Scenario Requests/s % of Baseline Prev. Requests/s Change %
GET Baseline 8,796 - 8,686 +1%
GET With Sentry 1,766 20% 1,689 +5%
GET With Sentry (error only) 5,950 68% 5,970 -0%
POST Baseline 1,195 - 1,210 -1%
POST With Sentry 593 50% 591 +0%
POST With Sentry (error only) 1,060 89% 1,064 -0%
MYSQL Baseline 3,306 - 3,309 -0%
MYSQL With Sentry 492 15% 496 -1%
MYSQL With Sentry (error only) 2,674 81% 2,701 -1%

View base workflow run

@Lms24 Lms24 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice! I like the idea of offering a way to truncate but not do it by default!

@s1gr1d
s1gr1d merged commit 6240191 into develop Nov 24, 2025
198 checks passed
@s1gr1d
s1gr1d deleted the sig/message-truncation branch November 24, 2025 14:53
Sign up for free to 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