Skip to content

Conversation

@isaacs
Copy link
Member

@isaacs isaacs commented Dec 4, 2025

This is the functional portion addressing JS-1002.

Prior to truncating text messages for their byte length, any inline base64-encoded media properties are filtered out. This allows the message to possibly be included in the span, indicating to the user that a media object was present, without overflowing the allotted buffer for sending data.

If a media message is not removed, the fallback is still to simply remove it if its overhead grows too large.

Re JS-1002
Re GH-17810

Message truncation (for text length and inline media) still needs to be added to the docs.

@linear
Copy link

linear bot commented Dec 4, 2025

@isaacs isaacs requested a review from RulaKhaled December 4, 2025 22:11
isaacs added a commit that referenced this pull request Dec 4, 2025
This is the functional portion addressing JS-1002.

Prior to truncating text messages for their byte length, any inline
base64-encoded media properties are filtered out. This allows the
message to possibly be included in the span, indicating to the user that
a media object was present, without overflowing the allotted buffer for
sending data.

If a media message is not removed, the fallback is still to simply
remove it if its overhead grows too large.

Re JS-1002
Re GH-17810
@isaacs isaacs force-pushed the isaacschlueter/js-1002-drop-media-from-messages-in-sdks-and-document-behavior branch from 7c5aad2 to 3512099 Compare December 4, 2025 22:12
@github-actions
Copy link
Contributor

github-actions bot commented Dec 4, 2025

size-limit report 📦

Path Size % Change Change
@sentry/browser 24.81 kB - -
@sentry/browser - with treeshaking flags 23.3 kB - -
@sentry/browser (incl. Tracing) 41.55 kB - -
@sentry/browser (incl. Tracing, Profiling) 46.14 kB - -
@sentry/browser (incl. Tracing, Replay) 79.97 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 69.7 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 84.64 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 96.89 kB - -
@sentry/browser (incl. Feedback) 41.52 kB - -
@sentry/browser (incl. sendFeedback) 29.49 kB - -
@sentry/browser (incl. FeedbackAsync) 34.48 kB - -
@sentry/react 26.52 kB - -
@sentry/react (incl. Tracing) 43.75 kB - -
@sentry/vue 29.27 kB - -
@sentry/vue (incl. Tracing) 43.36 kB - -
@sentry/svelte 24.82 kB - -
CDN Bundle 27.24 kB - -
CDN Bundle (incl. Tracing) 42.23 kB - -
CDN Bundle (incl. Tracing, Replay) 78.75 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 84.21 kB - -
CDN Bundle - uncompressed 80.04 kB - -
CDN Bundle (incl. Tracing) - uncompressed 125.39 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 241.42 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 254.18 kB - -
@sentry/nextjs (client) 45.97 kB - -
@sentry/sveltekit (client) 41.92 kB - -
@sentry/node-core 51.5 kB - -
@sentry/node 160.31 kB +0.24% +369 B 🔺
@sentry/node - without tracing 92.91 kB - -
@sentry/aws-serverless 108.44 kB -0.01% -1 B 🔽

View base workflow run

@github-actions
Copy link
Contributor

github-actions bot commented Dec 4, 2025

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 11,388 - 9,410 +21%
GET With Sentry 1,972 17% 1,685 +17%
GET With Sentry (error only) 7,584 67% 6,040 +26%
POST Baseline 1,212 - 1,195 +1%
POST With Sentry 609 50% 581 +5%
POST With Sentry (error only) 1,053 87% 1,052 +0%
MYSQL Baseline 4,058 - 3,284 +24%
MYSQL With Sentry 568 14% 464 +22%
MYSQL With Sentry (error only) 3,328 82% 2,679 +24%

View base workflow run

isaacs added a commit that referenced this pull request Dec 5, 2025
This is the functional portion addressing JS-1002.

Prior to truncating text messages for their byte length, any inline
base64-encoded media properties are filtered out. This allows the
message to possibly be included in the span, indicating to the user that
a media object was present, without overflowing the allotted buffer for
sending data.

If a media message is not removed, the fallback is still to simply
remove it if its overhead grows too large.

Re JS-1002
Re GH-17810
@isaacs isaacs force-pushed the isaacschlueter/js-1002-drop-media-from-messages-in-sdks-and-document-behavior branch from 3512099 to 5d7bbc8 Compare December 5, 2025 23:13
isaacs added a commit that referenced this pull request Dec 8, 2025
This is the functional portion addressing JS-1002.

