Do we need to use Sleuth with Zipkin - spring

In order to trace service invocation across microservices , we can use Zipkin.
From the below URLs ,we understand the time taken for calls across micro services can be captured in zipkin
https://tanzu.vmware.com/developer/guides/spring/spring-zipkin/
https://springhow.com/spring-boot-zipkin-distributed-tracing/
Do we still need to use spring sleuth along with zipkin ? Does the span id and trace id generated by Sletuh provide any additional information apart from what Zipkin can capture on its own ?

Since brave is a zipkin library I presume there is no need to have dependency on sleuth in order to trace service calls across microservices.
One probable benefit of Sleuth is that it adds the span id and trace id in the application logs ( using logback MDC concept ) . These logs can be pushed into elastic search using Logstash

If you want to use only Spring Cloud Sleuth without the Zipkin integration, add the spring-cloud-starter-sleuth module to your project
Check this for reference

Related

Micrometer Rest API

I have a non boot spring application with micrometer integrated. Right now we are pushing these metrics to the logging file using LoggingRegistry.
We want to enhance this project to expose these metrics in the Rest API(we cannot use actuator as turning ON auto configuration is causing issues in our non boot application).Is there any way to expose these metrics which are automatically provided by the micrometer in the Rest API?
Any example will be appreciated?
You can add PrometheusMeterRegistry, it is for this use case, see the docs: https://micrometer.io/docs/registry/prometheus

How to integrate splunk with spring cloud sleuth in Spring Boot project?

we are developing microservices using spring boot. we want to track the progress of microservices using Spring Cloud Sleuth and wants to show that logs using Splunk on some dashboard etc.
For demo purpose we have are building three services, Service A calls service B which in turns call Service C. we want to trace their calls using slueth and consolidate them in splunk.
how to implement distributed tracing with Sleuth and Splunk?
any help would be greatly appreciated.

how to exclude some calls with the Feign from tracing with the cloud sleuth

there's a microservice with spring-boot 1.5 which uses the Feign to communicate with others services, also there's spring-cloud-starter-zipkin which wrapped all calls through the Feign and sends tracing to zipkin server.
The thing is i don't wanna wrap all calls and trace them, there're only several most important to do that.
How can i exclude some calls(methods) with Feign from tracing or exlude some whole Feign client(interface)?
In Sleuth 1.3.x you can create a custom SpanReporter that, before sending a span to Zipkin, would analyze the URL and would not report that span. In Sleuth 2.0.x you can create a custom HttpSampler for the client side (with name sleuthClientSampler)

How does the Spring Boot Actuator work together with the Netflix Servo?

There are Spring Boot project that uses a Netflix Servo to collect metrics and send to Graphite.
I want to send metrics with the Spring Boot Actuator on Graphite, such as number request per every endpoint and time of response for every request, instead of creating custom metric.
But I ran into the problem. When I use the library only spring-boot-starter-actuator, then the desired parameters displays:
but when I apply library spring-cloud-starter-eureka, displayed only time of response from servo:
If someone faced with this problem, can you explain why it happens and how to solve it?
I use such version Spring Boot - 1.5.9.RELEASE and Spring Cloud - Edgware.SR1.
I will be glad to any response)
Link to test project: https://github.com/rmartseniuk/spring-metric

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
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

Resources