Jaeger with webflux and webclient

762 views Asked by At

Please take a look at https://github.com/winster/jaeger-trace-reactive/blob/master/src/main/java/com/example/demo/JaegerTraceReactiveApplication.java (readme might help to understand the problem better https://github.com/winster/jaeger-trace-reactive)

This is a spring boot application with opentracing-jaeger. As per the doc, jaeger supports webflux and webclient. But it has been noted that, the trace skips the reactive flow when there is a webclient call.

Is there a way to fix this?

1

There are 1 answers

0
Nikolas Iliopoulos On

I had the same issue. I solved it by creating the WebClient in a Bean and not using it directly like this Webclient.builder().baseUrl(properties.getBaseUrl()).build();

@Bean
WebClient.Builder webClient(){
    return WebClient.builder();
}