-
Task
-
Resolution: Done
-
Major
-
None
-
None
-
None
-
SB-2018-10-27, SB-2018-11-09, SB-2018-11-23, SB-2018-12-07
We need to document what is needed to get a Spring Boot 1.5.x application to expose Prometheus metrics.
The basic principles are:
- Add actuator to the dependencies of the project: org.springframework.boot:spring-boot-actuator
- Add Micrometer's support for Spring Boot 1.5.x by adding the following dependency: io.micrometer:micrometer-spring-legacy
- Make Micrometer export metrics in Prometheus format by adding the following dependency: io.micrometer:micrometer-registry-prometheus
- When the application starts, the Prometheus metrics are available at: /prometheus. This can be changed by setting the endpoints.prometheus.id property to whatever path is needed
A simple example of how to use Spring Boot and Prometheus on Docker, can be found here.
The reference documentation for Micrometer and Spring Boot 1.5.x is here