Skip to content

Remove OTel resources and drop contexts.otel.resource #21973

Description

@andreiborza

In v11 the default (and, after JS-2585, only) tracer provider is SentryTracerProvider, which runs no OTel SDK export pipeline. The OTel resource is no longer meaningful and should be removed.

  • Drop getSentryResource / packages/opentelemetry/src/resource.ts (or reduce it to what's still needed)
  • Stop attaching contexts.otel.resource to transaction events (packages/node/src/sdk/initOtel.ts:169-176)
  • Remove the resource passed to SentryTracerProvider in initOtel.ts
  • This eliminates the @opentelemetry/core SDK_INFO import in resource.ts:2 (last core import besides SentryPropagator)
  • v11 migration note: contexts.otel.resource (incl. telemetry.sdk.*) no longer attached to events

Relates to JS-2585 (removes the options that force the full OTel SDK provider) and JS-2820 (SentryPropagator removal). Together these remove the last direct @opentelemetry/core imports from @sentry/opentelemetry, unblocking JS-2929 (peer removal).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions