Skip to content

Latest commit

 

History

History
50 lines (37 loc) · 1.72 KB

README.md

File metadata and controls

50 lines (37 loc) · 1.72 KB

Deprecated

As this implementation made it into https://github.com/prometheus/client_java there won't be any futher development over here.

Spring-Boot-Prometheus

Spring-Boot-Prometheus makes it easy to use Prometheus with Spring Boot. It exposes an /prometheus endpoint with prometheus-compatible metrics just by adding @EnablePrometheusEndpoint to your configuration.

Build Status

Usage example

  • Add dependency to your pom.xml

    <dependency>
        <groupId>de.marcoaust.prometheus</groupId>
        <artifactId>spring-boot-prometheus</artifactId>
        <version>0.2.0</version>
    </dependency>
    

    You can customize it at runtime through the following properties:

    • endpoints.prometheus.enabled (default: true)
    • endpoints.prometheus.id (default: prometheus)
    • endpoints.prometheus.sensitive (default: true)
  • To include the labeled metrics generated by simpleclient_hostspot, just add it to your runtime path:

    <dependency>
        <groupId>io.prometheus</groupId>
        <artifactId>simpleclient_hotspot</artifactId>
        <version>0.0.16</version>
    </dependency>
    

    In case you want to disable it at runtime, just set prometheus.hotspot.enabled=false.

  • Add @EnablePrometheusEndpoint to your spring configuration

Development setup

TBD

Release History

  • 0.2.0 Updated to Spring Boot 1.3.7
  • 0.1.0 Improving the configurability (contributed by: Eliezio Oliveira)
  • 0.0.2 First release to maven central
  • 0.0.1 Initial version in github

License

Distributed under the Apache 2.0 license. See LICENSE for more information.