Add startTime and Duration methods to MutableSpan interface
MODIFY
dd-trace-api/src/main/java/datadog/trace/api/interceptor/MutableSpan.java
dd-trace-api/src/main/java/datadog/trace/api/interceptor/MutableSpan.java
@@ -3,6 +3,13 @@ package datadog.trace.api.interceptor;
import java.util.Map;
public interface MutableSpan {
+
+ /** @return Start time with nanosecond scale, but millisecond resolution. */
+ long getStartTime();
+
+ /** @return Duration with nanosecond scale. */
+ long getDurationNano();
+
String getOperationName();
MutableSpan setOperationName(final String serviceName);

MODIFY
dd-trace-ot/src/main/java/datadog/opentracing/DDSpan.java
dd-trace-ot/src/main/java/datadog/opentracing/DDSpan.java
@@ -285,11 +285,13 @@ public class DDSpan implements Span, MutableSpan {
return meta;
}
+ @Override
@JsonGetter("start")
public long getStartTime() {
return startTimeMicro * 1000L;
}
+ @Override
@JsonGetter("duration")
public long getDurationNano() {
return durationNano.get();

Add startTime and Duration methods to MutableSpan interface