opentracing-contrib / java-spring-web

OpenTracing Spring Web instrumentation
Apache License 2.0
107 stars 59 forks source link

Skip patterns does not apply to RestTemplate client requests #142

Open brvollino opened 3 years ago

brvollino commented 3 years ago

Hi, I've noticed that the skip url pattern configured by property opentracing.spring.web.skipPattern does not apply to RestTemplate requests.

My application uses RestTemplate to perform regular health check requests to other applications, which I need to stop tracing. Is there any way to achieve that?

I am looking into the code and I believe the TracingRestTemplateInterceptor may receive the Pattern with qualifier "skipPattern" and stop creating spans if it matches the URL in the request. It would be necessary to change SkipPatternAutoConfiguration to be loaded when opentracing.spring.web.client.enabled==true as well.