You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f3f85a5
Browse filesBrowse the repository at this point in the historyBrowse files
fix(v10/sveltekit): Resolve @opentelemetry/api via the SDK on SvelteKit 3
Backport of #24736
Since `@sveltejs/kit@3.0.0-next.28` (sveltejs/kit#17081), the SvelteKit
server build keeps `@opentelemetry/api` external. With `tracing.server`
enabled, SvelteKit imports it at runtime from the app. Under pnpm or
Yarn PnP, the app cannot resolve it, because it is only a transitive
dependency of `@sentry/node`. Then SvelteKit fails every request with
`tracing_api_missing`. This is also why the `sveltekit-3` e2e app fails
on v10 against stable SvelteKit 3.
`@sentry/sveltekit` now depends on `@opentelemetry/api`, re-exports it
as `@sentry/sveltekit/opentelemetry-api`, and the `sentrySvelteKit()`
Vite plugin redirects SvelteKit's import to that re-export.
## Differences to the original PR
- `packages/sveltekit/package.json`: v10 has no `./vite` subpath export,
so only the `./opentelemetry-api` export is added. The dependency list
keeps the v10 packages and only adds `@opentelemetry/api`.
- `packages/sveltekit/rollup.npm.config.mjs`: only adds the
`src/opentelemetryApi.ts` entry point, not `src/vite/index.ts`.
- `packages/sveltekit/test/vite/sentrySvelteKitPlugins.test.ts`: v10 has
no orchestrion Vite plugin, so the expected plugin counts are one
lower than on `develop`.
(cherry picked from commit 2a58c97)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0 commit comments