wsclient -> play-ws
RENAME
dd-java-agent/instrumentation/wsclient-1/wsclient-1.gradle
dd-java-agent/instrumentation/play-ws-1/play-ws-1.gradle
RENAME
dd-java-agent/instrumentation/wsclient-1/src/main/java/datadog/trace/instrumentation/wsclient/AsyncHandlerWrapper.java
dd-java-agent/instrumentation/play-ws-1/src/main/java/datadog/trace/instrumentation/playws/AsyncHandlerWrapper.java
-package datadog.trace.instrumentation.wsclient;
+package datadog.trace.instrumentation.playws;
import static datadog.trace.instrumentation.api.AgentTracer.propagate;
-import static datadog.trace.instrumentation.wsclient.WSClientDecorator.DECORATE;
+import static datadog.trace.instrumentation.playws.PlayWSClientDecorator.DECORATE;
import datadog.trace.context.TraceScope;
import datadog.trace.instrumentation.api.AgentSpan;

RENAME
dd-java-agent/instrumentation/wsclient-2/src/main/java/datadog/trace/instrumentation/wsclient/HeadersInjectAdapter.java
dd-java-agent/instrumentation/play-ws-1/src/main/java/datadog/trace/instrumentation/playws/HeadersInjectAdapter.java
-package datadog.trace.instrumentation.wsclient;
+package datadog.trace.instrumentation.playws;
import datadog.trace.instrumentation.api.AgentPropagation;
import play.shaded.ahc.org.asynchttpclient.Request;

