Added missing span continuation in AsyncRestTemplate

fixes #636
This commit is contained in:
Marcin Grzejszczak
2017-07-12 18:50:56 +02:00
parent feac9980da
commit be81264398

View File

@@ -137,7 +137,10 @@ public class TraceAsyncRestTemplate extends AsyncRestTemplate {
this.errorParser));
// potential race can happen here
if (span != null && span.equals(this.tracer.getCurrentSpan())) {
this.tracer.detach(span);
Span parent = this.tracer.detach(span);
if (parent != null) {
this.tracer.continueSpan(parent);
}
}
return new ListenableFuture<T>() {
@@ -326,9 +329,4 @@ public class TraceAsyncRestTemplate extends AsyncRestTemplate {
return this.tracer.isTracing();
}
}
}