Prior to truncating text messages for their byte length, any inline
base64-encoded media properties are filtered out. This allows the
message to possibly be included in the span, indicating to the user that
a media object was present, without overflowing the allotted buffer for
sending data.

If a media message is not removed, the fallback is still to simply
remove it if its overhead grows too large.

If any truncation occurs, then a `client.recordDroppedEvent()` message
is fired, with the reason `before_send`, category `attachment`, and the
count of messages affected.

Re JS-1002
Re GH-17810
@isaacs isaacs force-pushed the isaacschlueter/js-1002-drop-media-from-messages-in-sdks-and-document-behavior branch from 5d7bbc8 to 3e58d4b Compare December 8, 2025 17:46
isaacs added a commit that referenced this pull request Dec 8, 2025
This is the functional portion addressing JS-1002.

Prior to truncating text messages for their byte length, any inline
base64-encoded media properties are filtered out. This allows the
message to possibly be included in the span, indicating to the user that
a media object was present, without overflowing the allotted buffer for
sending data.

If a media message is not removed, the fallback is still to simply
remove it if its overhead grows too large.

If any truncation occurs, then a `client.recordDroppedEvent()` message
is fired, with the reason `before_send`, category `attachment`, and the
count of messages affected.

Re JS-1002
Re GH-17810
@isaacs isaacs force-pushed the isaacschlueter/js-1002-drop-media-from-messages-in-sdks-and-document-behavior branch from 3e58d4b to 687dd68 Compare December 8, 2025 21:34
Copy link
Member

@RulaKhaled RulaKhaled left a comment

Choose a reason for hiding this comment

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

Very nice work. I left a comment can you please resolve it before merging? and i recommend adding an integration test for this after fixing lint issues.

isaacs added a commit that referenced this pull request Dec 9, 2025
This is the functional portion addressing JS-1002.

Prior to truncating text messages for their byte length, any inline
base64-encoded media properties are filtered out. This allows the
message to possibly be included in the span, indicating to the user that
a media object was present, without overflowing the allotted buffer for
sending data.

If a media message is not removed, the fallback is still to simply
remove it if its overhead grows too large.

If any truncation occurs, then a `client.recordDroppedEvent()` message
is fired, with the reason `before_send`, category `attachment`, and the
count of messages affected.

Re JS-1002
Re GH-17810
@isaacs isaacs force-pushed the isaacschlueter/js-1002-drop-media-from-messages-in-sdks-and-document-behavior branch from 687dd68 to 0b22140 Compare December 9, 2025 19:00
isaacs added a commit that referenced this pull request Dec 10, 2025
This is the functional portion addressing JS-1002.

Prior to truncating text messages for their byte length, any inline
base64-encoded media properties are filtered out. This allows the
message to possibly be included in the span, indicating to the user that
a media object was present, without overflowing the allotted buffer for
sending data.

If a media message is not removed, the fallback is still to simply
remove it if its overhead grows too large.

If any truncation occurs, then a `client.recordDroppedEvent()` message
is fired, with the reason `before_send`, category `attachment`, and the
count of messages affected.

Re JS-1002
Re GH-17810
@isaacs isaacs force-pushed the isaacschlueter/js-1002-drop-media-from-messages-in-sdks-and-document-behavior branch from 0b22140 to 6692634 Compare December 10, 2025 14:59
isaacs added a commit that referenced this pull request Dec 10, 2025
This is the functional portion addressing JS-1002.

Prior to truncating text messages for their byte length, any inline
base64-encoded media properties are filtered out. This allows the
message to possibly be included in the span, indicating to the user that
a media object was present, without overflowing the allotted buffer for
sending data.

If a media message is not removed, the fallback is still to simply
remove it if its overhead grows too large.

If any truncation occurs, then a `client.recordDroppedEvent()` message
is fired, with the reason `before_send`, category `attachment`, and the
count of messages affected.

Re JS-1002
Re GH-17810
@isaacs isaacs force-pushed the isaacschlueter/js-1002-drop-media-from-messages-in-sdks-and-document-behavior branch from 6692634 to f3ccd12 Compare December 10, 2025 15:56
isaacs added a commit that referenced this pull request Dec 10, 2025
This is the functional portion addressing JS-1002.

Prior to truncating text messages for their byte length, any inline
base64-encoded media properties are filtered out. This allows the
message to possibly be included in the span, indicating to the user that
a media object was present, without overflowing the allotted buffer for
sending data.

If a media message is not removed, the fallback is still to simply
remove it if its overhead grows too large.

