This project is an example implementation of distributed logging with Spring Cloud Sleuth and Zipkin.
- Run
docker-compose up
in the project's root folder. This will pull the official Zipkin Docker image and run it in a Docker container. Once the container is up and running, the Zipkin server will be available under http://localhost:9411/zipkin - Open another new terminal from the project's root folder and
cd order-service
. - Run
mvn spring-boot:run
from the command line. This will start the order service under this URL: http://localhost:8080/ - Open a new terminal from the project's root folder and
cd customer-service
. - Run
mvn spring-boot:run
from the command line. This will start the customer service under this URL: http://localhost:8081/ - Open yet another terminal and execute this cURL command:
curl -X POST http://localhost:8080/
. This will yield this response:{"orderID":"1","customerID":"1"}
Now you should be able to search for distributed log traces under http://localhost:9411/zipkin.
These log traces will include Spring Cloud Sleuth trace IDs (for identifying an entire process) and span IDs (for identifying single steps in that process).
Run mvn clean install
from the command line.
MIT License