0

I am trying to trace HTTP calls made through Async RestTemplate from a Spring Boot Application. I have a ZipKin instance running locally to which the microservices in question point to.

I could see spans recorded at every service in ZipKin UI, however I am not able to see the trace covering all the spans.

With RestTemplate the trace is recorded as normal. i.e. I am able to see end-to-end via the UI.

Any pointers will help, Thanks in advance.

  • It should work out of the box. An example is here - https://github.com/spring-cloud-samples/brewery/blob/8fc5bdbd6a65306bc3c4d088d20f5d14edbf3af2/brewing/src/main/java/io/spring/cloud/samples/brewery/bottling/BottlerService.java#L81 . Can you post your sample somewhere? Either there's a bug or you're doing sth wrong – Marcin Grzejszczak Dec 11 '16 at 14:08
  • Maybe try with the latest releases? Is it working fine with 1.0.12 or 1.1.1 ? – Marcin Grzejszczak Jan 18 '17 at 16:02

1 Answers1

0

I'm not sure this is what you are expecting, you can add this dependancy in pom.xml if you are using maven:

<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-sleuth-zipkin</artifactId>
</dependency>

and a AlwaysSampler @Bean in your SpringBootApplication class

@Bean
public AlwaysSampler defaultSampler(){
    return new AlwaysSampler();
}

This will help you to sample your inputs in zipkin all time.

pheeleeppoo
  • 1,491
  • 6
  • 25
  • 29
Vaira
  • 1