Updated reactor code
This commit is contained in:
@@ -6,10 +6,10 @@ import org.reactivestreams.Subscriber;
|
||||
import org.reactivestreams.Subscription;
|
||||
import org.springframework.cloud.sleuth.Span;
|
||||
import org.springframework.cloud.sleuth.Tracer;
|
||||
import reactor.core.CoreSubscriber;
|
||||
import reactor.util.Logger;
|
||||
import reactor.util.Loggers;
|
||||
import reactor.util.context.Context;
|
||||
import reactor.util.context.Contextualized;
|
||||
|
||||
/**
|
||||
* A trace representation of the {@link Subscriber}
|
||||
@@ -18,8 +18,7 @@ import reactor.util.context.Contextualized;
|
||||
* @author Marcin Grzejszczak
|
||||
* @since 1.3.0
|
||||
*/
|
||||
class SpanSubscriber extends AtomicBoolean
|
||||
implements Subscriber<Object>, Subscription, Contextualized {
|
||||
class SpanSubscriber extends AtomicBoolean implements Subscription, CoreSubscriber<Object> {
|
||||
|
||||
private static final Logger log = Loggers.getLogger(SpanSubscriber.class);
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@ import org.springframework.context.annotation.Configuration;
|
||||
import reactor.core.publisher.Hooks;
|
||||
import reactor.core.publisher.Mono;
|
||||
import reactor.core.scheduler.Schedulers;
|
||||
import reactor.util.context.Context;
|
||||
|
||||
/**
|
||||
* {@link org.springframework.boot.autoconfigure.EnableAutoConfiguration Auto-configuration}
|
||||
@@ -44,7 +43,7 @@ public class TraceReactorAutoConfiguration {
|
||||
@PostConstruct
|
||||
public void setupHooks() {
|
||||
Hooks.onNewSubscriber((pub, sub) ->
|
||||
new SpanSubscriber(sub, Context.from(sub), this.tracer, pub.toString()));
|
||||
new SpanSubscriber(sub, sub.currentContext(), this.tracer, pub.toString()));
|
||||
Schedulers.setFactory(new Schedulers.Factory() {
|
||||
@Override public ScheduledExecutorService decorateScheduledExecutorService(
|
||||
String schedulerType,
|
||||
|
||||
Reference in New Issue
Block a user