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
The default destination name is zipkin . spring-cloud-sleuth-stream is deprecated and incompatible with these destinations.
Spring Cloud Sleuth allows you to aggregate and track log entries as requests move through a distributed software system. In a monolithic system, it's relatively easy to track requests as they move through the codebase because all requests can easily be logged to the same log file.
How it Works Internally: Like said earlier, It creates tree like structure with each node having different span-ids with common trace-id which happens to be span-id of the root node(i.e. starting point of the request flow). Tree like structure of sleuth for tracing.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With