Uploaded image for project: 'Spring Boot & Cloud'
  1. Spring Boot & Cloud
  2. SB-947

Document what is needed to get Spring Boot 1.5.x working with Prometheus

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major Major
    • None
    • None
    • documentation
    • None

      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

              ssitani Stefan Sitani (Inactive)
              gandrian Georgios Andrianakis
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: