Skip to content

Commit 2dfcc4d

Browse files
committed
Add instrumentation name to spanStart (A-E)
1 parent 727c7c7 commit 2dfcc4d

File tree

95 files changed

+166
-127
lines changed

Some content is hidden

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

95 files changed

+166
-127
lines changed

dd-java-agent/instrumentation/aerospike-4/src/main/java/datadog/trace/instrumentation/aerospike4/AerospikeClientDecorator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public void withMethod(final AgentSpan span, final String methodName) {
9393
}
9494

9595
public AgentSpan startAerospikeSpan(final String methodName) {
96-
final AgentSpan span = startSpan(OPERATION_NAME);
96+
final AgentSpan span = startSpan("aerospike", OPERATION_NAME);
9797
afterStart(span);
9898
withMethod(span, methodName);
9999
return span;

dd-java-agent/instrumentation/akka-concurrent/src/akka23Test/scala/AkkaActors.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ class Greeter(message: String, receiverActor: ActorRef) extends Actor {
130130
case Greet =>
131131
receiverActor ! Greeting(greeting)
132132
case Leak(leak) =>
133-
val span = startSpan(greeting)
133+
val span = startSpan("akka-concurrent", greeting)
134134
span.setResourceName(leak)
135135
activateSpan(span)
136136
span.finish()

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
@@ -31,7 +31,7 @@ protected Integer compute() {
3131
return parent;
3232
} else {
3333
int next = parent + 1;
34-
AgentSpan span = startSpan(Integer.toString(next));
34+
AgentSpan span = startSpan("akka-concurrent", Integer.toString(next));
3535
try (AgentScope scope = activateSpan(span)) {
3636
LinearTask child = new LinearTask(next, depth);
3737
return child.fork().join();

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
public class AkkaHttpServerDecorator
1919
extends HttpServerDecorator<HttpRequest, HttpRequest, HttpResponse, HttpRequest> {
20-
private static final CharSequence AKKA_HTTP_SERVER = UTF8BytesString.create("akka-http-server");
20+
public static final CharSequence AKKA_HTTP_SERVER = UTF8BytesString.create("akka-http-server");
2121

2222
public static final AkkaHttpServerDecorator DECORATE = new AkkaHttpServerDecorator();
2323
public static final CharSequence AKKA_SERVER_REQUEST =

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ public static AgentScope methodEnter(
7474
return null;
7575
}
7676

77-
final AgentSpan span = startSpan(AKKA_CLIENT_REQUEST);
77+
final AgentSpan span =
78+
startSpan(AkkaHttpClientDecorator.AKKA_HTTP_CLIENT.toString(), AKKA_CLIENT_REQUEST);
7879
DECORATE.afterStart(span);
7980
DECORATE.onRequest(span, request);
8081

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
public class DatadogWrapperHelper {
1313
public static AgentScope createSpan(final HttpRequest request) {
1414
final AgentSpanContext.Extracted extractedContext = DECORATE.extract(request);
15-
final AgentSpan span = DECORATE.startSpan(request, extractedContext);
15+
final AgentSpan span =
16+
DECORATE.startSpan(
17+
AkkaHttpServerDecorator.AKKA_HTTP_SERVER.toString(), request, extractedContext);
1618
DECORATE.afterStart(span);
1719
DECORATE.onRequest(span, request, request, extractedContext);
1820

dd-java-agent/instrumentation/akka-http/akka-http-10.6/src/main/java11/datadog/trace/instrumentation/akkahttp106/SingleRequestAdvice.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ public static AgentScope methodEnter(
2424
return null;
2525
}
2626

27-
final AgentSpan span = startSpan(AkkaHttpClientDecorator.AKKA_CLIENT_REQUEST);
27+
final AgentSpan span =
28+
startSpan(
29+
AkkaHttpClientDecorator.AKKA_HTTP_CLIENT.toString(),
30+
AkkaHttpClientDecorator.AKKA_CLIENT_REQUEST);
2831
AkkaHttpClientDecorator.DECORATE.afterStart(span);
2932
AkkaHttpClientDecorator.DECORATE.onRequest(span, request);
3033

dd-java-agent/instrumentation/apache-httpasyncclient-4/src/main/java/datadog/trace/instrumentation/apachehttpasyncclient/ApacheHttpAsyncClientInstrumentation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public static AgentSpan methodEnter(
9191
@Advice.Argument(value = 3, readOnly = false) FutureCallback<?> futureCallback) {
9292

9393
final AgentScope.Continuation parentContinuation = captureActiveSpan();
94-
final AgentSpan clientSpan = startSpan(HTTP_REQUEST);
94+
final AgentSpan clientSpan = startSpan("apache-http-client", HTTP_REQUEST);
9595
DECORATE.afterStart(clientSpan);
9696

9797
requestProducer = new DelegatingRequestProducer(clientSpan, requestProducer);

dd-java-agent/instrumentation/apache-httpclient-4/src/main/java/datadog/trace/instrumentation/apachehttpclient/HelperMethods.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public static AgentScope doMethodEnter(HttpHost host, HttpRequest request) {
3737
}
3838

3939
private static AgentScope activateHttpSpan(final HttpUriRequest request) {
40-
final AgentSpan span = startSpan(HTTP_REQUEST);
40+
final AgentSpan span = startSpan("apache-http-client", HTTP_REQUEST);
4141
final AgentScope scope = activateSpan(span);
4242

4343
DECORATE.afterStart(span);

dd-java-agent/instrumentation/apache-httpclient-5/src/main/java/datadog/trace/instrumentation/apachehttpclient5/ApacheHttpAsyncClientInstrumentation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public static AgentScope methodEnter(
9797
@Advice.Argument(value = 4, readOnly = false) FutureCallback<?> futureCallback) {
9898

9999
final AgentScope.Continuation parentContinuation = captureActiveSpan();
100-
final AgentSpan clientSpan = startSpan(HTTP_REQUEST);
100+
final AgentSpan clientSpan = startSpan("apache-http-client", HTTP_REQUEST);
101101
final AgentScope clientScope = activateSpan(clientSpan);
102102
DECORATE.afterStart(clientSpan);
103103

0 commit comments

Comments
 (0)