Class TraceWebClientSubscriber
- java.lang.Object
-
- io.opentelemetry.instrumentation.spring.webflux.client.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 Summary
Constructors Constructor Description TraceWebClientSubscriber(reactor.core.CoreSubscriber<? super org.springframework.web.reactive.function.client.ClientResponse> actual, io.opentelemetry.context.Context tracingContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description reactor.util.context.ContextcurrentContext()voidonComplete()voidonError(Throwable t)voidonNext(org.springframework.web.reactive.function.client.ClientResponse response)voidonSubscribe(org.reactivestreams.Subscription subscription)
-
-
-
Method Detail
-
onSubscribe
public void onSubscribe(org.reactivestreams.Subscription subscription)
- Specified by:
onSubscribein interfacereactor.core.CoreSubscriber<org.springframework.web.reactive.function.client.ClientResponse>- Specified by:
onSubscribein interfaceorg.reactivestreams.Subscriber<org.springframework.web.reactive.function.client.ClientResponse>
-
onNext
public void onNext(org.springframework.web.reactive.function.client.ClientResponse response)
- Specified by:
onNextin interfaceorg.reactivestreams.Subscriber<org.springframework.web.reactive.function.client.ClientResponse>
-
onError
public void onError(Throwable t)
- Specified by:
onErrorin interfaceorg.reactivestreams.Subscriber<org.springframework.web.reactive.function.client.ClientResponse>
-
onComplete
public void onComplete()
- Specified by:
onCompletein interfaceorg.reactivestreams.Subscriber<org.springframework.web.reactive.function.client.ClientResponse>
-
currentContext
public reactor.util.context.Context currentContext()
- Specified by:
currentContextin interfacereactor.core.CoreSubscriber<org.springframework.web.reactive.function.client.ClientResponse>
-
-