Remove redunant method

This commit is contained in:
Dave Syer
2016-02-04 13:14:42 +00:00
parent 7f012ac02c
commit ff08e3d518
4 changed files with 3 additions and 7 deletions

View File

@@ -48,7 +48,7 @@ public class TraceCallable<V> extends TraceDelegate<Callable<V>> implements Call
return this.getDelegate().call();
}
finally {
closeAll(span);
close(span);
}
}

View File

@@ -48,10 +48,6 @@ public abstract class TraceDelegate<T> {
this.tracer.close(span);
}
protected void closeAll(Span span) {
span = this.tracer.close(span);
}
protected Span startSpan() {
return this.tracer.joinTrace(getSpanName(), this.parent);
}

View File

@@ -45,7 +45,7 @@ public class TraceRunnable extends TraceDelegate<Runnable> implements Runnable {
this.getDelegate().run();
}
finally {
closeAll(span);
close(span);
}
}
}

View File

@@ -134,7 +134,7 @@ public class DefaultTracer implements Tracer {
return span;
}
else {
if (SpanContextHolder.getCurrentSpan() == null) {
if (!isTracing()) {
SpanContextHolder.push(parent, true);
}
Span span = Span.builder().begin(System.currentTimeMillis()).name(name)