Remove dependency on Tracer
MODIFY
dd-java-agent/instrumentation/aws-java-sdk-1.11.0/src/test/groovy/AWSClientTest.groovy
dd-java-agent/instrumentation/aws-java-sdk-1.11.0/src/test/groovy/AWSClientTest.groovy
@@ -24,7 +24,6 @@ import com.amazonaws.services.s3.AmazonS3ClientBuilder
import datadog.trace.agent.test.AgentTestRunner
import datadog.trace.api.DDSpanTypes
import datadog.trace.instrumentation.api.Tags
-import io.opentracing.Tracer
import org.apache.http.conn.HttpHostConnectException
import org.apache.http.impl.execchain.RequestAbortedException
import spock.lang.AutoCleanup
@@ -34,6 +33,7 @@ import java.util.concurrent.atomic.AtomicReference
import static datadog.trace.agent.test.server.http.TestHttpServer.httpServer
import static datadog.trace.agent.test.utils.PortUtils.UNUSABLE_PORT
+import static datadog.trace.instrumentation.api.AgentTracer.activeSpan
class AWSClientTest extends AgentTestRunner {
@@ -258,7 +258,7 @@ class AWSClientTest extends AgentTestRunner {
client.getObject("someBucket", "someKey")
then:
- ((Tracer) TEST_TRACER).activeSpan() == null
+ activeSpan() == null
thrown RuntimeException
assertTraces(1) {
@@ -304,7 +304,7 @@ class AWSClientTest extends AgentTestRunner {
client.getObject("someBucket", "someKey")
then:
- ((Tracer) TEST_TRACER).activeSpan() == null
+ activeSpan() == null
thrown AmazonClientException
assertTraces(1) {

MODIFY
dd-java-agent/instrumentation/aws-java-sdk-1.11.0/src/test_before_1_11_106/groovy/AWSClientTest.groovy
dd-java-agent/instrumentation/aws-java-sdk-1.11.0/src/test_before_1_11_106/groovy/AWSClientTest.groovy
@@ -18,7 +18,6 @@ import com.amazonaws.services.s3.S3ClientOptions
import datadog.trace.agent.test.AgentTestRunner
import datadog.trace.api.DDSpanTypes
import datadog.trace.instrumentation.api.Tags
-import io.opentracing.Tracer
import org.apache.http.conn.HttpHostConnectException
import org.apache.http.impl.execchain.RequestAbortedException
import spock.lang.AutoCleanup
@@ -28,6 +27,7 @@ import java.util.concurrent.atomic.AtomicReference
import static datadog.trace.agent.test.server.http.TestHttpServer.httpServer
import static datadog.trace.agent.test.utils.PortUtils.UNUSABLE_PORT
+import static datadog.trace.instrumentation.api.AgentTracer.activeSpan
class AWSClientTest extends AgentTestRunner {
@@ -228,7 +228,7 @@ class AWSClientTest extends AgentTestRunner {
client.getObject("someBucket", "someKey")
then:
- ((Tracer) TEST_TRACER).activeSpan() == null
+ activeSpan() == null
thrown RuntimeException
assertTraces(1) {
@@ -274,7 +274,7 @@ class AWSClientTest extends AgentTestRunner {
client.getObject("someBucket", "someKey")
then:
- ((Tracer) TEST_TRACER).activeSpan() == null
+ activeSpan() == null
thrown AmazonClientException
assertTraces(1) {

Remove dependency on Tracer