Skip to content

An example of Prometheus instrumentation in Java with Spring Boot

License

Notifications You must be signed in to change notification settings

philwinder/prometheus-java-spring-boot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages