Skip to content

feat(node): move dc integration swap to _init - #22173

Merged
isaacs merged 1 commit into
developfrom
isaacs/node-move-default-integration-swap
Jul 13, 2026
Merged

feat(node): move dc integration swap to _init#22173
isaacs merged 1 commit into
developfrom
isaacs/node-move-default-integration-swap

Conversation

@isaacs

Copy link
Copy Markdown
Member

Move the diagnostics-channel integration swap out of getDefaultIntegrations and into _init, so it also applies to framework SDKs that pass their own defaultIntegrations array, and is skipped when defaults are explicitly empty.

This will be needed because the NestJS SDK (and others) build on top of the Node SDK, but swap out their default integrations.

@isaacs
isaacs requested a review from a team as a code ownerJuly 10, 2026 03:33
@isaacs
isaacs requested review from JPeer264, andreiborza and mydea and removed request for a teamJuly 10, 2026 03:33
@github-actions

github-actionsBot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize% ChangeChange
@sentry/browser27.6 kB--
@sentry/browser - with treeshaking flags26.04 kB--
@sentry/browser (incl. Tracing)46.35 kB--
@sentry/browser (incl. Tracing + Span Streaming)48.14 kB--
@sentry/browser (incl. Tracing, Profiling)51.13 kB--
@sentry/browser (incl. Tracing, Replay)85.62 kB--
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags75.26 kB--
@sentry/browser (incl. Tracing, Replay with Canvas)90.33 kB--
@sentry/browser (incl. Tracing, Replay, Feedback)102.99 kB--
@sentry/browser (incl. Feedback)44.78 kB--
@sentry/browser (incl. sendFeedback)32.4 kB--
@sentry/browser (incl. FeedbackAsync)37.53 kB--
@sentry/browser (incl. Metrics)28.68 kB--
@sentry/browser (incl. Logs)28.93 kB--
@sentry/browser (incl. Metrics & Logs)29.61 kB--
@sentry/react29.39 kB--
@sentry/react (incl. Tracing)48.62 kB--
@sentry/vue33.03 kB--
@sentry/vue (incl. Tracing)48.33 kB--
@sentry/svelte27.63 kB--
CDN Bundle30 kB--
CDN Bundle (incl. Tracing)48.33 kB--
CDN Bundle (incl. Logs, Metrics)31.58 kB--
CDN Bundle (incl. Tracing, Logs, Metrics)49.65 kB--
CDN Bundle (incl. Replay, Logs, Metrics)70.82 kB--
CDN Bundle (incl. Tracing, Replay)85.84 kB--
CDN Bundle (incl. Tracing, Replay, Logs, Metrics)87.16 kB--
CDN Bundle (incl. Tracing, Replay, Feedback)91.64 kB--
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics)92.92 kB--
CDN Bundle - uncompressed89.33 kB--
CDN Bundle (incl. Tracing) - uncompressed146.07 kB--
CDN Bundle (incl. Logs, Metrics) - uncompressed94.03 kB--
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed150.05 kB--
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed218.76 kB--
CDN Bundle (incl. Tracing, Replay) - uncompressed265.28 kB--
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed269.24 kB--
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed278.98 kB--
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed282.93 kB--
@sentry/nextjs (client)51.17 kB--
@sentry/sveltekit (client)46.8 kB--
@sentry/core/server78.42 kB--
@sentry/core/browser64.77 kB--
@sentry/node-core62.73 kB--
@sentry/node125.41 kB+0.05%+60 B 🔺
@sentry/node (incl. diagnostics channel injection)139.66 kB+0.02%+23 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection)69.96 kB--
@sentry/node/light50.73 kB--
@sentry/node - without tracing74.1 kB+0.09%+61 B 🔺
@sentry/aws-serverless83.32 kB+0.08%+64 B 🔺
@sentry/cloudflare (withSentry) - minified181.47 kB--
@sentry/cloudflare (withSentry)448.98 kB--

View base workflow run

@isaacs
isaacsforce-pushed the isaacs/node-move-default-integration-swap branch from 7b12bae to 63a580fCompareJuly 10, 2026 14:15
@isaacs
isaacsforce-pushed the isaacs/node-move-default-integration-swap branch from 63a580f to 89c3b4cCompareJuly 10, 2026 16:30
@isaacs
isaacsforce-pushed the isaacs/node-move-default-integration-swap branch from 89c3b4c to 1d877dfCompareJuly 10, 2026 16:53
Comment threadpackages/node/src/sdk/index.ts
Comment threadpackages/node/test/sdk/diagnosticsChannelInjection.test.ts
Base automatically changed from isaacs/update-apm-js to developJuly 10, 2026 17:16
@isaacs
isaacsforce-pushed the isaacs/node-move-default-integration-swap branch from 1d877df to 5d4d988CompareJuly 10, 2026 17:16

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 5d4d988. Configure here.

Comment threadpackages/node/src/sdk/index.ts
@isaacs
isaacsforce-pushed the isaacs/node-move-default-integration-swap branch from 5d4d988 to b2a369dCompareJuly 10, 2026 17:36
Move the diagnostics-channel integration swap out of
`getDefaultIntegrations` and into `_init`, so it also applies to
framework SDKs that pass their own `defaultIntegrations` array, and is
skipped when defaults are explicitly empty.
This will be needed because the NestJS SDK (and others) build on top of
the Node SDK, but swap out their default integrations.
@isaacs
isaacsforce-pushed the isaacs/node-move-default-integration-swap branch from b2a369d to 56289c4CompareJuly 13, 2026 00:42

@JPeer264JPeer264 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

super-l: I think this is more of a fix than a feat, but that's a nit and can be ignored.

@isaacs

Copy link
Copy Markdown
MemberAuthor

super-l: I think this is more of a fix than a feat, but that's a nit and can be ignored.

Oh, no, that's actually a great point. Idk what I was thinking, users 100% do not need this in the changelog 😅

I'll edit the commit headline and merge.

@isaacs
isaacs merged commit c038afd into developJul 13, 2026
410 of 412 checks passed
@isaacs
isaacs deleted the isaacs/node-move-default-integration-swap branch July 13, 2026 14:08
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@isaacs@JPeer264@andreiborza