Skip to content

feat(sveltekit): Automatically add BrowserTracing integration #7528

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
Mar 21, 2023

Conversation

Lms24
Copy link
Member

@Lms24 Lms24 commented Mar 20, 2023

With this PR, the BrowserTracing integration is automatically added to the client SvelteKit SDK initialization. As in NextJS, tree-shaking will still work by replacing the __SENTRY_TRACING__ flag with false when bundling. Tested this with the rollup replace plugin.

Since we now use addOrUpdateIntegration in two SDKs, I opted to move it to the utils package.

ref #7413

@Lms24 Lms24 self-assigned this Mar 20, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Mar 20, 2023

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 20.53 KB (0%)
@sentry/browser - ES5 CDN Bundle (minified) 63.85 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 19.19 KB (0%)
@sentry/browser - ES6 CDN Bundle (minified) 56.92 KB (0%)
@sentry/browser - Webpack (gzipped + minified) 21.66 KB (0%)
@sentry/browser - Webpack (minified) 72.12 KB (0%)
@sentry/react - Webpack (gzipped + minified) 21.7 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified) 52.05 KB (+0.07% 🔺)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 33.76 KB (0%)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 26.13 KB (0%)
@sentry/replay ES6 CDN Bundle (gzipped + minified) 44.23 KB (0%)
@sentry/replay - Webpack (gzipped + minified) 38.28 KB (0%)
@sentry/browser + @sentry/tracing + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 62.44 KB (0%)
@sentry/browser + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 55.99 KB (0%)

Lms24 added 3 commits March 21, 2023 08:09
still missing testing for tree-shaking
kinda blocked on @sentry-internal/tracing
@Lms24 Lms24 force-pushed the lms/sveltekit-browsertracing branch from 02d0e33 to 965e8e5 Compare March 21, 2023 07:10
@Lms24 Lms24 merged commit 8b8bb47 into develop Mar 21, 2023
@Lms24 Lms24 deleted the lms/sveltekit-browsertracing branch March 21, 2023 08:26
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