Closed
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/sveltekit
SDK Version
7.57.0
Framework Version
Sveltekit 1.22.1
Link to Sentry event
No response
SDK Setup
No response
Steps to Reproduce
- Add Sentry's
load
instrumentation via the vite plugin for Svetlekit as outlined in the docs - Create a
+layout.server.ts
in the root of the project - See it re-run on every single route change despite having no dependencies on url/params/etc
Expected Result
Layout load should not re-run unless its dependencies change or its explicitly invalidated
Actual Result
Layout load is invalidated on every route change, due to Sentry's instrumentation of load
.
Adding autoInstrument: false
to the vite plugin options resolves the issue.
Took me AGES to debug why my loads were rerunning constantly, breaking my app (I hydrate stores when they first run, and rehydrate on manual invalidation). This should be a huge warning in the docs if its not fixable due to patching sveltekit's fetch at the moment.
Metadata
Metadata
Assignees
Type
Projects
Status
Waiting for: Product Owner