This sample app reproduces a confirmed bug in the Sentry SvelteKit SDK.
To install and run, execute these commands in your terminal
yarn
yarn build
yarn previewIn vite.config.js, set autoInstrument to true
This will cause the Sentry tracing headers to be attached to outgoing requests, as configured in tracePropagationTargets in hooks.client.js.
The added headers produce a cache-miss.
In vite.config.js, set autoInstrument to false
This will no longer attach the Sentry tracing headers to be attached to outgoing requests. Hence, the SDK doesn't cause a cache-miss anymore.
patch-package is used to add a few debug console log statements to SvelteKit's client fetchers.js file to easily observe the cache hits and misses.