Remove deprecated usage.
MODIFY
dd-java-agent/instrumentation/jax-rs/src/test/groovy/JerseyTest.groovy
dd-java-agent/instrumentation/jax-rs/src/test/groovy/JerseyTest.groovy
@@ -4,7 +4,7 @@ import org.junit.ClassRule
import spock.lang.Shared
import spock.lang.Timeout
-@Timeout(1)
+@Timeout(5)
class JerseyTest extends AgentTestRunner {
static {

MODIFY
dd-java-agent/instrumentation/mongo-3.1/src/main/java/datadog/trace/instrumentation/mongo/DDTracingCommandListener.java
dd-java-agent/instrumentation/mongo-3.1/src/main/java/datadog/trace/instrumentation/mongo/DDTracingCommandListener.java
@@ -73,7 +73,7 @@ public class DDTracingCommandListener implements CommandListener {
final Tracer.SpanBuilder spanBuilder =
tracer.buildSpan(MONGO_OPERATION).withTag(Tags.SPAN_KIND.getKey(), Tags.SPAN_KIND_CLIENT);
- final Span span = spanBuilder.startManual();
+ final Span span = spanBuilder.start();
try {
decorate(span, event);
} catch (final Throwable e) {

MODIFY
dd-java-agent/instrumentation/mongo-3.1/src/test/java/datadog/trace/instrumentation/mongo/MongoClientInstrumentationTest.java
dd-java-agent/instrumentation/mongo-3.1/src/test/java/datadog/trace/instrumentation/mongo/MongoClientInstrumentationTest.java
@@ -28,7 +28,7 @@ public class MongoClientInstrumentationTest {
final CommandStartedEvent cmd =
new CommandStartedEvent(1, makeConnection(), "databasename", "query", new BsonDocument());
- final DDSpan span = new DDTracer().buildSpan("foo").startManual();
+ final DDSpan span = new DDTracer().buildSpan("foo").start();
DDTracingCommandListener.decorate(span, cmd);
assertThat(span.context().getSpanType()).isEqualTo("mongodb");
@@ -50,7 +50,7 @@ public class MongoClientInstrumentationTest {
final CommandStartedEvent cmd =
new CommandStartedEvent(1, makeConnection(), "databasename", "query", query);
- final DDSpan span = new DDTracer().buildSpan("foo").startManual();
+ final DDSpan span = new DDTracer().buildSpan("foo").start();
DDTracingCommandListener.decorate(span, cmd);
assertThat(span.getTags().get(Tags.DB_STATEMENT.getKey()))

MODIFY
dd-trace-ot/docs/opentracing-api.md
dd-trace-ot/docs/opentracing-api.md
@@ -62,7 +62,7 @@ Sometimes you need to create a span without promoting it as the active. If you w
```java
// Create a span, but do not promoting it as the active span
- Span anotherSpan = tracer.buildSpan("componentTracking").startManual();
+ Span anotherSpan = tracer.buildSpan("componentTracking").start();
```
Typically, span creations are made in the beginning of the methods you want to trace.

MODIFY
dd-trace-ot/src/jmh/java/datadog/trace/DDTraceBenchmark.java
dd-trace-ot/src/jmh/java/datadog/trace/DDTraceBenchmark.java
@@ -25,12 +25,12 @@ public class DDTraceBenchmark {
@Benchmark
public Object testBuildStartSpan(final TraceState state) {
- return state.tracer.buildSpan(SPAN_NAME).startManual();
+ return state.tracer.buildSpan(SPAN_NAME).start();
}
@Benchmark
public Object testFullSpan(final TraceState state) {
- final Span span = state.tracer.buildSpan(SPAN_NAME).startManual();
+ final Span span = state.tracer.buildSpan(SPAN_NAME).start();
span.finish();
return span;
}

Remove deprecated usage.