RENAME
dd-java-agent/instrumentation/wsclient-1/src/main/java/datadog/trace/instrumentation/wsclient/WSClientDecorator.java
dd-java-agent/instrumentation/play-ws-1/src/main/java/datadog/trace/instrumentation/playws/PlayWSClientDecorator.java
-package datadog.trace.instrumentation.wsclient;
+package datadog.trace.instrumentation.playws;
import datadog.trace.agent.decorator.HttpClientDecorator;
import java.net.URI;
@@ -6,8 +6,8 @@ import java.net.URISyntaxException;
import play.shaded.ahc.org.asynchttpclient.Request;
import play.shaded.ahc.org.asynchttpclient.Response;
-public class WSClientDecorator extends HttpClientDecorator<Request, Response> {
- public static final WSClientDecorator DECORATE = new WSClientDecorator();
+public class PlayWSClientDecorator extends HttpClientDecorator<Request, Response> {
+ public static final PlayWSClientDecorator DECORATE = new PlayWSClientDecorator();
@Override
protected String method(final Request request) {
@@ -36,11 +36,11 @@ public class WSClientDecorator extends HttpClientDecorator<Request, Response> {
@Override
protected String[] instrumentationNames() {
- return new String[] {"wsclient"};
+ return new String[] {"play-ws"};
}
@Override
protected String component() {
- return "wsclient";
+ return "play-ws";
}
}

RENAME
dd-java-agent/instrumentation/wsclient-2/src/main/java/datadog/trace/instrumentation/wsclient/WSClientInstrumentation.java
dd-java-agent/instrumentation/play-ws-1/src/main/java/datadog/trace/instrumentation/playws/PlayWSClientInstrumentation.java
-package datadog.trace.instrumentation.wsclient;
+package datadog.trace.instrumentation.playws;
import static datadog.trace.agent.tooling.ByteBuddyElementMatchers.safeHasSuperType;
import static datadog.trace.instrumentation.api.AgentTracer.propagate;
import static datadog.trace.instrumentation.api.AgentTracer.startSpan;
-import static datadog.trace.instrumentation.wsclient.HeadersInjectAdapter.SETTER;
-import static datadog.trace.instrumentation.wsclient.WSClientDecorator.DECORATE;
+import static datadog.trace.instrumentation.playws.HeadersInjectAdapter.SETTER;
+import static datadog.trace.instrumentation.playws.PlayWSClientDecorator.DECORATE;
import static java.util.Collections.singletonMap;
import static net.bytebuddy.matcher.ElementMatchers.isMethod;
import static net.bytebuddy.matcher.ElementMatchers.named;
@@ -24,9 +24,9 @@ import play.shaded.ahc.org.asynchttpclient.AsyncHandler;
import play.shaded.ahc.org.asynchttpclient.Request;
@AutoService(Instrumenter.class)
-public class WSClientInstrumentation extends Instrumenter.Default {
- public WSClientInstrumentation() {
- super("wsclient");
+public class PlayWSClientInstrumentation extends Instrumenter.Default {
+ public PlayWSClientInstrumentation() {
+ super("play-ws");
}
@Override
@@ -45,7 +45,7 @@ public class WSClientInstrumentation extends Instrumenter.Default {
.and(takesArguments(2))
.and(takesArgument(0, named("play.shaded.ahc.org.asynchttpclient.Request")))
.and(takesArgument(1, named("play.shaded.ahc.org.asynchttpclient.AsyncHandler"))),
- WSClientAdvice.class.getName());
+ ClientAdvice.class.getName());
}
@Override
@@ -54,19 +54,19 @@ public class WSClientInstrumentation extends Instrumenter.Default {
"datadog.trace.agent.decorator.BaseDecorator",
"datadog.trace.agent.decorator.ClientDecorator",
"datadog.trace.agent.decorator.HttpClientDecorator",
- packageName + ".WSClientDecorator",
+ packageName + ".PlayWSClientDecorator",
packageName + ".HeadersInjectAdapter",
packageName + ".AsyncHandlerWrapper"
};
}
- public static class WSClientAdvice {
+ public static class ClientAdvice {
@Advice.OnMethodEnter(suppress = Throwable.class)
public static AgentSpan methodEnter(
@Advice.Argument(0) final Request request,
@Advice.Argument(value = 1, readOnly = false) AsyncHandler asyncHandler) {
- final AgentSpan span = startSpan("wsclient.request");
+ final AgentSpan span = startSpan("play-ws.request");
DECORATE.afterStart(span);
DECORATE.onRequest(span, request);

RENAME
dd-java-agent/instrumentation/wsclient-1/src/test/groovy/WSClientTest.groovy
dd-java-agent/instrumentation/play-ws-1/src/test/groovy/PlayWSClientTest.groovy
@@ -2,7 +2,7 @@ import akka.actor.ActorSystem
import akka.stream.ActorMaterializer
import akka.stream.ActorMaterializerSettings
import datadog.trace.agent.test.base.HttpClientTest
-import datadog.trace.instrumentation.wsclient.WSClientDecorator
+import datadog.trace.instrumentation.playws.PlayWSClientDecorator
import play.libs.ws.StandaloneWSClient
import play.libs.ws.StandaloneWSRequest
import play.libs.ws.StandaloneWSResponse
@@ -15,7 +15,7 @@ import spock.lang.Shared
import java.util.concurrent.TimeUnit
-class WSClientTest extends HttpClientTest<WSClientDecorator> {
+class PlayWSClientTest extends HttpClientTest<PlayWSClientDecorator> {
@Shared
ActorSystem system
@@ -23,7 +23,7 @@ class WSClientTest extends HttpClientTest<WSClientDecorator> {
StandaloneWSClient wsClient
def setupSpec() {
- String name = "wsclient"
+ String name = "play-ws"
system = ActorSystem.create(name)
ActorMaterializerSettings settings = ActorMaterializerSettings.create(system)
ActorMaterializer materializer = ActorMaterializer.create(settings, system, name)
@@ -59,12 +59,12 @@ class WSClientTest extends HttpClientTest<WSClientDecorator> {
}
@Override
- WSClientDecorator decorator() {
- return WSClientDecorator.DECORATE
+ PlayWSClientDecorator decorator() {
+ return PlayWSClientDecorator.DECORATE
}
String expectedOperationName() {
- return "wsclient.request"
+ return "play-ws.request"
}
@Override

RENAME
dd-java-agent/instrumentation/wsclient-2/wsclient-2.gradle
dd-java-agent/instrumentation/play-ws-2/play-ws-2.gradle
RENAME
dd-java-agent/instrumentation/wsclient-2/src/main/java/datadog/trace/instrumentation/wsclient/AsyncHandlerWrapper.java
dd-java-agent/instrumentation/play-ws-2/src/main/java/datadog/trace/instrumentation/playws/AsyncHandlerWrapper.java
-package datadog.trace.instrumentation.wsclient;
+package datadog.trace.instrumentation.playws;
import static datadog.trace.instrumentation.api.AgentTracer.propagate;
-import static datadog.trace.instrumentation.wsclient.WSClientDecorator.DECORATE;
+import static datadog.trace.instrumentation.playws.PlayWSClientDecorator.DECORATE;
import datadog.trace.context.TraceScope;
import datadog.trace.instrumentation.api.AgentSpan;

RENAME
dd-java-agent/instrumentation/wsclient-1/src/main/java/datadog/trace/instrumentation/wsclient/HeadersInjectAdapter.java
dd-java-agent/instrumentation/play-ws-2/src/main/java/datadog/trace/instrumentation/playws/HeadersInjectAdapter.java
-package datadog.trace.instrumentation.wsclient;
+package datadog.trace.instrumentation.playws;
import datadog.trace.instrumentation.api.AgentPropagation;
import play.shaded.ahc.org.asynchttpclient.Request;

RENAME
dd-java-agent/instrumentation/wsclient-2/src/main/java/datadog/trace/instrumentation/wsclient/WSClientDecorator.java
dd-java-agent/instrumentation/play-ws-2/src/main/java/datadog/trace/instrumentation/playws/PlayWSClientDecorator.java
-package datadog.trace.instrumentation.wsclient;
+package datadog.trace.instrumentation.playws;
import datadog.trace.agent.decorator.HttpClientDecorator;
import java.net.URI;
@@ -6,8 +6,8 @@ import java.net.URISyntaxException;
import play.shaded.ahc.org.asynchttpclient.Request;
import play.shaded.ahc.org.asynchttpclient.Response;
-public class WSClientDecorator extends HttpClientDecorator<Request, Response> {
- public static final WSClientDecorator DECORATE = new WSClientDecorator();
+public class PlayWSClientDecorator extends HttpClientDecorator<Request, Response> {
+ public static final PlayWSClientDecorator DECORATE = new PlayWSClientDecorator();
@Override
protected String method(final Request request) {
@@ -36,11 +36,11 @@ public class WSClientDecorator extends HttpClientDecorator<Request, Response> {
@Override
protected String[] instrumentationNames() {
- return new String[] {"wsclient"};
+ return new String[] {"play-ws"};
}
@Override
protected String component() {
- return "wsclient";
+ return "play-ws";
}
}

RENAME
dd-java-agent/instrumentation/wsclient-1/src/main/java/datadog/trace/instrumentation/wsclient/WSClientInstrumentation.java
dd-java-agent/instrumentation/play-ws-2/src/main/java/datadog/trace/instrumentation/playws/PlayWSClientInstrumentation.java
-package datadog.trace.instrumentation.wsclient;
+package datadog.trace.instrumentation.playws;
import static datadog.trace.agent.tooling.ByteBuddyElementMatchers.safeHasSuperType;
import static datadog.trace.instrumentation.api.AgentTracer.propagate;
import static datadog.trace.instrumentation.api.AgentTracer.startSpan;
-import static datadog.trace.instrumentation.wsclient.HeadersInjectAdapter.SETTER;
-import static datadog.trace.instrumentation.wsclient.WSClientDecorator.DECORATE;
+import static datadog.trace.instrumentation.playws.HeadersInjectAdapter.SETTER;
+import static datadog.trace.instrumentation.playws.PlayWSClientDecorator.DECORATE;
import static java.util.Collections.singletonMap;
import static net.bytebuddy.matcher.ElementMatchers.isMethod;
import static net.bytebuddy.matcher.ElementMatchers.named;
@@ -24,9 +24,9 @@ import play.shaded.ahc.org.asynchttpclient.AsyncHandler;
import play.shaded.ahc.org.asynchttpclient.Request;
@AutoService(Instrumenter.class)
-public class WSClientInstrumentation extends Instrumenter.Default {
- public WSClientInstrumentation() {
- super("wsclient");
+public class PlayWSClientInstrumentation extends Instrumenter.Default {
+ public PlayWSClientInstrumentation() {
+ super("play-ws");
}
@Override
@@ -45,7 +45,7 @@ public class WSClientInstrumentation extends Instrumenter.Default {
.and(takesArguments(2))
.and(takesArgument(0, named("play.shaded.ahc.org.asynchttpclient.Request")))
.and(takesArgument(1, named("play.shaded.ahc.org.asynchttpclient.AsyncHandler"))),
- WSClientAdvice.class.getName());
+ ClientAdvice.class.getName());
}
@Override
@@ -54,19 +54,19 @@ public class WSClientInstrumentation extends Instrumenter.Default {
"datadog.trace.agent.decorator.BaseDecorator",
"datadog.trace.agent.decorator.ClientDecorator",
"datadog.trace.agent.decorator.HttpClientDecorator",
- packageName + ".WSClientDecorator",
+ packageName + ".PlayWSClientDecorator",
packageName + ".HeadersInjectAdapter",
packageName + ".AsyncHandlerWrapper"
};
}
- public static class WSClientAdvice {
+ public static class ClientAdvice {
@Advice.OnMethodEnter(suppress = Throwable.class)
public static AgentSpan methodEnter(
@Advice.Argument(0) final Request request,
@Advice.Argument(value = 1, readOnly = false) AsyncHandler asyncHandler) {
- final AgentSpan span = startSpan("wsclient.request");
+ final AgentSpan span = startSpan("play-ws.request");
DECORATE.afterStart(span);
DECORATE.onRequest(span, request);

RENAME
dd-java-agent/instrumentation/wsclient-2/src/test/groovy/WSClientTest.groovy
dd-java-agent/instrumentation/play-ws-2/src/test/groovy/PlayWSClientTest.groovy
@@ -2,7 +2,7 @@ import akka.actor.ActorSystem
import akka.stream.ActorMaterializer
import akka.stream.ActorMaterializerSettings
import datadog.trace.agent.test.base.HttpClientTest
-import datadog.trace.instrumentation.wsclient.WSClientDecorator
+import datadog.trace.instrumentation.playws.PlayWSClientDecorator
import play.libs.ws.StandaloneWSClient
import play.libs.ws.StandaloneWSRequest
import play.libs.ws.StandaloneWSResponse
@@ -15,7 +15,7 @@ import spock.lang.Shared
import java.util.concurrent.TimeUnit
-class WSClientTest extends HttpClientTest<WSClientDecorator> {
+class PlayWSClientTest extends HttpClientTest<PlayWSClientDecorator> {
@Shared
ActorSystem system
@@ -23,7 +23,7 @@ class WSClientTest extends HttpClientTest<WSClientDecorator> {
StandaloneWSClient wsClient
def setupSpec() {
- String name = "wsclient"
+ String name = "play-ws"
system = ActorSystem.create(name)
ActorMaterializerSettings settings = ActorMaterializerSettings.create(system)
ActorMaterializer materializer = ActorMaterializer.create(settings, system, name)
@@ -59,12 +59,12 @@ class WSClientTest extends HttpClientTest<WSClientDecorator> {
}
@Override
- WSClientDecorator decorator() {
- return WSClientDecorator.DECORATE
+ PlayWSClientDecorator decorator() {
+ return PlayWSClientDecorator.DECORATE
}
String expectedOperationName() {
- return "wsclient.request"
+ return "play-ws.request"
}
@Override

MODIFY
settings.gradle
settings.gradle
@@ -82,6 +82,8 @@ include ':dd-java-agent:instrumentation:okhttp-3'
include ':dd-java-agent:instrumentation:osgi-classloading'
include ':dd-java-agent:instrumentation:play-2.4'
include ':dd-java-agent:instrumentation:play-2.6'
+include ':dd-java-agent:instrumentation:play-ws-1'
+include ':dd-java-agent:instrumentation:play-ws-2'
include ':dd-java-agent:instrumentation:rabbitmq-amqp-2.7'
include ':dd-java-agent:instrumentation:ratpack-1.4'
include ':dd-java-agent:instrumentation:rxjava-1'
@@ -99,8 +101,6 @@ include ':dd-java-agent:instrumentation:tomcat-classloading'
include ':dd-java-agent:instrumentation:trace-annotation'
include ':dd-java-agent:instrumentation:twilio'
include ':dd-java-agent:instrumentation:vertx'
-include ':dd-java-agent:instrumentation:wsclient-1'
-include ':dd-java-agent:instrumentation:wsclient-2'
// benchmark
include ':dd-java-agent:benchmark'

wsclient -> play-ws