feat(node)!: Make dataloader and knex integrations channel-only - #22754
Merged
Conversation
Removes the vendored OpenTelemetry fallback from the node `dataloaderIntegration` and `knexIntegration`, re-exporting the channel-based implementations from `@sentry/server-utils` directly. Previously these fell back to the vendored OTel instrumentation on runtimes without diagnostics-channel injection; they are now channel-only, consistent with the other performance integrations. Ref: #22346 Co-Authored-By: Claude Opus 4.8 <[email protected]>
chargome
approved these changes
Jul 28, 2026
JPeer264
approved these changes
Jul 28, 2026
mydea
added a commit
that referenced
this pull request
Sep 11, 2026
Add `dataloaderIntegration` and `knexIntegration` to `getTracingIntegrations()` so both are registered by default like every other channel-based integration. `dataloader` was removed from the defaults in v8 (#13873) due to an upstream OpenTelemetry bug (#13869) that broke custom DataLoader subclass methods. That issue is now closed and fixed upstream, and since #22754 the integration is channel-only — it no longer wraps/replaces the DataLoader class, so the original breakage mechanism no longer applies. `knex` was never enabled by default. Drop the now-redundant explicit registration from the node integration-test instrument files so they exercise the default path. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
mydea
added a commit
that referenced
this pull request
Sep 11, 2026
Adds `dataloaderIntegration` and `knexIntegration` to `getTracingIntegrations()`, so both ship as default tracing integrations like every other channel-based integration, rather than requiring users to register them manually. Both were the only two orchestrion-instrumented integrations that are publicly exported and have channel definitions but were absent from the default set. Investigating why surfaced that neither omission is still justified: - **`dataloader`** was originally a default (added in #13664) but was removed in #13873 because of an upstream OpenTelemetry bug (#13869) where instrumenting DataLoader broke custom subclass methods (`context.dataloaders.x.loadByInternalId is not a function`). That issue was fixed upstream ([open-telemetry/opentelemetry-js-contrib#2498](open-telemetry/opentelemetry-js-contrib#2498)) and closed on 2025-08-11, confirmed resolved on v10. On top of that, since #22754 the integration is channel-only: it instruments via `diagnostics_channel` and no longer wraps/replaces the `DataLoader` class, so the mechanism that caused the original breakage no longer exists. There is no remaining reason to keep it opt-in. - **`knex`** was never enabled by default — it was introduced (#13526) purely as an opt-in integration with no accompanying default-list change. There's no documented reason for it to stay opt-in, and it uses the same channel mechanism as the other DB integrations that are on by default. Users can still disable either via `defaultIntegrations`. The now-redundant explicit `dataloaderIntegration()` / `knexIntegration()` registrations are dropped from the node integration-test instrument files so those suites now exercise the default-registration path. The dataloader suite passes with no explicit registration, confirming the default wiring works end-to-end. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
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
Removes the vendored OpenTelemetry fallback from the node
dataloaderIntegrationandknexIntegration. 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