Skip to content

fix(browser): Fix internal frame detection in minified bundles#20802

Open
chargome wants to merge 3 commits into
developfrom
cg/third-p-minified
Open

fix(browser): Fix internal frame detection in minified bundles#20802
chargome wants to merge 3 commits into
developfrom
cg/third-p-minified

Conversation

@chargome
Copy link
Copy Markdown
Member

The ignoreSentryInternalFrames option in thirdPartyErrorFilterIntegration relied on source-code-level signals (filename, context_line, comment patterns) that are all lost after minification.

This PR adds a runtime depth counter (GLOBAL_OBJ._sentryWrappedDepth) that tracks whether processEvent is running inside a sentryWrapped call. This works regardless of minification and also covers framework-caught errors (e.g. Vue swallowing the error before sentryWrapped's catch fires).

closes #20687

@chargome chargome self-assigned this May 11, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 11, 2026

size-limit report 📦

Path Size % Change Change
@sentry/browser 26.87 kB +0.08% +21 B 🔺
@sentry/browser - with treeshaking flags 25.3 kB +0.1% +24 B 🔺
@sentry/browser (incl. Tracing) 44.77 kB +0.08% +32 B 🔺
@sentry/browser (incl. Tracing + Span Streaming) 46.75 kB +0.05% +22 B 🔺
@sentry/browser (incl. Tracing, Profiling) 49.78 kB +0.07% +31 B 🔺
@sentry/browser (incl. Tracing, Replay) 84.4 kB +0.04% +26 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 73.83 kB +0.03% +16 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 89.1 kB +0.03% +24 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 101.74 kB +0.03% +24 B 🔺
@sentry/browser (incl. Feedback) 44.05 kB +0.06% +23 B 🔺
@sentry/browser (incl. sendFeedback) 31.68 kB +0.08% +24 B 🔺
@sentry/browser (incl. FeedbackAsync) 36.79 kB +0.06% +22 B 🔺
@sentry/browser (incl. Metrics) 27.95 kB +0.09% +25 B 🔺
@sentry/browser (incl. Logs) 28.1 kB +0.08% +21 B 🔺
@sentry/browser (incl. Metrics & Logs) 28.78 kB +0.09% +24 B 🔺
@sentry/react 28.62 kB +0.12% +32 B 🔺
@sentry/react (incl. Tracing) 47.03 kB +0.06% +25 B 🔺
@sentry/vue 31.79 kB +0.12% +36 B 🔺
@sentry/vue (incl. Tracing) 46.64 kB +0.11% +47 B 🔺
@sentry/svelte 26.89 kB +0.08% +20 B 🔺
CDN Bundle 29.25 kB +0.05% +12 B 🔺
CDN Bundle (incl. Tracing) 47.17 kB +0.04% +16 B 🔺
CDN Bundle (incl. Logs, Metrics) 30.62 kB +0.05% +14 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) 48.29 kB +0.03% +13 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) 69.96 kB +0.03% +20 B 🔺
CDN Bundle (incl. Tracing, Replay) 84.56 kB +0.02% +10 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 85.64 kB +0.02% +13 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 90.38 kB +0.02% +16 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 91.48 kB +0.02% +17 B 🔺
CDN Bundle - uncompressed 86.03 kB +0.05% +42 B 🔺
CDN Bundle (incl. Tracing) - uncompressed 141.51 kB +0.03% +42 B 🔺
CDN Bundle (incl. Logs, Metrics) - uncompressed 90.22 kB +0.05% +42 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 144.97 kB +0.03% +42 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 215.05 kB +0.02% +42 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 260.22 kB +0.02% +42 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 263.66 kB +0.02% +42 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 273.92 kB +0.02% +42 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 277.35 kB +0.02% +42 B 🔺
@sentry/nextjs (client) 49.55 kB +0.06% +25 B 🔺
@sentry/sveltekit (client) 45.26 kB +0.06% +25 B 🔺
@sentry/node-core 60.84 kB +0.02% +10 B 🔺
@sentry/node 165.98 kB +0.01% +9 B 🔺
@sentry/node - without tracing 73.96 kB +0.01% +5 B 🔺
@sentry/aws-serverless 108.07 kB +0.01% +5 B 🔺
@sentry/cloudflare (withSentry) - minified 170.66 kB - -
@sentry/cloudflare (withSentry) 430.47 kB - -

View base workflow run

@chargome chargome marked this pull request as ready for review May 11, 2026 13:14
@chargome chargome requested a review from a team as a code owner May 11, 2026 13:14
Comment thread packages/browser/src/helpers.ts
Comment thread packages/core/src/integrations/third-party-errors-filter.ts Outdated
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 1ae6a53. Configure here.

Comment thread packages/core/src/integrations/third-party-errors-filter.ts
Comment thread packages/core/src/integrations/third-party-errors-filter.ts
Comment thread packages/core/src/integrations/third-party-errors-filter.ts
@chargome chargome requested a review from logaretm May 12, 2026 09:16
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.

ignoreSentryInternalFrames in thirdPartyErrorFilterIntegration doesn't work when minification enabled

2 participants