onError & onComplete should reuse span from ThreadLocal
we've played around with the working M7 version, and only after rolling back the changes on wrapping of onError and onComplete with try-with-resources, did we manage to successfully propagate the span context to various places.
fixes gh-973
This commit is contained in:
@@ -83,15 +83,11 @@ final class ScopePassingSpanSubscriber<T> extends AtomicBoolean implements SpanS
|
||||
}
|
||||
|
||||
@Override public void onError(Throwable throwable) {
|
||||
try (Tracer.SpanInScope inScope = this.tracer.withSpanInScope(this.span)) {
|
||||
this.subscriber.onError(throwable);
|
||||
}
|
||||
this.subscriber.onError(throwable);
|
||||
}
|
||||
|
||||
@Override public void onComplete() {
|
||||
try (Tracer.SpanInScope inScope = this.tracer.withSpanInScope(this.span)) {
|
||||
this.subscriber.onComplete();
|
||||
}
|
||||
this.subscriber.onComplete();
|
||||
}
|
||||
|
||||
@Override public Context currentContext() {
|
||||
|
||||
Reference in New Issue
Block a user