Description
First Step to the new SvelteKit SDK: Setting up the package and figuring out how we can provide the best SDK init DX.
Ideally, we'd like to achieve similar DX as in the NextJS SDK: Users provide sentry.(server|client).config.(ts|js)
config files with a Sentry.init
call to the respective SDK. These files are added to the entry points of the client/server bundles and that's how we initialize the SDK as early as possible in the application life cycle.
- [ ] #7365
- [ ] #7377
- [ ] #7391
- [ ] https://github.com/getsentry/sentry-javascript/pull/7408
Alternative Approach:
If the "entry point injection" doesn't work, we can still resort to initializing the SDKs in hooks.(client|server).ts
files, which are part of SvelteKit and initialize very early in the life cycle.
Once we have a working auto-wrapping approach, we could theoretically also explore injecting the init call into the hooks files.