@Target(value=TYPE) @Retention(value=RUNTIME) @Documented @Import(value=io.prometheus.client.spring.boot.PrometheusEndpointConfiguration.class) public @interface EnablePrometheusEndpoint
Usage:
Just add this annotation to the main class of your Spring Boot application, e.g.:
@SpringBootApplication
@EnablePrometheusEndpoint
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
Configuration:
You can customize this endpoint at runtime using the following spring properties:
endpoints.prometheus.id (default: "prometheus")endpoints.prometheus.enabled (default: true)endpoints.prometheus.sensitive (default: true)Copyright © 2018. All rights reserved.