Skip to content

@EnablePrometheusEndpoint to expose prometheus compatible endpoint in spring boot

License

Notifications You must be signed in to change notification settings

maust/spring-boot-prometheus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

@EnablePrometheusEndpoint to expose prometheus compatible endpoint in spring boot

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages