All Projects → moelholm → prometheus-spring-boot-starter

moelholm / prometheus-spring-boot-starter

Licence: other
Spring Boot Starter for enabling a Prometheus actuator endpoint

Programming Languages

java
68154 projects - #9 most used programming language

A Spring Boot Starter for Prometheus

This is Spring Boot Starter module for activating a Prometheus endpoint in Spring Boot applications.

Build Status Maven Central

What you get

A new Spring Boot Actuator endpoint - designed for Prometheus:

http://localhost:8080/prometheus

If you curl that you will get something like:

# HELP heap_used heap_used
# TYPE heap_used gauge

Exactly how Prometheus likes it.

How you get it

It's as easy as any other Spring Boot Starter ;). Find your recipe below...

Gradle:

compile "com.moelholm:prometheus-spring-boot-starter:1.0.1"

Maven:

<dependency>
  <groupId>com.moelholm</groupId>
  <artifactId>prometheus-spring-boot-starter</artifactId>
  <version>1.0.1</version>
</dependency>

Configuration

You can configure 2 x properties - here shown with their default values:

endpoints.prometheus.path      = /prometheus

endpoints.prometheus.sensitive = false

Same configuration as you will find with the standard Spring Boot Actuator endpoints.

Alternatives

There are other starters as well:

Both actually existed at the time I started development of this starter. The first one is simple but lacks two things: being in the Maven Central and using Spring Boot Actuator endpoints. The second one is very much like this starter - but additionally comes with health indicator information as well. Personally I found the implementation a bit complex - contrary to Thomas' implementation. Hence this starter: a kind of mashup ;)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].