Skip to content

[v8] Fix DSC/propagation context when used with opentelemetry #10899

Closed
@mydea

Description

@mydea

I noticed that our DSC/propagation context usage in @sentry/opentelemetry is not fully correct. Basically, we don't fully cascade the lookup to include spans, which we need to fix. Also we currently lookup the fallback context from the OTEL context, not the scope - we should align this, as otherwise doing scope.setPropagationContext() will not do anything.

So the updated propagator should:

  1. Put the DSC etc. into the span context (which in OTEL can even exist if there is no span!)
  2. Read DSC/propagation context from active span, if it exists
  3. Else, fall back to reading it from scope, if it has one
  4. Else, fall back to reading it from span context, if it has one
  5. Else, use from client

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions