Skip to content

Remove @opentelemetry/core peer dependency from @sentry/opentelemetry #21972

Description

@andreiborza

Final step of dropping the direct @opentelemetry/core dependency: remove it from @sentry/opentelemetry's peerDependencies once nothing in the package imports it.

Gated on removing the last two direct core imports:

  • JS-2820SentryPropagator removal (drops W3CBaggagePropagator; the built d.ts must no longer contain extends W3CBaggagePropagator) → this ones done now
  • JS-2930 — OTel-resource removal (drops the SDK_INFO import in resource.ts)

Peer removal itself only loosens constraints (not semver-breaking), but it belongs with the v11 messaging.

  • Remove @opentelemetry/core from packages/opentelemetry peerDependencies; keep the ^2.6.1 devDependency for the interop tests
  • Update packages/opentelemetry/README.md (peer no longer required)
  • Verify built types are core-free: rg "@opentelemetry/core" packages/opentelemetry/build — only NOTICE comments may match; build/types/propagator.d.ts must no longer import it
  • Verify @sentry/vercel-edge bundle contains no core module
  • Scratch check: npm pack, install into a pnpm app WITHOUT @opentelemetry/core, minimal node-core init + one HTTP request (crashes today, must work after)
  • v11 migration/changelog entry: peer no longer required (still present transitively via @sentry/node's sdk-trace-base)

Note: this does NOT remove @opentelemetry/core from users' node_modules — it still arrives transitively. Dropping that is the separate SentryTracerProvider track.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions