Skip to content

Commit ccdfd7b

Browse files
committed
Extracting static helper
1 parent b6d4e4f commit ccdfd7b

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

dd-trace-core/src/main/java/datadog/trace/core/CoreTracer.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1554,7 +1554,17 @@ public final CoreSpanBuilder ignoreActiveSpan() {
15541554
}
15551555

15561556
protected final DDSpan buildSpan() {
1557-
DDSpan span = DDSpan.create(instrumentationName, timestampMicro, buildSpanContext(), links);
1557+
return buildSpan(tracer, instrumentationName, timestampMicro, links, buildSpanContext());
1558+
}
1559+
1560+
protected static final DDSpan buildSpan(
1561+
CoreTracer tracer,
1562+
String instrumentationName,
1563+
long timestampMicro,
1564+
List<AgentSpanLink> links,
1565+
DDSpanContext spanContext)
1566+
{
1567+
DDSpan span = DDSpan.create(instrumentationName, timestampMicro, spanContext, links);
15581568
if (span.isLocalRootSpan()) {
15591569
EndpointTracker tracker = tracer.onRootSpanStarted(span);
15601570
if (tracker != null) {

0 commit comments

Comments
 (0)