philwinder / prometheus-java-spring-boot

An example of Prometheus instrumentation in Java with Spring Boot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Prometheus Java Spring Boot

This is a quick example of how to instrument your Java Spring Boot app with the Prometheus client.

This project is built with:

  • Java 8
  • Spring Boot 1.5.8
  • Prometheus Java SimpleClient 0.1.0

And is packaged as a Docker container.

See the POM file for more details.

Prometheus

Prometheus is a Cloud Native monitoring application.

To instrument our Java code we need to manipulate the metrics each time a new HTTP request is received.

See the application for more details.

As an added bonus, Prometheus is able to scrape the Spring Boot Actuactor metrics for free!

Building

This project is automatically built by Docker Automated Builds.

To build manually:

docker build -t python-app .

Running

Simply open port 8080 when running as a container:

docker run -p 8080:8080 --name spring-boot-app philwinder/prometheus-java-spring-boot

About

An example of Prometheus instrumentation in Java with Spring Boot

License:MIT License


Languages

Language:Java 100.0%