OpenTelemetry has the concept of remote spans:
When an incoming W3C-tracecontext is encountered, it is parsed and put as a PropagatedSpan (via Span.fromRemoteContext) into the current OpenTelemetry context.
This means, PropagatedSpans can be activated and deactivated just like normal spans.
Because we didn't have an equivalent concept in our elastic-apm-agent, I didn't account for this case when porting the implementation over.
This means that we potentially might end up creating inferred spans with a remote-span as parent, which definitely don't want.
We should add a test case for this and fix the behaviour if required.
OpenTelemetry has the concept of remote spans: When an incoming W3C-tracecontext is encountered, it is parsed and put as a
PropagatedSpan
(viaSpan.fromRemoteContext
) into the current OpenTelemetry context.This means,
PropagatedSpan
s can be activated and deactivated just like normal spans. Because we didn't have an equivalent concept in our elastic-apm-agent, I didn't account for this case when porting the implementation over. This means that we potentially might end up creating inferred spans with a remote-span as parent, which definitely don't want.We should add a test case for this and fix the behaviour if required.