Skip to content

Commit 7ff13cb

Browse files
committed
fix(core): Fix tracing propagator
1 parent 60a9059 commit 7ff13cb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

dd-trace-core/src/main/java/datadog/trace/core/propagation/TracingPropagator.java

+5
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ public <C> Context extract(Context context, C carrier, CarrierVisitor<C> visitor
5858
return context;
5959
}
6060
TagContext spanContext = this.extractor.extract(carrier, toContextVisitor(visitor));
61+
// If the extraction fails, return the original context
62+
if (spanContext == null) {
63+
return context;
64+
}
65+
// Otherwise, append a fake span wrapper to context
6166
return context.with(fromSpanContext(spanContext));
6267
}
6368

0 commit comments

Comments
 (0)