In this section, we will learn how to update the source code to enable distributed tracing using Spring Cloud Sleuth and Zipkin. This can be done through the following steps:
- Add dependencies to the build files to bring in Spring Cloud Sleuth and the capability of sending trace information to Zipkin.
- Add dependencies to RabbitMQ and Kafka for the projects that haven't used them before, that is, the Spring Cloud projects authorization-server, eureka-server, and gateway.
- Configure the microservices to send trace information to Zipkin using either RabbitMQ or Kafka.
- Add a Zipkin server to the Docker compose files.
- Add the kafka Spring profile in docker-compose-kafka.yml to the Spring Cloud projects authorization-server, eureka-server, and gateway.
Adding the Zipkin server...