Class PrometheusScrapeEndpoint
java.lang.Object
org.springframework.boot.micrometer.metrics.autoconfigure.export.prometheus.PrometheusScrapeEndpoint
@Endpoint that outputs metrics in a format that can be scraped by the
Prometheus server.- Since:
- 4.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionPrometheusScrapeEndpoint(io.prometheus.metrics.model.registry.PrometheusRegistry prometheusRegistry, @Nullable Properties exporterProperties) Creates a newPrometheusScrapeEndpoint. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.boot.actuate.endpoint.web.WebEndpointResponse<byte[]> scrape(PrometheusOutputFormat format, @Nullable Set<String> includedNames)
-
Constructor Details
-
PrometheusScrapeEndpoint
public PrometheusScrapeEndpoint(io.prometheus.metrics.model.registry.PrometheusRegistry prometheusRegistry, @Nullable Properties exporterProperties) Creates a newPrometheusScrapeEndpoint.- Parameters:
prometheusRegistry- the Prometheus registry to useexporterProperties- the properties used to configure Prometheus'ExpositionFormats- Since:
- 3.3.1
-
-
Method Details
-
scrape
@ReadOperation(producesFrom=PrometheusOutputFormat.class) public org.springframework.boot.actuate.endpoint.web.WebEndpointResponse<byte[]> scrape(PrometheusOutputFormat format, @Nullable Set<String> includedNames)
-