Skip to content

ref(node): Merge @sentry/node-core back into @sentry/node#22418

Merged
andreiborza merged 6 commits into
developfrom
ab/merge-node-core-into-node
Jul 22, 2026
Merged

ref(node): Merge @sentry/node-core back into @sentry/node#22418
andreiborza merged 6 commits into
developfrom
ab/merge-node-core-into-node

Conversation

@andreiborza

@andreiborza andreiborza commented Jul 21, 2026

Copy link
Copy Markdown
Member

What

Removes the @sentry/node-core package and folds its functionality back into @sentry/node.

  • Moves all node-core source into @sentry/node; the composite HTTP and node-fetch integrations become the canonical implementations.
  • Drops light mode and the optional OTel peer-dependency model. @sentry/node keeps only the OpenTelemetry dependencies it actually uses (@opentelemetry/core promoted to a direct dependency; exporter-trace-otlp-http dropped).
  • Migrates consumers (effect, aws-serverless, bun, google-cloud-serverless, nuxt) off @sentry/node-core.
  • Merges the node-core unit and integration tests that add coverage into @sentry/node and node-integration-tests; discards the redundant ones. Removes the node-core-integration-tests package and the node-core e2e apps.
  • Removes @sentry/node-core from workspaces, .craft.yml, .size-limit.js, CODEOWNERS, and CI.

The public API surface of @sentry/node is unchanged.

@sentry/effect

@sentry/effect server now runs on full @sentry/node (previously @sentry/node-core/light) and disables node's default integrations, since it provides its own tracing, logging and error capture. Its server transaction e2e tests are marked test.fixme: light mode set an AsyncLocalStorage async context strategy that matched Effect's fiber model, whereas full node installs the OpenTelemetry context strategy, so the Effect tracer's spans are no longer emitted as transactions. Adapting Effect's server tracing to the full-node context model is follow-up work.

Why

@sentry/node-core was split out to offer the Node client without bundled OpenTelemetry instrumentation and with widened OTel peer ranges. The story around node without OpenTelemetry will change in v11 and we will no longer need this distinctive SDKs. The so-called light mode will be achievable with our regular node SDK in follow up PRs.


For reviewers:

  1. Move @sentry/node-core source into @sentry/node: db7ec22
  2. Migrate consumer SDKs off @sentry/node-core: cd41021
  3. Merge node-core tests into @sentry/node and node-integration-tests: 17665c0
  4. Remove @sentry/node-core package and its test/CI infrastructure: 226cdfc

Closes #21469

@andreiborza

andreiborza commented Jul 21, 2026

Copy link
Copy Markdown
Member Author

batman begin

@cursor cursor Bot 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.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 6986207. Configure here.

@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 27.76 kB - -
@sentry/browser - with treeshaking flags 26.2 kB - -
@sentry/browser (incl. Tracing) 46.59 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 48.4 kB - -
@sentry/browser (incl. Tracing, Profiling) 51.39 kB - -
@sentry/browser (incl. Tracing, Replay) 85.83 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 75.47 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 90.56 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 103.22 kB - -
@sentry/browser (incl. Feedback) 44.95 kB - -
@sentry/browser (incl. sendFeedback) 32.56 kB - -
@sentry/browser (incl. FeedbackAsync) 37.69 kB - -
@sentry/browser (incl. Metrics) 28.84 kB - -
@sentry/browser (incl. Logs) 29.06 kB - -
@sentry/browser (incl. Metrics & Logs) 29.76 kB - -
@sentry/react 29.55 kB - -
@sentry/react (incl. Tracing) 48.87 kB - -
@sentry/vue 33.18 kB - -
@sentry/vue (incl. Tracing) 48.56 kB - -
@sentry/svelte 27.78 kB - -
CDN Bundle 30.16 kB - -
CDN Bundle (incl. Tracing) 48.56 kB - -
CDN Bundle (incl. Logs, Metrics) 31.74 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 49.86 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 71 kB - -
CDN Bundle (incl. Tracing, Replay) 86.06 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 87.38 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 91.87 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 93.13 kB - -
CDN Bundle - uncompressed 89.89 kB - -
CDN Bundle (incl. Tracing) - uncompressed 146.77 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 94.6 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 150.75 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 219.36 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 266.01 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 269.97 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 279.71 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 283.66 kB - -
@sentry/nextjs (client) 51.38 kB - -
@sentry/sveltekit (client) 47 kB - -
@sentry/core/server 80.3 kB - -
@sentry/core/browser 66.71 kB - -
⛔️ @sentry/node-core (max: null) 0 B removed removed
@sentry/node 124.21 kB -0.07% -84 B 🔽
@sentry/node (incl. diagnostics channel injection) 149.66 kB -0.08% -116 B 🔽
@sentry/node/import (ESM hook with diagnostics-channel injection) 70.03 kB -0.01% -2 B 🔽
⛔️ @sentry/node/light (max: null) 0 B removed removed
@sentry/node - without tracing 74.38 kB -0.72% -539 B 🔽
@sentry/aws-serverless 83.86 kB -0.36% -301 B 🔽
@sentry/cloudflare (withSentry) - minified 196.59 kB - -
@sentry/cloudflare (withSentry) 483.84 kB - -

View base workflow run

Comment thread packages/node/src/integrations/http/index.ts
Comment thread .github/workflows/build.yml Outdated
@andreiborza
andreiborza marked this pull request as ready for review July 22, 2026 09:07
@andreiborza
andreiborza requested review from a team as code owners July 22, 2026 09:07
@andreiborza
andreiborza requested review from JPeer264, chargome, isaacs and nicohrubec and removed request for a team July 22, 2026 09:07
andreiborza and others added 4 commits July 22, 2026 11:22
Relocate all of node-core's runtime source into `@sentry/node` and reconcile the
overlapping files. The composite HTTP and node-fetch integrations become the
canonical implementations, node's `init` absorbs node-core's client setup, and the
ANR/local-variables workers are built via node's rollup config.

`@opentelemetry/core` is promoted to a direct dependency; `@sentry/node-core` is
dropped from node's dependencies. The public API surface of `@sentry/node` is
unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Point `@sentry/effect`, `@sentry/aws-serverless`, `@sentry/bun`,
`@sentry/google-cloud-serverless` and `@sentry/nuxt` at `@sentry/node` instead of
`@sentry/node-core`. `@sentry/effect` server now runs on full `@sentry/node` with
node's default integrations disabled, since it provides its own tracing, logging
and error capture.
Move node-core's unit tests that add coverage into `packages/node/test`,
de-duplicating against node's existing tests. Port the `system-error` and
`public-api/beforeSendSpan-streamed` integration suites and the `public-api/logs`
scenario into `node-integration-tests`, fold node-core's ANR anti-flake helper
into node's ANR suite, and add the `@opentelemetry/instrumentation-http` devDep the
double-instrumentation suite needs.

Effect's server transaction e2e tests are marked `test.fixme`: the SDK now installs
the OpenTelemetry async context strategy instead of the AsyncLocalStorage one, so
the Effect tracer's spans are no longer emitted as transactions until Effect's
server tracing is adapted.
Delete the `@sentry/node-core` package, the `node-core-integration-tests` dev
package, and the node-core e2e test apps. Drop all remaining references from
workspaces, `.craft.yml`, `.size-limit.js`, CODEOWNERS, CI, the dev Makefile and
docs.
@andreiborza
andreiborza force-pushed the ab/merge-node-core-into-node branch from cb64522 to 226cdfc Compare July 22, 2026 09:26
Comment thread dev-packages/node-integration-tests/suites/anr/test.ts
@@ -12,9 +12,12 @@ import { init as initNode } from '@sentry/node-core/light';
export function init(options: NodeOptions): Client | undefined {
const opts = {
...options,
// The Effect SDK provides its own tracing (`SentryEffectTracer`), logging and error capture, so
// node's auto-instrumentation default integrations should not additionally create spans.
defaultIntegrations: options.defaultIntegrations ?? false,

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.

q: Don't we lose more than tracing here? eg contextLines, localVariables etc?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, but I talked to Jan and apparently we don't need those. Not sure if he understood tho, I spun the effect re-evaluating into its own task: #22487

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.

ok so we just accept some potential regression in this pr?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

yessir

Comment thread packages/node/package.json
…-into-node

# Conflicts:
#	dev-packages/node-integration-tests/suites/tracing/hono/scenario.mjs
#	packages/node/src/integrations/tracing/hono/index.ts

@cursor cursor Bot 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 5aaac7d. Configure here.

Comment thread packages/effect/src/server/sdk.ts
Comment thread packages/node/src/sdk/index.ts
…-only tracing installs performance integrations
Comment thread packages/node/src/sdk/index.ts

@chargome chargome 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.

Thanks for addressing the feedback! I did not evaluate if we lost any test-coverage etc. as there are so many files deleted. Otherwise LGTM

@andreiborza
andreiborza merged commit 9730667 into develop Jul 22, 2026
284 checks passed
@andreiborza
andreiborza deleted the ab/merge-node-core-into-node branch July 22, 2026 11:38
Sign up for free to 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.

Remove node-core

2 participants