Class TraceWebClientSubscriber

  • All Implemented Interfaces:
    org.reactivestreams.Subscriber<org.springframework.web.reactive.function.client.ClientResponse>, reactor.core.CoreSubscriber<org.springframework.web.reactive.function.client.ClientResponse>

    public final class TraceWebClientSubscriber
    extends Object
    implements reactor.core.CoreSubscriber<org.springframework.web.reactive.function.client.ClientResponse>
    Based on Spring Sleuth's Reactor instrumentation. https://github.com/spring-cloud/spring-cloud-sleuth/blob/master/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/instrument/web/client/TraceWebClientBeanPostProcessor.java
    • Constructor Detail

      • TraceWebClientSubscriber

        public TraceWebClientSubscriber​(reactor.core.CoreSubscriber<? super org.springframework.web.reactive.function.client.ClientResponse> actual,
                                        io.opentelemetry.context.Context tracingContext)
    • Method Detail

      • onSubscribe

        public void onSubscribe​(org.reactivestreams.Subscription subscription)
        Specified by:
        onSubscribe in interface reactor.core.CoreSubscriber<org.springframework.web.reactive.function.client.ClientResponse>
        Specified by:
        onSubscribe in interface org.reactivestreams.Subscriber<org.springframework.web.reactive.function.client.ClientResponse>
      • onNext

        public void onNext​(org.springframework.web.reactive.function.client.ClientResponse response)
        Specified by:
        onNext in interface org.reactivestreams.Subscriber<org.springframework.web.reactive.function.client.ClientResponse>
      • onError

        public void onError​(Throwable t)
        Specified by:
        onError in interface org.reactivestreams.Subscriber<org.springframework.web.reactive.function.client.ClientResponse>
      • onComplete

        public void onComplete()
        Specified by:
        onComplete in interface org.reactivestreams.Subscriber<org.springframework.web.reactive.function.client.ClientResponse>
      • currentContext

        public reactor.util.context.Context currentContext()
        Specified by:
        currentContext in interface reactor.core.CoreSubscriber<org.springframework.web.reactive.function.client.ClientResponse>