How to implement Zipkin in Spring Boot 3

Md Mohosin Miah
2 min readJun 16


Monitor your API endpoints using Zipkin in a Spring Boot 3 application

To implement Zipkin in a Spring Boot application and run it using Docker Compose, follow these steps:

Step 1: Create a docker-compose.yml file with the following contents:

container_name: zipkin
- MYSQL_HOST=mysql
- 9411:9411

This file defines a service named “zipkin” that uses the official Zipkin Docker image and exposes port 9411 for the Zipkin UI and HTTP API.

Step 2: Add the necessary dependencies to your project’s pom.xml file:

<!-- Other dependencies -->


These dependencies are required for integrating Zipkin with your Spring Boot application.

Step 3: Configure your application by adding the following properties to the file:

# Zipkin configuration

The spring.zipkin.base-url property specifies the URL where Zipkin is running (in this case, http://localhost:9411/). The spring.sleuth.sampler.probability property sets the sampling probability to 100% to ensure all requests are traced.

Step 4: Run the Zipkin server using Docker docker-compose.yml file is located, and run the following command:

docker-compose up

This will start the Zipkin server in a Docker container.

Once you have implemented and configured Zipkin in your Spring Boot application, you can run it alongside other microservices. Zipkin will collect and display distributed traces, allowing you to analyze the flow of requests across your system.

Happy coding :)

Project URL:

GitHub Source Zipkin :



Recommended from Medium