Search code examples
spring-bootzipkinspring-cloud-sleuth

Spring Boot Micro Service Tracing Options


I am having below requirement for which is there any open source library will cover all of them.

1.We are building a distributed micro service architecture with Spring Boot.Which includes more than 100 micro services.
2.There is a lot if inter micro service communications possible to achieve single transaction.
3.We want to trace every micro service call and the trace should provide following information. 
 a.Transaction ID/Trace ID
 b. Back end transaction status-HTTP status for REST.Like wise for SOAP as well.
 c.Time taken for that call.
 d.Request and Response payload.
Currently we are achieving this using indigenous tracing frame work.Is there any open source project will handle all this without any coding from developer.I know we have few options with spring Boot Cloud Zipkin,Seluth etc does this handle above requirements. 

Solution

  • My project has similar requirements to yours. IMHO, Spring-cloud-sleuth + Zipkin work well in my case.

    For any inter microservices communication, we are using Kafka, and Spring-cloud-sleuth + zipkin has no problem to trace all the call, from REST -> Kafka -> More Kafka -> REST.

    To enable Kafka Tracing, just simply add

    spring:
      sleuth:
        propagation-keys: some-key
        sampler:
          probability: 1
        messaging:
          kafka:
            enabled: true
    

    We are also using Azure ApplicationInsights to do centralized logging, which is well integrated with Spring Cloud.

    Hope above give you some confidence of using Sleuth + Zipkin.