Sitelet https://github.com/getsentry/sentry-javascript/pull/25160
Skip to content

fix(core): Exclude attachments from internal exception events - #25160

Merged
msonnb merged 2 commits into
developfrom
ms/internal-event-attachments
Oct 8, 2026
Merged

msonnb merged 2 commits into
developfrom
ms/internal-event-attachments

Conversation

@msonnb

@msonnb msonnb commented Oct 8, 2026

Copy link
Copy Markdown
Member

Internal exception events skip event processors and beforeSend to prevent recursion, so they must also omit attachments that those callbacks would normally filter. Exclude attachments when building internal event envelopes, including attachments added by send hooks, while preserving ordinary event attachments and scope state.

Fixes JS-2136.

@linear-code

linear-code Bot commented Oct 8, 2026

Copy link
Copy Markdown

JS-2136

@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 29.73 kB +0.03% +7 B 🔺
@sentry/browser - with treeshaking flags 27.85 kB -0.05% -12 B 🔽
@sentry/browser - with treeshaking flags tracing without tracing 27.76 kB +0.03% +8 B 🔺
@sentry/browser (incl. Tracing) 51.77 kB +0.05% +24 B 🔺
@sentry/browser (incl. Tracing + Span Streaming) 51.79 kB +0.08% +38 B 🔺
@sentry/browser (incl. Tracing, Profiling) 54.72 kB -0.01% -1 B 🔽
@sentry/browser (incl. Tracing, Replay) 91.47 kB +0.04% +33 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 80.35 kB +0.01% +7 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 96.18 kB +0.04% +33 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 109.16 kB +0.02% +11 B 🔺
@sentry/browser (incl. Feedback) 47.25 kB +0.02% +9 B 🔺
@sentry/browser (incl. sendFeedback) 34.77 kB -0.01% -1 B 🔽
@sentry/browser (incl. FeedbackAsync) 39.88 kB +0.06% +22 B 🔺
@sentry/browser (incl. Metrics) 30.75 kB +0.09% +26 B 🔺
@sentry/browser (incl. Logs) 31.03 kB +0.07% +21 B 🔺
@sentry/browser (incl. Metrics & Logs) 31.67 kB +0.02% +4 B 🔺
@sentry/react 31.55 kB +0.05% +13 B 🔺
@sentry/react (incl. Tracing) 54.1 kB +0.05% +23 B 🔺
@sentry/vue 37.76 kB +0.03% +10 B 🔺
@sentry/vue (incl. Tracing) 54.7 kB +0.05% +24 B 🔺
@sentry/svelte 29.75 kB +0.06% +16 B 🔺
@sentry/remix (Remix 3 client bundle) 56.76 kB +0.02% +6 B 🔺
CDN Bundle 31.44 kB +0.04% +10 B 🔺
CDN Bundle (incl. Tracing) 52.28 kB -0.01% -2 B 🔽
CDN Bundle (incl. Logs, Metrics) 33.65 kB +0.03% +10 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) 54.23 kB -0.01% -1 B 🔽
CDN Bundle (incl. Replay, Logs, Metrics) 74.55 kB +0.03% +18 B 🔺
CDN Bundle (incl. Tracing, Replay) 89.92 kB +0.02% +11 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 91.87 kB +0.01% +7 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 96.08 kB +0.03% +26 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 98.06 kB +0.01% +9 B 🔺
CDN Bundle - uncompressed 92.73 kB +0.02% +12 B 🔺
CDN Bundle (incl. Tracing) - uncompressed 155.26 kB +0.01% +12 B 🔺
CDN Bundle (incl. Logs, Metrics) - uncompressed 99.26 kB +0.02% +12 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 161.22 kB +0.01% +12 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 229.23 kB +0.01% +12 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 275.36 kB +0.01% +12 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 281.3 kB +0.01% +12 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 289.06 kB +0.01% +12 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 294.99 kB +0.01% +12 B 🔺
@sentry/nextjs (client) 56.46 kB +0.03% +14 B 🔺
@sentry/sveltekit (client) 52.16 kB +0.04% +19 B 🔺
@sentry/core/server 40.86 kB +0.03% +10 B 🔺
@sentry/core/browser 13.71 kB - -
@sentry/node 145.86 kB +0.01% +4 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 83.33 kB - -
@sentry/node - without tracing 93.67 kB +0.03% +20 B 🔺
@sentry/node - without channel injection 124.01 kB +0.02% +17 B 🔺
@sentry/aws-serverless 101.89 kB +0.01% +4 B 🔺
@sentry/cloudflare (withSentry) - minified 209.71 kB +0.02% +41 B 🔺
@sentry/cloudflare (withSentry) 519.94 kB +0.02% +54 B 🔺

View base workflow run

msonnb and others added 2 commits October 8, 2026 10:44
Co-Authored-By: GPT-6 <codex@openai.com>
@msonnb
msonnb force-pushed the ms/internal-event-attachments branch from 3b90ace to f948f1a Compare October 8, 2026 08:45
@msonnb

msonnb commented Oct 8, 2026

Copy link
Copy Markdown
Member Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit f948f1a. Configure here.

@msonnb
msonnb marked this pull request as ready for review October 8, 2026 08:57
@msonnb
msonnb requested review from Lms24 and chargome October 8, 2026 08:57
@msonnb
msonnb merged commit d283c16 into develop Oct 8, 2026
352 of 354 checks passed
@msonnb
msonnb deleted the ms/internal-event-attachments branch October 8, 2026 09:07
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.

3 participants