Search code examples
springspring-bootcloudspring-cloud-sleuth

Spring cloud sleuth with Spring data jpa


We are trying to implement Spring cloud sleuth with Zipkin in our project and wanted to know if Spring cloud sleuth will support DB calls with Spring data JPA.

I want to trace the time taken for DB calls just like service calls

When I make a service call with RestTemplate, that gets sent to zipkin and I am able to see that on the dashboard

But DB interactions with Spring data jpa is not getting displayed in Zipkin


Solution

  • You can use the new Dalston feature of using annotations on Spring Data repositories. You can check out this for more info http://cloud.spring.io/spring-cloud-sleuth/spring-cloud-sleuth.html#_managing_spans_with_annotations