Skip to content

spring-boot applications used for profiling and tracing example

Notifications You must be signed in to change notification settings

mirage22/spring-profile-logging

Repository files navigation

Spring-Profile-Logging example

Build Status

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.

Schema:

Project Schema

Available Tracers

Both tracers are configured on standard default ports

  • Jaeger
  • Zipkin

Building

The project uses the Gradle build system. Application is running on OpenJDK 11 and above.

$ ./gradlew build
Building a docker images

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 .

Running from the IDE

Import the project as the Gradle one to your favorite IDE. From the IDE is possible to execute:

  • ConsumerApp
  • ProducerApp

Running the Docker-Compose

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.

Running local Jaeger and Zipkin Tracer

Both tracers can be run inside the separate docker containers

Jeager in docker
$ docker run -d -p 6831:6831/udp -p 16686:16686 jaegertracing/all-in-one:latest
Zipkin in docker
$ docker run -d -p 9411:9411 openzipkin/zipkin:latest

Monitoring and Alerting

Prometheus in docker

$ 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

Grafana in docker

$ docker run -d -p 3000:3000 grafana/grafana

link: http://localhost:3000 pass: admin/admin

Valuable Resources

  • JDK Mission Control Tutorial : Here

About

spring-boot applications used for profiling and tracing example

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages