Java Spring Web MVC app instrumented with Zipkin and Jaeger based on the Zipkin Brave example. https://github.com/openzipkin/brave-webmvc-example
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system. The project contains a managed MySQL (MariaDB) instance running on port 3306, an embedded AMQP broker running on port 8993, a frontend spring web instance running on port 8081, and a backend spring web instance on port 9000.
There are two sets of backend services instrumented with Zipkin and Jaeger each:
- /api, /querydb, /putmq are instrumented with Zipkin
- /apij, /querydbj, /putmqj are instrumented with Jaeger
The frontends call the respective set of backends and the endpoints are as follow:
- / for Zipkin
- /j for Jaeger
Traces will get sent locally so you will need to have zipkin and/or jaeger running:
- To start zipkin
curl -sSL https://zipkin.io/quickstart.sh | bash -s
java -jar zipkin.jar
- To start jaeger
docker pull jaegertracing/all-in-one:1.10
docker run --rm --name jaeger -p6831:6831/udp -p16686:16686 jaegertracing/all-in-one:1.10
Once you have mvn installed run the following in the same order:
mvn jetty:run -Pbackend
mvn jetty:run -Pfrontend
This will start the frontend and backend webapps, the embedded QPid java AMQP broker, and the managed MariaDB SQL datasource.
Generate a few requests and check out the trace server UI
- For zipkin
curl -s localhost:8081/ -H'user-name:bproverb'
- For jaeger
curl -s localhost:8081/j -H'user-name:bproverb'
Once you generate traces you can access them at:
- Zipkin UI http://localhost:9411
- Jaeger UI http://localhost:16686
- Maven - Dependency Management
- Peco Karayanev - @bproverb -
Project is borrowing code heavily from https://github.com/openzipkin/brave-webmvc-example and https://github.com/yurishkuro/opentracing-tutorial
## License
This project is licensed under the Apache 2.0 License
## Acknowledgments
* Hat tip to anyone whose code was used
* Inspiration
* etc