ref(node): Merge @sentry/node-core back into @sentry/node#22418
Conversation
|
batman begin |
There was a problem hiding this comment.
✅ 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.
size-limit report 📦
|
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.
cb64522 to
226cdfc
Compare
| @@ -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, | |||
There was a problem hiding this comment.
q: Don't we lose more than tracing here? eg contextLines, localVariables etc?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
ok so we just accept some potential regression in this pr?
…-into-node # Conflicts: # dev-packages/node-integration-tests/suites/tracing/hono/scenario.mjs # packages/node/src/integrations/tracing/hono/index.ts
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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.
…-only tracing installs performance integrations
chargome
left a comment
There was a problem hiding this comment.
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

What
Removes the
@sentry/node-corepackage and folds its functionality back into@sentry/node.@sentry/node; the composite HTTP and node-fetch integrations become the canonical implementations.@sentry/nodekeeps only the OpenTelemetry dependencies it actually uses (@opentelemetry/corepromoted to a direct dependency;exporter-trace-otlp-httpdropped).effect,aws-serverless,bun,google-cloud-serverless,nuxt) off@sentry/node-core.@sentry/nodeandnode-integration-tests; discards the redundant ones. Removes thenode-core-integration-testspackage and the node-core e2e apps.@sentry/node-corefrom workspaces,.craft.yml,.size-limit.js, CODEOWNERS, and CI.The public API surface of
@sentry/nodeis unchanged.@sentry/effect@sentry/effectserver 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 markedtest.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-corewas 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:
@sentry/node-coresource into@sentry/node: db7ec22@sentry/node-core: cd41021@sentry/nodeandnode-integration-tests: 17665c0@sentry/node-corepackage and its test/CI infrastructure: 226cdfcCloses #21469