io.prometheus.client.spring.boot.PrometheusEndpointConfiguration Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of simpleclient_spring_boot Show documentation
Show all versions of simpleclient_spring_boot Show documentation
Collect information from Spring Boot actuator.
package io.prometheus.client.spring.boot;
import io.prometheus.client.CollectorRegistry;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
class PrometheusEndpointConfiguration {
@Bean
public PrometheusEndpoint prometheusEndpoint() {
return new PrometheusEndpoint(CollectorRegistry.defaultRegistry);
}
}