spring-cloud / spring-cloud-circuitbreaker

Spring Cloud Circuit Breaker API and Implementations
Apache License 2.0
335 stars 110 forks source link

Spring Cloud Sleuth Tracing info not passing to downstream services when using spring-cloud-circuitbreaker with resilience4j #40

Closed sivaprasadreddy closed 5 years ago

sivaprasadreddy commented 5 years ago

I have microservices setup using SpringBoot and I have distributed tracing setup using SpringCloud Sleuth and Zipkin and the tracing is working as expected.

However, when I start using Spring Cloud CircuitBreaker while calling the downstream services using RestTemplate then tracing is broken ie the parent traceId is not passed to downstream service.

cbFactory.create("getProductById").run(() -> restTemplate.getForObject(catalogSvcUrl+"api/products/"+id, Product.class))

But if I don't apply CircuitBreaker then Slueth tracing is working fine.

restTemplate.getForObject(catalogSvcUrl+"api/products/"+id, Product.class)) //this is working fine.

Is there any way to make the sleuth tracing info (headers) pass to downstream services while using Spring Cloud CurcuitBreaker?

ryanjbaxter commented 5 years ago

@sivaprasadreddy I am not able to reproduce this issue, can you please provide a sample to reproduce the problem

ryanjbaxter commented 5 years ago

Closing due to lack of feedback

sivaprasadreddy commented 4 years ago

I tried with 0.0.1.BUILD-SNAPSHOT version with which I got this error. Now I tried with 1.0.0.RELEASE version and it is working fine.