Skip to content

fix: Wrap all console log instances in console sandbox #9662

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 27, 2023

Conversation

lforst
Copy link
Contributor

@lforst lforst commented Nov 27, 2023

Fixes #9640

@lforst lforst requested review from Lms24 and AbhiPrasad November 27, 2023 14:56
Copy link
Contributor

github-actions bot commented Nov 27, 2023

size-limit report 📦

Path Size
@sentry/browser (incl. Tracing, Replay) - Webpack (gzipped) 65.86 KB (-0.24% 🔽)
@sentry/browser (incl. Tracing, Replay) - Webpack with treeshaking flags (gzipped) 59.46 KB (+5.79% 🔺)
@sentry/browser (incl. Tracing) - Webpack (gzipped) 31.11 KB (-0.26% 🔽)
@sentry/browser - Webpack (gzipped) 21.38 KB (-0.12% 🔽)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (gzipped) 62.71 KB (+0.11% 🔺)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (gzipped) 29.52 KB (+0.19% 🔺)
@sentry/browser - ES6 CDN Bundle (gzipped) 21.6 KB (+0.2% 🔺)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (minified & uncompressed) 197.46 KB (+0.1% 🔺)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (minified & uncompressed) 89.32 KB (+0.2% 🔺)
@sentry/browser - ES6 CDN Bundle (minified & uncompressed) 64.29 KB (+0.27% 🔺)
@sentry/browser (incl. Tracing) - ES5 CDN Bundle (gzipped) 32.21 KB (+0.29% 🔺)
@sentry/react (incl. Tracing, Replay) - Webpack (gzipped) 66.24 KB (-0.28% 🔽)
@sentry/react - Webpack (gzipped) 21.42 KB (-0.12% 🔽)
@sentry/nextjs Client (incl. Tracing, Replay) - Webpack (gzipped) 82.96 KB (-0.25% 🔽)
@sentry/nextjs Client - Webpack (gzipped) 48.21 KB (-0.23% 🔽)
@sentry-internal/feedback - Webpack (gzipped) 16.19 KB (-0.02% 🔽)

@lforst lforst force-pushed the lforst-sandbox-console-messages branch from 7005f10 to df253ad Compare November 27, 2023 15:36
Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

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

LGTM! I wasn't aware (before last week) that this is such a problem but it totally makes sense.

I Was a bit unsure about us sandboxing console.error calls (e.g. Node, Sveltekit) that were just made to mimic default behaviour but after thinking for a bit, it also makes sense. We already caught the error in these situations anyway, so no need for CaptureConsole to come in again.

@lforst lforst merged commit 8ee1aa5 into develop Nov 27, 2023
@lforst lforst deleted the lforst-sandbox-console-messages branch November 27, 2023 16:48
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.

Create tests so internal console warnings do not make it to Sentry and count towards users error quota
3 participants