Re JS-1002
Re GH-17810
@isaacs isaacs force-pushed the isaacschlueter/js-1002-drop-media-from-messages-in-sdks-and-document-behavior branch from f3ccd12 to ba36a66 Compare December 10, 2025 21:31
@isaacs isaacs marked this pull request as ready for review December 10, 2025 21:32
isaacs added a commit that referenced this pull request Dec 10, 2025
This is the functional portion addressing JS-1002.

Prior to truncating text messages for their byte length, any inline
base64-encoded media properties are filtered out. This allows the
message to possibly be included in the span, indicating to the user that
a media object was present, without overflowing the allotted buffer for
sending data.

If a media message is not removed, the fallback is still to simply
remove it if its overhead grows too large.

Re JS-1002
Re GH-17810
@isaacs isaacs force-pushed the isaacschlueter/js-1002-drop-media-from-messages-in-sdks-and-document-behavior branch from ba36a66 to 816ad3e Compare December 10, 2025 21:33
isaacs added a commit that referenced this pull request Dec 10, 2025
This is the functional portion addressing JS-1002.

Prior to truncating text messages for their byte length, any inline
base64-encoded media properties are filtered out. This allows the
message to possibly be included in the span, indicating to the user that
a media object was present, without overflowing the allotted buffer for
sending data.

If a media message is not removed, the fallback is still to simply
remove it if its overhead grows too large.

Re JS-1002
Re GH-17810
@isaacs isaacs force-pushed the isaacschlueter/js-1002-drop-media-from-messages-in-sdks-and-document-behavior branch from 816ad3e to 22a1a57 Compare December 10, 2025 23:12
isaacs added a commit that referenced this pull request Dec 10, 2025
This is the functional portion addressing JS-1002.

Prior to truncating text messages for their byte length, any inline
base64-encoded media properties are filtered out. This allows the
message to possibly be included in the span, indicating to the user that
a media object was present, without overflowing the allotted buffer for
sending data.

If a media message is not removed, the fallback is still to simply
remove it if its overhead grows too large.

Re JS-1002
Re GH-17810
@isaacs isaacs force-pushed the isaacschlueter/js-1002-drop-media-from-messages-in-sdks-and-document-behavior branch from 22a1a57 to 1095669 Compare December 10, 2025 23:13
isaacs added a commit that referenced this pull request Dec 11, 2025
This is the functional portion addressing JS-1002.

Prior to truncating text messages for their byte length, any inline
base64-encoded media properties are filtered out. This allows the
message to possibly be included in the span, indicating to the user that
a media object was present, without overflowing the allotted buffer for
sending data.

If a media message is not removed, the fallback is still to simply
remove it if its overhead grows too large.

Re JS-1002
Re GH-17810
@isaacs isaacs force-pushed the isaacschlueter/js-1002-drop-media-from-messages-in-sdks-and-document-behavior branch from 1095669 to 13bdae3 Compare December 11, 2025 22:53
isaacs added a commit that referenced this pull request Dec 11, 2025
This is the functional portion addressing JS-1002.

Prior to truncating text messages for their byte length, any inline
base64-encoded media properties are filtered out. This allows the
message to possibly be included in the span, indicating to the user that
a media object was present, without overflowing the allotted buffer for
sending data.

If a media message is not removed, the fallback is still to simply
remove it if its overhead grows too large.

Re JS-1002
Re GH-17810
@isaacs isaacs force-pushed the isaacschlueter/js-1002-drop-media-from-messages-in-sdks-and-document-behavior branch from 13bdae3 to 8db1461 Compare December 11, 2025 23:00
This is the functional portion addressing JS-1002.

Prior to truncating text messages for their byte length, any inline
base64-encoded media properties are filtered out. This allows the
message to possibly be included in the span, indicating to the user that
a media object was present, without overflowing the allotted buffer for
sending data.

If a media message is not removed, the fallback is still to simply
remove it if its overhead grows too large.

Re JS-1002
Re GH-17810
@isaacs isaacs force-pushed the isaacschlueter/js-1002-drop-media-from-messages-in-sdks-and-document-behavior branch from 8db1461 to 37b5364 Compare December 11, 2025 23:01
@isaacs isaacs merged commit 2e7a29e into develop Dec 12, 2025
401 of 403 checks passed
@isaacs isaacs deleted the isaacschlueter/js-1002-drop-media-from-messages-in-sdks-and-document-behavior branch December 12, 2025 18:50
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.

4 participants