Skip to content

Commit fabaa0b

Browse files
committed
Remove deprecated startSpan and use integration name for telemetry
1 parent d4d2069 commit fabaa0b

144 files changed

Lines changed: 221 additions & 224 deletions

File tree

Some content is hidden

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

dd-java-agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap/instrumentation/httpurlconnection/HttpUrlState.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class HttpUrlState {
1616
private volatile boolean finished = false;
1717

1818
public AgentSpan start(final HttpURLConnection connection) {
19-
span = startSpan(DECORATE.operationName());
19+
span = startSpan("httpurlconnection", DECORATE.operationName());
2020
try (final AgentScope scope = activateSpan(span)) {
2121
DECORATE.afterStart(span);
2222
DECORATE.onRequest(span, connection);

dd-java-agent/agent-installer/src/main/java/datadog/trace/agent/tooling/AgentCLI.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public static void sendSampleTraces(final int count, final double interval) thro
6565

6666
int numTraces = 0;
6767
while (++numTraces <= count || count < 0) {
68-
AgentSpan span = AgentTracer.startSpan("sample");
68+
AgentSpan span = AgentTracer.startSpan("datadog", "sample");
6969
try {
7070
Thread.sleep(Math.max((long) (1000.0 * interval), 1L));
7171
} catch (InterruptedException ignore) {

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

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

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public static AgentSpan methodEnter(
102102
}
103103

104104
final AgentScope.Continuation parentContinuation = captureActiveSpan();
105-
final AgentSpan clientSpan = startSpan(HTTP_REQUEST);
105+
final AgentSpan clientSpan = startSpan("httpasyncclient", HTTP_REQUEST);
106106
DECORATE.afterStart(clientSpan);
107107
((DelegatingRequestProducer) requestProducer).setSpan(clientSpan);
108108
futureCallback =

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

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

3737
private static AgentScope activateHttpSpan(final HttpUriRequest request) {
38-
final AgentSpan span = startSpan(HTTP_REQUEST);
38+
final AgentSpan span = startSpan("httpclient", HTTP_REQUEST);
3939
final AgentScope scope = activateSpan(span);
4040

4141
DECORATE.afterStart(span);

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

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

115115
final AgentScope.Continuation parentContinuation = captureActiveSpan();
116-
final AgentSpan clientSpan = startSpan(HTTP_REQUEST);
116+
final AgentSpan clientSpan = startSpan("httpasyncclient5", HTTP_REQUEST);
117117
final AgentScope clientScope = activateSpan(clientSpan);
118118
DECORATE.afterStart(clientSpan);
119119

dd-java-agent/instrumentation/apache-httpclient/apache-httpclient-5.0/src/main/java/datadog/trace/instrumentation/apachehttpclient5/HelperMethods.java

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

3737
private static AgentScope activateHttpSpan(final HttpRequest request) {
38-
final AgentSpan span = startSpan(HTTP_REQUEST);
38+
final AgentSpan span = startSpan("httpclient5", HTTP_REQUEST);
3939
final AgentScope scope = activateSpan(span);
4040

4141
DECORATE.afterStart(span);

dd-java-agent/instrumentation/armeria/armeria-grpc-0.84/src/main/java/datadog/trace/instrumentation/armeria/grpc/client/ClientCallImplInstrumentation.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,8 @@ public static AgentScope before() {
211211
AgentSpan clientSpan = activeSpan();
212212
if (clientSpan != null && OPERATION_NAME.equals(clientSpan.getOperationName())) {
213213
AgentSpan messageSpan =
214-
startSpan(GRPC_MESSAGE).setTag("message.type", clientSpan.getTag("response.type"));
214+
startSpan("armeria-grpc-client", GRPC_MESSAGE)
215+
.setTag("message.type", clientSpan.getTag("response.type"));
215216
DECORATE.afterStart(messageSpan);
216217
return activateSpan(messageSpan);
217218
}

dd-java-agent/instrumentation/aws-java/aws-java-lambda-handler-1.2/src/main/java/datadog/trace/instrumentation/aws/v1/lambda/LambdaHandlerInstrumentation.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ static AgentScope enter(
9393
AgentSpanContext lambdaContext = AgentTracer.get().notifyLambdaStart(in, lambdaRequestId);
9494
final AgentSpan span;
9595
if (null == lambdaContext) {
96-
span = startSpan(INVOCATION_SPAN_NAME);
96+
span = startSpan("aws-sdk", INVOCATION_SPAN_NAME);
9797
} else {
98-
span = startSpan(INVOCATION_SPAN_NAME, lambdaContext);
98+
span = startSpan("aws-sdk", INVOCATION_SPAN_NAME, lambdaContext);
9999
}
100100
span.setSpanType(InternalSpanTypes.SERVERLESS);
101101
span.setTag("request_id", lambdaRequestId);

dd-java-agent/instrumentation/aws-java/aws-java-sns-1.0/src/main/java/datadog/trace/instrumentation/aws/v1/sns/SnsInterceptor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public AmazonWebServiceRequest beforeMarshalling(AmazonWebServiceRequest request
109109
}
110110

111111
private AgentSpan newSpan(AmazonWebServiceRequest request) {
112-
final AgentSpan span = AgentTracer.startSpan("aws.sns.send");
112+
final AgentSpan span = AgentTracer.startSpan("aws-sdk", "aws.sns.send");
113113
// pass the span to TracingRequestHandler in the sdk instrumentation where it'll be enriched &
114114
// activated
115115
// TODO If DSM is enabled, add DSM context here too

0 commit comments

Comments
 (0)