Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 355
RDR Avatar asked Mar 23 '17 16:03

RDR


People also ask

Is spring Cloud Sleuth deprecated?

The default destination name is zipkin . spring-cloud-sleuth-stream is deprecated and incompatible with these destinations.

What is spring cloud sleuth used for?

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 does Spring cloud sleuth work internally?

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.


1 Answers

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

like image 119
Marcin Grzejszczak Avatar answered Nov 15 '22 06:11

Marcin Grzejszczak