Integrating microservice components with Zipkin

We will need to connect all the microservice components that we want to trace with Zipkin server. Here is the list of components we will start with:

  • Microservice A
  • Service consumer
  • Zuul API Gateway Server

All we need to do is add dependencies on spring-cloud-sleuth-zipkin and spring-cloud-starter-bus-amqp to the pom.xml file of the preceding projects:

    <dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth-zipkin</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bus-amqp</artifactId>
</dependency>

Go ahead and execute the add service at http://localhost:8100/add. You can now see the details on the Zipkin dashboard. The following screenshot shows some of the details:

The first two rows show the failed requests. The third row shows the details of a successful request. We can further dig in by clicking on the successful row. The following screenshot shows the details displayed:

pent on each service. You can further dig in by clicking on the service bar. The following screenshot shows the details displayed:

In this section, we added distributed tracing for our microservices. We will now be able to visually track everything that is happening with our microservices. This will make it easy to track down and debug issues.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset