Open chrisguitarguy opened 4 months ago
Agreed, there's places where the otel tracer assumes a parent trace is a DD trace too: https://github.com/DataDog/dd-trace-js/blob/master/packages/dd-trace/src/opentelemetry/tracer.js#L36
With DD_TRACE_OTEL_ENABLED
this completely breaks
I'm running into a similar issue as @dpnova where parent is null and parent._traceId
throws an error.
I'm running into a similar issue as @dpnova where parent is null and
parent._traceId
throws an error.
FWIW I left DD_TRACE_OTEL_ENABLED
off and manually created the connection between the parent and child span on the boundary of my DD/OTEL traced code. Hope you get it sorted @andrewpuch
Specifically this bit https://github.com/DataDog/dd-trace-js/blob/c831ffa83f26365df1ccd829d8d775010bacd3a7/packages/dd-trace/src/opentelemetry/context_manager.js#L25-L33
Which causes something like this:
To return a span that doesn't actually implement
Span
(see https://github.com/open-telemetry/opentelemetry-js/blob/957fa3b5e44e43f0cf07adeca8e118f27334dfc3/api/src/trace/span.ts#L33)Instead it's just a plain object with
spanContext
and one cannot do something likespan.setAttributes(...)
that works just fine without datadog's tracer provider.Would the DD
Span
implementation alredy take care of this? https://github.com/DataDog/dd-trace-js/blob/c831ffa83f26365df1ccd829d8d775010bacd3a7/packages/dd-trace/src/opentelemetry/span.js#L177-L179