Distributed tracing with Zipkin and Micrometer
Spring Micrometer is a utility library that collects the metrics generated by the Spring Boot application. It provides vendor-neutral APIs that allow you to export the collected metrics to different systems, such as ELK. It collects different types of metrics. A few of them are the following:
- Metrics related to the JVM, CPU, and cache
- Latencies in Spring MVC, WebFlux, and the REST client
- Metrics related to Datasource and HikariCP
- Uptime and Tomcat usage
- Events logged to Logback
Zipkin, along with Micrometer, helps you not only to trace transactions across multiple service invocations but also to capture the response time taken by each service involved in the distributed transaction. Zipkin also shows this information using nice graphs. It helps you to locate the performance bottlenecks and drill down into the specific API call that creates the latency issue. You can find out the total time taken by the main...