Skip to content

Commit 830a18a

Browse files
committed
add migration guide
1 parent 5d60a39 commit 830a18a

1 file changed

Lines changed: 29 additions & 5 deletions

File tree

‎MIGRATION.md‎

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1195,6 +1195,34 @@ Affected SDKs: `@sentry/cloudflare`.
11951195
11961196
Calls to rate limiter bindings (`env.MY_RATE_LIMITER.limit()`) no longer create a span. The removed span had the op `rpc`, the origin `auto.faas.cloudflare.rate_limit`, and the attribute `rpc.service: cloudflare.rate_limit`. Remove any dashboard, alert, or `ignoreSpans` entry that references it.
11971197
1198+
### `@sentry/nuxt`: the server config is bundled, `--import` is no longer needed
1199+
1200+
The SDK now bundles `sentry.server.config.ts` into the Nitro server build, where it initializes itself when the server starts. Instrumentation happens at build time, so preloading the config file is no longer necessary.
1201+
1202+
Remove the `--import` flag from your production start command:
1203+
1204+
```bash
1205+
# before
1206+
node --import ./.output/server/sentry.server.config.mjs .output/server/index.mjs
1207+
1208+
# after
1209+
node .output/server/index.mjs
1210+
```
1211+
1212+
Old start commands keep working: the SDK still emits a file at the old path, but it only prints a reminder that the flag can be removed. If you preload a file that calls `Sentry.init` yourself, that init wins and the bundled one is skipped.
1213+
1214+
The same applies in development. Remove the `NODE_OPTIONS` preload:
1215+
1216+
```bash
1217+
# before
1218+
NODE_OPTIONS='--import ./.nuxt/dev/sentry.server.config.mjs' nuxt dev
1219+
1220+
# after
1221+
nuxt dev
1222+
```
1223+
1224+
Since no preload is needed anymore, the `autoInjectServerSentry` option (`'top-level-import'` and `'experimental_dynamic-import'`) and `experimental_entrypointWrappedFunctions` are deprecated. Remove them from your `sentry` module options as the default behavior replaces both. They will be deleted in the next major version.
1225+
11981226
### `@sentry/ember` is now a v2 addon with manual setup
11991227
12001228
Affected SDKs: `@sentry/ember`.
@@ -1698,11 +1726,7 @@ public/instrument.server.ts
16981726
sentry.server.config.ts
16991727
```
17001728
1701-
After the rename, the SDK also emits `.output/server/sentry.server.config.mjs` for you to preload:
1702-
1703-
```bash
1704-
node --import ./.output/server/sentry.server.config.mjs .output/server/index.mjs
1705-
```
1729+
After the rename, the SDK bundles the file into the Nitro server build and initializes itself at server startup. See ["the server config is bundled"](#sentrynuxt-the-server-config-is-bundled---import-is-no-longer-needed) above: the `--import` preload is no longer needed.
17061730
17071731
The deprecated `sourceMapsUploadOptions` module option was removed. Move its fields to the root level of the `sentry` module options. Note that `url` was renamed to `sentryUrl`, and `enabled` was replaced by `sourcemaps.disable` (inverted: `enabled: false` becomes `sourcemaps: { disable: true }`).
17081732

0 commit comments

Comments
 (0)