feat(node)!: Make channel-based instrumentation the default - #22501
Merged
Conversation
Contributor
size-limit report 📦
|
andreiborza
force-pushed
the
ab/channel-based-default
branch
from
July 23, 2026 11:56
921217b to
e9cde04
Compare
andreiborza
force-pushed
the
ab/channel-based-default
branch
from
July 24, 2026 09:07
404fb86 to
c9a6733
Compare
andreiborza
force-pushed
the
ab/channel-based-default
branch
2 times, most recently
from
July 24, 2026 13:12
bd63462 to
3f9a563
Compare
andreiborza
force-pushed
the
ab/channel-based-default
branch
7 times, most recently
from
July 24, 2026 17:05
9808b49 to
9bd4d80
Compare
Make orchestrion diagnostics-channel injection the default in `@sentry/node` and remove the `experimentalUseDiagnosticsChannelInjection()` opt-in. `Sentry.init()` now installs the channel-injection module hooks unconditionally when span recording is enabled, so the opt-in function, its loader indirection, and the name-based OTel->channel integration swap are gone. The self-selecting `dataloader` and `knex` integrations pick the channel path automatically now that `isOrchestrionInjected()` is true by default. Redis stays a composite integration: the native diagnostics-channel subscribers (node-redis >=5.12, ioredis >=5.11, batches) plus the orchestrion subscribers for the older ranges, all sharing the node cache `responseHook`. The vendored OTel patchers only run on runtimes without `tracingChannel` (Node <18.19). BREAKING CHANGE: `experimentalUseDiagnosticsChannelInjection()`, `diagnosticsChannelInjectionIntegrations()`, `isDiagnosticsChannelInjectionEnabled()` and `applyDiagnosticsChannelInjectionIntegrations()` are removed from `@sentry/node`. Channel-based instrumentation is now always on; no opt-in call is needed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jul 28, 2026
andreiborza
added a commit
that referenced
this pull request
Jul 28, 2026
## What Removes the dead vendored OpenTelemetry Google GenAI instrumentation from `@sentry/node`. ## Why The Google GenAI integration is now provided by the channel-based implementation in `@sentry/server-utils` (the default since #22501). The vendored instrumentation here is no longer wired into the SDK, so it is pure dead code. Ref: #22346 Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
andreiborza
added a commit
that referenced
this pull request
Jul 28, 2026
## What Removes the dead vendored OpenTelemetry GraphQL instrumentation from `@sentry/node`. ## Why The GraphQL integration is now provided by the channel-based implementation in `@sentry/server-utils` (the default since #22501). The vendored instrumentation here is no longer wired into the SDK, so it is pure dead code. Ref: #22346 Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
andreiborza
added a commit
that referenced
this pull request
Jul 28, 2026
## What Removes the dead vendored OpenTelemetry amqplib instrumentation from `@sentry/node`. ## Why The amqplib integration is now provided by the channel-based implementation in `@sentry/server-utils` (the default since #22501). The vendored instrumentation here is no longer wired into the SDK, so it is pure dead code. Ref: #22346 Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
andreiborza
added a commit
that referenced
this pull request
Jul 28, 2026
## What Removes the dead vendored OpenTelemetry generic-pool instrumentation from `@sentry/node`. ## Why The generic-pool integration is now provided by the channel-based implementation in `@sentry/server-utils` (the default since #22501). The vendored instrumentation here is no longer wired into the SDK, so it is pure dead code. Ref: #22346 Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
andreiborza
added a commit
that referenced
this pull request
Jul 28, 2026
## What Removes the dead vendored OpenTelemetry mysql instrumentation from `@sentry/node`. ## Why The mysql integration is now provided by the channel-based implementation in `@sentry/server-utils` (the default since #22501). The vendored instrumentation here is no longer wired into the SDK, so it is pure dead code. Ref: #22346 Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
andreiborza
added a commit
that referenced
this pull request
Jul 28, 2026
## What Removes the dead vendored OpenTelemetry mysql2 instrumentation from `@sentry/node`. ## Why The mysql2 integration is now provided by the channel-based implementation in `@sentry/server-utils` (the default since #22501). The vendored instrumentation here is no longer wired into the SDK, so it is pure dead code. Ref: #22346 Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
andreiborza
added a commit
that referenced
this pull request
Jul 28, 2026
## What Removes the dead vendored OpenTelemetry Vercel AI instrumentation from `@sentry/node`. ## Why The Vercel AI integration is now provided by the channel-based implementation in `@sentry/server-utils` (the default since #22501). The vendored instrumentation here is no longer wired into the SDK, so it is pure dead code. Ref: #22346 Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
andreiborza
added a commit
that referenced
this pull request
Jul 28, 2026
## What Removes the dead vendored OpenTelemetry tedious instrumentation from `@sentry/node`. ## Why The tedious integration is now provided by the channel-based implementation in `@sentry/server-utils` (the default since #22501). The vendored instrumentation here is no longer wired into the SDK, so it is pure dead code. Ref: #22346 Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
andreiborza
added a commit
that referenced
this pull request
Jul 28, 2026
## What Removes the dead OpenTelemetry `HapiInstrumentation` (and `instrumentHapi`) plus its vendored code from `@sentry/node`. Keeps `setupHapiErrorHandler`. ## Why The Hapi integration is now provided by the channel-based implementation in `@sentry/server-utils` (the default since #22501). The vendored instrumentation is no longer wired up; only the Sentry-specific error handler remains user-facing. Ref: #22346 Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
andreiborza
added a commit
that referenced
this pull request
Jul 28, 2026
## What Removes the dead vendored OpenTelemetry kafkajs instrumentation from `@sentry/node`. ## Why The kafkajs integration is now provided by the channel-based implementation in `@sentry/server-utils` (the default since #22501). The vendored instrumentation here is no longer wired into the SDK, so it is pure dead code. Ref: #22346 Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
andreiborza
added a commit
that referenced
this pull request
Jul 28, 2026
## What Removes the vendored OpenTelemetry fallback from the node `dataloaderIntegration` and `knexIntegration`. They are now re-exported directly from `@sentry/server-utils`, matching the other channel-based integrations. ## Why These were the only two integrations still keeping a vendored OTel instrumentation as a runtime fallback (used when diagnostics-channel injection was unavailable). Making them channel-only removes the last vendored DB instrumentation and aligns them with every other integration since channel-based became the default (#22501). Note: on runtimes without diagnostics-channel injection (e.g. Bun, Deno, older Node, or when injection fails), these integrations no longer produce spans, consistent with the other integrations. Ref: #22346 Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
andreiborza
added a commit
that referenced
this pull request
Jul 28, 2026
## What Removes the dead OpenTelemetry `KoaInstrumentation` (and `instrumentKoa`) plus its vendored code from `@sentry/node`. Keeps `setupKoaErrorHandler`. ## Why The Koa integration is now provided by the channel-based implementation in `@sentry/server-utils` (the default since #22501). The vendored instrumentation is no longer wired up; only the Sentry-specific error handler remains user-facing. Ref: #22346 Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
andreiborza
added a commit
that referenced
this pull request
Jul 28, 2026
## What Removes the dead vendored OpenTelemetry `redis` and `ioredis` instrumentations (and their shared `semconv.ts`) from `@sentry/node`. Keeps the `redisIntegration` wrapper, `cache.ts`, and the `vendored/types.ts` that `cache.ts` still imports. ## Why The redis integration is now provided by the channel-based implementation in `@sentry/server-utils` (the default since #22501). The vendored OTel instrumentations are no longer wired into the SDK, so they are pure dead code. Ref: #22346 Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
andreiborza
added a commit
that referenced
this pull request
Jul 28, 2026
## What Removes the dead OpenTelemetry `ExpressInstrumentation` class (and `instrumentExpress`) from `@sentry/node`. Keeps `setupExpressErrorHandler` / `expressErrorHandler`. ## Why The express integration is now provided by the channel-based implementation in `@sentry/server-utils` (the default since #22501). The vendored instrumentation is no longer wired up; only the Sentry-specific error handler remains user-facing. Ref: #22346 Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
andreiborza
added a commit
that referenced
this pull request
Jul 28, 2026
## What Removes the dead vendored OpenTelemetry postgres (pg) instrumentation from `@sentry/node`. ## Why The postgres (pg) integration is now provided by the channel-based implementation in `@sentry/server-utils` (the default since #22501). The vendored instrumentation here is no longer wired into the SDK, so it is pure dead code. Ref: #22346 Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
andreiborza
added a commit
that referenced
this pull request
Jul 28, 2026
## What Removes the dead vendored OpenTelemetry LangGraph instrumentation from `@sentry/node`. ## Why The LangGraph integration is now provided by the channel-based implementation in `@sentry/server-utils` (the default since #22501). The vendored instrumentation here is no longer wired into the SDK, so it is pure dead code. Ref: #22346 Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
andreiborza
added a commit
that referenced
this pull request
Jul 28, 2026
## What Removes the dead vendored OpenTelemetry MongoDB instrumentation from `@sentry/node`. ## Why The MongoDB integration is now provided by the channel-based implementation in `@sentry/server-utils` (the default since #22501). The vendored instrumentation here is no longer wired into the SDK, so it is pure dead code. Ref: #22346 Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
andreiborza
added a commit
that referenced
this pull request
Jul 28, 2026
## What Removes the dead vendored OpenTelemetry lru-memoizer instrumentation from `@sentry/node`. ## Why The lru-memoizer integration is now provided by the channel-based implementation in `@sentry/server-utils` (the default since #22501). The vendored instrumentation here is no longer wired into the SDK, so it is pure dead code. Ref: #22346 Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
andreiborza
added a commit
that referenced
this pull request
Jul 28, 2026
## What Removes the dead vendored OpenTelemetry LangChain instrumentation from `@sentry/node`. ## Why The LangChain integration is now provided by the channel-based implementation in `@sentry/server-utils` (the default since #22501). The vendored instrumentation here is no longer wired into the SDK, so it is pure dead code. Ref: #22346 Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
andreiborza
added a commit
that referenced
this pull request
Jul 28, 2026
## What Removes the dead vendored OpenTelemetry Mongoose instrumentation from `@sentry/node`. ## Why The Mongoose integration is now provided by the channel-based implementation in `@sentry/server-utils` (the default since #22501). The vendored instrumentation here is no longer wired into the SDK, so it is pure dead code. Ref: #22346 Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
andreiborza
added a commit
that referenced
this pull request
Jul 28, 2026
## What Removes the dead vendored OpenTelemetry OpenAI instrumentation from `@sentry/node`. ## Why The OpenAI integration is now provided by the channel-based implementation in `@sentry/server-utils` (the default since #22501). The vendored instrumentation here is no longer wired into the SDK, so it is pure dead code. Ref: #22346 Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
andreiborza
added a commit
that referenced
this pull request
Jul 28, 2026
## What Removes the dead vendored OpenTelemetry Firebase instrumentation from `@sentry/node`. ## Why The Firebase integration is now provided by the channel-based implementation in `@sentry/server-utils` (the default since #22501). The vendored instrumentation here is no longer wired into the SDK, so it is pure dead code. Ref: #22346 Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
andreiborza
added a commit
that referenced
this pull request
Jul 28, 2026
## What Removes the dead vendored OpenTelemetry postgres.js (`postgres`) instrumentation from `@sentry/node`. ## Why The postgres.js integration is now provided by the channel-based implementation in `@sentry/server-utils` (the default since #22501). The vendored instrumentation here is no longer wired into the SDK, so it is pure dead code. Ref: #22346 Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
andreiborza
added a commit
that referenced
this pull request
Jul 28, 2026
## What Removes the dead vendored OpenTelemetry Anthropic AI instrumentation from `@sentry/node`. ## Why The Anthropic AI integration is now provided by the channel-based implementation in `@sentry/server-utils` (the default since #22501). The vendored instrumentation here is no longer wired into the SDK, so it is pure dead code. Ref: #22346 Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
andreiborza
added a commit
that referenced
this pull request
Jul 28, 2026
## What Drops support for Fastify `<3.21.0` by removing `FastifyInstrumentationV3` (and `instrumentFastifyV3`). The node `fastifyIntegration` becomes a thin pass-through to the channel-based integration in `@sentry/server-utils`. ## Why The channel-based `fastifyIntegration` (default since #22501) covers Fastify `>=3.21.0 <6`. The v3 OpenTelemetry instrumentation only existed to fill the `>=3.0.0 <3.21.0` gap, and it was the last remaining import-in-the-middle module-patcher in `@sentry/node`. Dropping the old Fastify range lets us remove it. Ref: #22346 --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
andreiborza
added a commit
that referenced
this pull request
Jul 28, 2026
…strumentation base (#22755) ## What Final cleanup PR. Once the vendored OpenTelemetry instrumentations are gone, `@sentry/node` has no import-in-the-middle module patchers left, so this removes the remaining iitm plumbing: * Remove the `registerEsmLoaderHooks` option from `NodeOptions` and drop the `import-in-the-middle` dependency. * Delete the shared `InstrumentationNodeModuleFile` helper, `esmLoader.ts`, and the ESM-loader detection util. * Remove the deprecated `SentryHttpInstrumentation` and `SentryNodeFetchInstrumentation` classes. The live diagnostics-channel-based `instrumentHttpOutgoingRequests` / `instrumentUndici` functions are kept. * Delete the now-obsolete `esm/import-in-the-middle` integration-test suite and add the changelog entry. ## Why These were the last pieces tying `@sentry/node` to import-in-the-middle. All performance integrations are channel-based via `@sentry/server-utils` (default since #22501), so the ESM loader hook served nothing. > **Depends on the per-integration removal PRs.** This branch deletes `InstrumentationNodeModuleFile`, which the vendored instrumentations still import on `develop`, so CI here stays red until those PRs merge. It should be merged last. Closes: #22346 --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Make orchestrion diagnostics-channel instrumentation the default in
@sentry/nodeand remove theexperimentalUseDiagnosticsChannelInjection()opt-in.Why
The channel-based instrumentations shipped opt-in in v10. Making them the default in v11 unlocks instrumentation at run and build time.
Removal of the vendored OTel/IITM code is intentionally out of scope; it is tracked separately as follow-up.
Closes: #22345