spring-profile-logging is the collection of the simple spring-boot based applications (consumer, producer). Both apps send data to the jfrTracer (Jaeger, Zipkin) and can be connected with Java Mission Control and Flight Recorder. Each part of project can be run locally, Docker containers or docker-compose file can be used.
Both tracers are configured on standard default ports
- Jaeger
- Zipkin
The project uses the Gradle build system. Application is running on OpenJDK 11 and above.
$ ./gradlew build
The both spring-boot applications can be run inside the separate Docker containers. You can build them by following commands
$ docker build -f ./docker/Dockerfile_gradle_boot_producer -t tracing-producer .
$ docker build -f ./docker/Dockerfile_gradle_boot_consumer -t tracing-consumer .
Import the project as the Gradle one to your favorite IDE. From the IDE is possible to execute:
- ConsumerApp
- ProducerApp
The docker-compose can be run by the following command.
$ docker-compose -f ./docker/docker-compose.yml up
To run this command it's required to have prepared the Docker images: tracing-consumer
and tracing-producer
.
Both tracers can be run inside the separate docker containers
$ docker run -d -p 6831:6831/udp -p 16686:16686 jaegertracing/all-in-one:latest
$ docker run -d -p 9411:9411 openzipkin/zipkin:latest
$ docker run --name prometheus -d -p 127.0.0.1:9090:9090 prom/prometheus
default port is configured to 9000
custom configuration: it's necessary to edit /etc/prometheus/prometheus.yml
$ docker run -d -p 3000:3000 grafana/grafana
link: http://localhost:3000 pass: admin/admin
- JDK Mission Control Tutorial : Here