Skip to content

feat(sveltekit): Add SvelteKit routing instrumentation #7565

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 5 commits into from
Mar 22, 2023

Conversation

Lms24
Copy link
Member

@Lms24 Lms24 commented Mar 22, 2023

Add routing instrumentation to the client SvelteKit SDK. Pageload navigations are created on function call as always and updated with a proper name once the page store emits the route id. Navigation transactions are created by subscribing to the navigating store. No need for user configuration, as the instrumentation will be added automatically on SDK intialization.

I had to adjust test a bunch because the SvelteKit $app/stores import doesn't work in a non-SvelteKit app build (like in our unit tests). The unit tests aren't great but they're at least testing the instrumentation code itself. We'll need to add integration tests later on.

ref #7413

@Lms24 Lms24 force-pushed the lms/sveltekit-routing-instrumentation-ii branch from 4fdaecd to 846eae6 Compare March 22, 2023 11:21
@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 20.44 KB (-0.01% 🔽)
@sentry/browser - ES5 CDN Bundle (minified) 63.52 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 19.13 KB (-0.01% 🔽)
@sentry/browser - ES6 CDN Bundle (minified) 56.57 KB (0%)
@sentry/browser - Webpack (gzipped + minified) 21.59 KB (0%)
@sentry/browser - Webpack (minified) 71.65 KB (+0.01% 🔺)
@sentry/react - Webpack (gzipped + minified) 21.61 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified) 51.85 KB (-0.21% 🔽)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 27.77 KB (+0.06% 🔺)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 26.08 KB (+0.06% 🔺)
@sentry/replay ES6 CDN Bundle (gzipped + minified) 44.21 KB (-0.01% 🔽)
@sentry/replay - Webpack (gzipped + minified) 38.28 KB (0%)
@sentry/browser + @sentry/tracing + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 62.39 KB (+0.02% 🔺)
@sentry/browser + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 55.94 KB (-0.01% 🔽)

@Lms24 Lms24 merged commit e97b097 into develop Mar 22, 2023
@Lms24 Lms24 deleted the lms/sveltekit-routing-instrumentation-ii branch March 22, 2023 14:12
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