Skip to content

Commit ab73c44

Browse files
authored
Simplify activateSpan calls which use the default value for isAsyncPropagating (#8543)
1 parent de80454 commit ab73c44

File tree

75 files changed

+90
-90
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+90
-90
lines changed

dd-java-agent/agent-ci-visibility/src/main/java/datadog/trace/civisibility/domain/TestImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public TestImpl(
116116

117117
span = spanBuilder.start();
118118

119-
activateSpan(span, true);
119+
activateSpan(span);
120120

121121
span.setSpanType(InternalSpanTypes.TEST);
122122
span.setTag(Tags.SPAN_KIND, Tags.SPAN_KIND_TEST);

dd-java-agent/agent-ci-visibility/src/main/java/datadog/trace/civisibility/domain/TestSuiteImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public TestSuiteImpl(
130130
testDecorator.afterStart(span);
131131

132132
if (!parallelized) {
133-
activateSpan(span, true);
133+
activateSpan(span);
134134
}
135135

136136
metricCollector.add(CiVisibilityCountMetric.EVENT_CREATED, 1, instrumentation, EventType.SUITE);

dd-java-agent/instrumentation/akka-concurrent/src/test/java/LinearTask.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ protected Integer compute() {
3232
} else {
3333
int next = parent + 1;
3434
AgentSpan span = startSpan(Integer.toString(next));
35-
try (AgentScope scope = activateSpan(span, true)) {
35+
try (AgentScope scope = activateSpan(span)) {
3636
LinearTask child = new LinearTask(next, depth);
3737
return child.fork().join();
3838
} finally {

dd-java-agent/instrumentation/akka-http/akka-http-10.0/src/main/java/datadog/trace/instrumentation/akkahttp/DatadogWrapperHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public static AgentScope createSpan(final HttpRequest request) {
1616
DECORATE.afterStart(span);
1717
DECORATE.onRequest(span, request, request, extractedContext);
1818

19-
return activateSpan(span, true);
19+
return activateSpan(span);
2020
}
2121

2222
public static void finishSpan(final AgentSpan span, final HttpResponse response) {

dd-java-agent/instrumentation/finatra-2.9/src/main/java/datadog/trace/instrumentation/finatra/FinatraInstrumentation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public static AgentScope nameSpan(
7676
DECORATE.afterStart(span);
7777
span.setResourceName(DECORATE.className(clazz));
7878

79-
return activateSpan(span, true);
79+
return activateSpan(span);
8080
}
8181

8282
@Advice.OnMethodExit(onThrowable = Throwable.class, suppress = Throwable.class)

dd-java-agent/instrumentation/grizzly-2/src/main/java/datadog/trace/instrumentation/grizzly/GrizzlyHttpHandlerInstrumentation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public static class HandleAdvice {
7878
DECORATE.afterStart(span);
7979
DECORATE.onRequest(span, request, request, parentContext);
8080

81-
scope = activateSpan(span, true);
81+
scope = activateSpan(span);
8282

8383
request.setAttribute(DD_SPAN_ATTRIBUTE, span);
8484
request.setAttribute(CorrelationIdentifier.getTraceIdKey(), GlobalTracer.get().getTraceId());

dd-java-agent/instrumentation/grizzly-http-2.3.20/src/main/java/datadog/trace/instrumentation/grizzlyhttp232/FilterAdvice.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public static AgentScope onEnter(@Advice.Argument(0) final FilterChainContext ct
1717
if (span == null || activeSpan() != null) {
1818
return null;
1919
}
20-
return activateSpan((AgentSpan) span, true);
20+
return activateSpan((AgentSpan) span);
2121
}
2222

2323
@Advice.OnMethodExit(onThrowable = Throwable.class, suppress = Throwable.class)

dd-java-agent/instrumentation/grizzly-http-2.3.20/src/main/java/datadog/trace/instrumentation/grizzlyhttp232/GrizzlyDecorator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public static NextAction onHttpCodecFilterExit(
116116
HttpResponsePacket httpResponse = httpRequest.getResponse();
117117
AgentSpanContext.Extracted context = DECORATE.extract(httpRequest);
118118
AgentSpan span = DECORATE.startSpan(httpRequest, context);
119-
AgentScope scope = activateSpan(span, true);
119+
AgentScope scope = activateSpan(span);
120120
DECORATE.afterStart(span);
121121
ctx.getAttributes().setAttribute(DD_SPAN_ATTRIBUTE, span);
122122
ctx.getAttributes().setAttribute(DD_RESPONSE_ATTRIBUTE, httpResponse);

dd-java-agent/instrumentation/ignite-2.0/src/main/java/datadog/trace/instrumentation/ignite/v2/cache/IgniteCacheAsyncInstrumentation.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public static AgentScope onEnter(
9393

9494
// Enable async propagation, so the newly spawned task will be associated back with this
9595
// original trace.
96-
return activateSpan(span, true);
96+
return activateSpan(span);
9797
}
9898

9999
@Advice.OnMethodExit(onThrowable = Throwable.class, suppress = Throwable.class)
@@ -149,7 +149,7 @@ public static AgentScope onEnter(
149149

150150
// Enable async propagation, so the newly spawned task will be associated back with this
151151
// original trace.
152-
return activateSpan(span, true);
152+
return activateSpan(span);
153153
}
154154

155155
@Advice.OnMethodExit(onThrowable = Throwable.class, suppress = Throwable.class)

dd-java-agent/instrumentation/jakarta-rs-annotations-3/src/main/java/datadog/trace/instrumentation/jakarta3/DefaultRequestContextInstrumentation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public static AgentScope createGenericSpan(@Advice.This final ContainerRequestCo
4747
// can only be aborted inside the filter method
4848
}
4949

50-
final AgentScope scope = activateSpan(span, true);
50+
final AgentScope scope = activateSpan(span);
5151

5252
DECORATE.afterStart(span);
5353
DECORATE.onJakartaRsSpan(span, parent, filterClass, method);

0 commit comments

Comments
 (0)