Git Product home page Git Product logo

spring-profile-logging's Introduction

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

spring-profile-logging's People

Contributors

mirage22 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.