From 7992461be055eac9c1207a7f24822bace6e6ba5e Mon Sep 17 00:00:00 2001 From: Andrei Borza Date: Thu, 30 Jul 2026 14:31:23 +0200 Subject: [PATCH 1/5] ref(node)!: Remove `@opentelemetry/instrumentation` dependency `@sentry/node` was the last package holding `@opentelemetry/instrumentation`. All instrumentation is now channel-based via orchestrion, so the surface this dependency backed is dead or a no-op: - `generateInstrumentOnce` (and the framework re-exports) had no call sites. - `ensureIsWrapped`'s shimmer-based check can no longer detect channel-based express/koa/hapi, so its warning and the `missing_instrumentation` context were removed, along with the `disableInstrumentationWarnings` option and the `MissingInstrumentationContext` type. - The `@sentry/node/import` ESM hook now only registers the orchestrion diagnostics-channel injection; the legacy iitm `@sentry/node/loader` entry was removed. Adds the `makeOrchestrionLoader` rollup util (import-only, delegates to `@sentry/server-utils/orchestrion/import-hook`). The legacy `makeOtelLoaders` util is kept temporarily so the framework SDKs still build until they migrate in the following PRs. Co-Authored-By: Claude Opus 4.8 --- packages/node/src/import-hook.mjs | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 packages/node/src/import-hook.mjs diff --git a/packages/node/src/import-hook.mjs b/packages/node/src/import-hook.mjs new file mode 100644 index 000000000000..be8b19180659 --- /dev/null +++ b/packages/node/src/import-hook.mjs @@ -0,0 +1,10 @@ +// The `--import` entry for `@sentry/node`, referenced as `node --import @sentry/node/import app.js`. +// It registers the orchestrion diagnostics-channel injection before the app loads, so +// channel-based integrations record spans even when `Sentry.init()` runs after the +// instrumented libraries are imported. All of the registration logic lives in +// `@sentry/server-utils/orchestrion/register`; this file is just the side-effecting wrapper. +// +// This file is shipped as-is to `build/import-hook.mjs` (see `rollup.npm.config.mjs`). Keep it a +// single self-contained `.mjs` with no relative-path imports — `--import` resolves it (and the bare +// specifier below) via Node's module resolution against the installed package. +import '@sentry/server-utils/orchestrion/import-hook'; From 046b8a94bd034580a825bc901404b641e761b465 Mon Sep 17 00:00:00 2001 From: Andrei Borza Date: Thu, 30 Jul 2026 14:31:23 +0200 Subject: [PATCH 2/5] ref(node)!: Remove `@opentelemetry/instrumentation` dependency `@sentry/node` was the last package holding `@opentelemetry/instrumentation`. All instrumentation is now channel-based via orchestrion, so the surface this dependency backed is dead or a no-op: - `generateInstrumentOnce` (and the framework re-exports) had no call sites. - `ensureIsWrapped`'s shimmer-based check can no longer detect channel-based express/koa/hapi, so its warning and the `missing_instrumentation` context were removed, along with the `disableInstrumentationWarnings` option and the `MissingInstrumentationContext` type. - The `@sentry/node/import` ESM hook now only registers the orchestrion diagnostics-channel injection; the legacy iitm `@sentry/node/loader` entry was removed. Adds the `makeOrchestrionLoader` rollup util (import-only, delegates to `@sentry/server-utils/orchestrion/import-hook`). The legacy `makeOtelLoaders` util is kept temporarily so the framework SDKs still build until they migrate in the following PRs. Co-Authored-By: Claude Opus 4.8 --- MIGRATION.md | 1 + 1 file changed, 1 insertion(+) diff --git a/MIGRATION.md b/MIGRATION.md index 001133cfd3b1..57a00bdda70c 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -414,6 +414,7 @@ Sentry.init({ - The deprecated `SentryHttpInstrumentation` and `SentryNodeFetchInstrumentation` exports were removed. Use `instrumentHttpOutgoingRequests()` and the `nativeNodeFetchIntegration` respectively. - The `generateInstrumentOnce` export was removed (from `@sentry/node` and the framework SDKs that re-exported it). It wrapped OpenTelemetry's `registerInstrumentations` and is no longer needed now that instrumentation is channel-based. - The `@sentry/node/loader` entry point was removed. Use `node --import @sentry/node/import` instead. +- (Astro) The `@sentry/astro/loader` entry point was removed. Use `node --import @sentry/astro/import` instead. - (Fastify) The deprecated `setShouldHandleError` method was removed. - (AWS Lambda) The deprecated `disableAwsContextPropagation` option was removed. It no longer had any effect. - (AWS Lambda) The deprecated `startTrace` option was removed. It no longer had any effect; to disable tracing, set `tracesSampleRate` to `0`. From 5d9ab2c0051caa38199a82f103cc779ac3b8bc51 Mon Sep 17 00:00:00 2001 From: Andrei Borza Date: Thu, 30 Jul 2026 14:31:23 +0200 Subject: [PATCH 3/5] ref(node)!: Remove `@opentelemetry/instrumentation` dependency `@sentry/node` was the last package holding `@opentelemetry/instrumentation`. All instrumentation is now channel-based via orchestrion, so the surface this dependency backed is dead or a no-op: - `generateInstrumentOnce` (and the framework re-exports) had no call sites. - `ensureIsWrapped`'s shimmer-based check can no longer detect channel-based express/koa/hapi, so its warning and the `missing_instrumentation` context were removed, along with the `disableInstrumentationWarnings` option and the `MissingInstrumentationContext` type. - The `@sentry/node/import` ESM hook now only registers the orchestrion diagnostics-channel injection; the legacy iitm `@sentry/node/loader` entry was removed. Adds the `makeOrchestrionLoader` rollup util (import-only, delegates to `@sentry/server-utils/orchestrion/import-hook`). The legacy `makeOtelLoaders` util is kept temporarily so the framework SDKs still build until they migrate in the following PRs. Co-Authored-By: Claude Opus 4.8 --- MIGRATION.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/MIGRATION.md b/MIGRATION.md index 57a00bdda70c..0e7f302b81a3 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -34,7 +34,7 @@ Version 11 of the Sentry SDK has new compatibility ranges for runtimes and frame **Node.js:** The minimum supported Node.js version is now **20.19.0**. Node.js 18 is no longer supported. -**Deno:** The minimum supported Deno version is now **2.8.3**. +**Deno:** The minimum supported Deno version is now **2.8.2**. **Browsers:** Support for **Safari 14** was dropped. Sentry now requires Safari 15 or higher. For the rest of the browser support matrix, refer to the [Sentry docs](https://docs.sentry.io/platforms/javascript/#browser-support). @@ -260,7 +260,6 @@ Affected SDKs: All SDKs. - The `http.query` and `http.fragment` span attributes were renamed to `url.query` and `url.fragment`. - `network.*` span attributes were aligned across SDKs. - Legacy messaging (`messaging.*`) and database (`db.statement`, …) span attributes on the AMQP and Redis instrumentations were replaced by their current semantic-convention equivalents. -- The gen_ai cache token attributes `gen_ai.usage.cache_creation_input_tokens` and `gen_ai.usage.cache_read_input_tokens` were renamed to `gen_ai.usage.cache_creation.input_tokens` and `gen_ai.usage.cache_read.input_tokens`. - Span attributes now use the shared `@sentry/conventions` package under the hood. If you reference these attributes in custom instrumentation, `beforeSendSpan`, dashboards, or alerts, update them to the new names. From 2629e8d6ce6f1e1d91576215aec3218b97ffaa22 Mon Sep 17 00:00:00 2001 From: Andrei Borza Date: Thu, 30 Jul 2026 14:31:23 +0200 Subject: [PATCH 4/5] ref(node)!: Remove `@opentelemetry/instrumentation` dependency `@sentry/node` was the last package holding `@opentelemetry/instrumentation`. All instrumentation is now channel-based via orchestrion, so the surface this dependency backed is dead or a no-op: - `generateInstrumentOnce` (and the framework re-exports) had no call sites. - `ensureIsWrapped`'s shimmer-based check can no longer detect channel-based express/koa/hapi, so its warning and the `missing_instrumentation` context were removed, along with the `disableInstrumentationWarnings` option and the `MissingInstrumentationContext` type. - The `@sentry/node/import` ESM hook now only registers the orchestrion diagnostics-channel injection; the legacy iitm `@sentry/node/loader` entry was removed. Adds the `makeOrchestrionLoader` rollup util (import-only, delegates to `@sentry/server-utils/orchestrion/import-hook`). The legacy `makeOtelLoaders` util is kept temporarily so the framework SDKs still build until they migrate in the following PRs. Co-Authored-By: Claude Opus 4.8 --- MIGRATION.md | 1 + 1 file changed, 1 insertion(+) diff --git a/MIGRATION.md b/MIGRATION.md index 0e7f302b81a3..4bbb818569d1 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -414,6 +414,7 @@ Sentry.init({ - The `generateInstrumentOnce` export was removed (from `@sentry/node` and the framework SDKs that re-exported it). It wrapped OpenTelemetry's `registerInstrumentations` and is no longer needed now that instrumentation is channel-based. - The `@sentry/node/loader` entry point was removed. Use `node --import @sentry/node/import` instead. - (Astro) The `@sentry/astro/loader` entry point was removed. Use `node --import @sentry/astro/import` instead. +- (AWS Lambda) The `@sentry/aws-serverless/loader` entry point was removed. Use `node --import @sentry/aws-serverless/import` instead. - (Fastify) The deprecated `setShouldHandleError` method was removed. - (AWS Lambda) The deprecated `disableAwsContextPropagation` option was removed. It no longer had any effect. - (AWS Lambda) The deprecated `startTrace` option was removed. It no longer had any effect; to disable tracing, set `tracesSampleRate` to `0`. From decf59e3eaf3477edecf633a7b5b47ef86be4257 Mon Sep 17 00:00:00 2001 From: Andrei Borza Date: Thu, 30 Jul 2026 14:31:39 +0200 Subject: [PATCH 5/5] ref(astro)!: Migrate import hook to makeOrchestrionLoader Switch the `@sentry/astro/import` loader to the orchestrion-based `makeOrchestrionLoader` and drop the obsolete `./loader` export. --- MIGRATION.md | 4 ++-- packages/astro/package.json | 9 ++------- packages/astro/rollup.npm.config.mjs | 4 ++-- packages/node/src/import-hook.mjs | 10 ---------- 4 files changed, 6 insertions(+), 21 deletions(-) delete mode 100644 packages/node/src/import-hook.mjs diff --git a/MIGRATION.md b/MIGRATION.md index 4bbb818569d1..57a00bdda70c 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -34,7 +34,7 @@ Version 11 of the Sentry SDK has new compatibility ranges for runtimes and frame **Node.js:** The minimum supported Node.js version is now **20.19.0**. Node.js 18 is no longer supported. -**Deno:** The minimum supported Deno version is now **2.8.2**. +**Deno:** The minimum supported Deno version is now **2.8.3**. **Browsers:** Support for **Safari 14** was dropped. Sentry now requires Safari 15 or higher. For the rest of the browser support matrix, refer to the [Sentry docs](https://docs.sentry.io/platforms/javascript/#browser-support). @@ -260,6 +260,7 @@ Affected SDKs: All SDKs. - The `http.query` and `http.fragment` span attributes were renamed to `url.query` and `url.fragment`. - `network.*` span attributes were aligned across SDKs. - Legacy messaging (`messaging.*`) and database (`db.statement`, …) span attributes on the AMQP and Redis instrumentations were replaced by their current semantic-convention equivalents. +- The gen_ai cache token attributes `gen_ai.usage.cache_creation_input_tokens` and `gen_ai.usage.cache_read_input_tokens` were renamed to `gen_ai.usage.cache_creation.input_tokens` and `gen_ai.usage.cache_read.input_tokens`. - Span attributes now use the shared `@sentry/conventions` package under the hood. If you reference these attributes in custom instrumentation, `beforeSendSpan`, dashboards, or alerts, update them to the new names. @@ -414,7 +415,6 @@ Sentry.init({ - The `generateInstrumentOnce` export was removed (from `@sentry/node` and the framework SDKs that re-exported it). It wrapped OpenTelemetry's `registerInstrumentations` and is no longer needed now that instrumentation is channel-based. - The `@sentry/node/loader` entry point was removed. Use `node --import @sentry/node/import` instead. - (Astro) The `@sentry/astro/loader` entry point was removed. Use `node --import @sentry/astro/import` instead. -- (AWS Lambda) The `@sentry/aws-serverless/loader` entry point was removed. Use `node --import @sentry/aws-serverless/import` instead. - (Fastify) The deprecated `setShouldHandleError` method was removed. - (AWS Lambda) The deprecated `disableAwsContextPropagation` option was removed. It no longer had any effect. - (AWS Lambda) The deprecated `startTrace` option was removed. It no longer had any effect; to disable tracing, set `tracesSampleRate` to `0`. diff --git a/packages/astro/package.json b/packages/astro/package.json index b708ed3f06b4..006e03e4f4a3 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -42,11 +42,6 @@ "import": { "default": "./build/import-hook.mjs" } - }, - "./loader": { - "import": { - "default": "./build/loader-hook.mjs" - } } }, "publishConfig": { @@ -60,8 +55,8 @@ "@sentry/core": "10.67.0", "@sentry/conventions": "^0.16.0", "@sentry/node": "10.67.0", - "@sentry/bundler-plugins": "10.67.0", - "@sentry/server-utils": "10.67.0" + "@sentry/server-utils": "10.67.0", + "@sentry/bundler-plugins": "10.67.0" }, "devDependencies": { "astro": "^4.16.19", diff --git a/packages/astro/rollup.npm.config.mjs b/packages/astro/rollup.npm.config.mjs index ca3b338433a7..e4694afbff88 100644 --- a/packages/astro/rollup.npm.config.mjs +++ b/packages/astro/rollup.npm.config.mjs @@ -1,4 +1,4 @@ -import { makeBaseNPMConfig, makeNPMConfigVariants, makeOtelLoaders } from '@sentry-internal/rollup-utils'; +import { makeBaseNPMConfig, makeNPMConfigVariants, makeOrchestrionLoader } from '@sentry-internal/rollup-utils'; const variants = makeNPMConfigVariants( makeBaseNPMConfig({ @@ -14,4 +14,4 @@ const variants = makeNPMConfigVariants( }), ); -export default [...variants, ...makeOtelLoaders('./build', 'sentry-node')]; +export default [...variants, ...makeOrchestrionLoader('./build')]; diff --git a/packages/node/src/import-hook.mjs b/packages/node/src/import-hook.mjs deleted file mode 100644 index be8b19180659..000000000000 --- a/packages/node/src/import-hook.mjs +++ /dev/null @@ -1,10 +0,0 @@ -// The `--import` entry for `@sentry/node`, referenced as `node --import @sentry/node/import app.js`. -// It registers the orchestrion diagnostics-channel injection before the app loads, so -// channel-based integrations record spans even when `Sentry.init()` runs after the -// instrumented libraries are imported. All of the registration logic lives in -// `@sentry/server-utils/orchestrion/register`; this file is just the side-effecting wrapper. -// -// This file is shipped as-is to `build/import-hook.mjs` (see `rollup.npm.config.mjs`). Keep it a -// single self-contained `.mjs` with no relative-path imports — `--import` resolves it (and the bare -// specifier below) via Node's module resolution against the installed package. -import '@sentry/server-utils/orchestrion/import-hook';