Sign inSign up

philwinder/prometheus-java-spring-boot

By philwinder

•Updated almost 9 years ago

An example of Prometheus instrumentation in Java with Spring Boot

Image
0

623

philwinder/prometheus-java-spring-boot repository overview

⁠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

Tag summary

Content type

Image

Digest

Size

93.8 MB

Last updated

almost 9 years ago

docker pull philwinder/prometheus-java-spring-boot