Class PrometheusEndpoint
java.lang.Object
io.micronaut.configuration.metrics.micrometer.prometheus.management.PrometheusEndpoint
Adds a management endpoint for Prometheus.
- Since:
- 1.1
- Author:
- graemerocher
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPrometheusEndpoint(io.micrometer.prometheusmetrics.PrometheusMeterRegistry prometheusMeterRegistry) PrometheusEndpoint(io.micrometer.prometheusmetrics.PrometheusMeterRegistry prometheusMeterRegistry, ExecutorService scrapeExecutor) Deprecated, for removal: This API element is subject to removal in a future version.The scrape no longer runs on a separate executor. -
Method Summary
Modifier and TypeMethodDescriptionscrape()Deprecated.Use the streamed endpoint response instead.Scrapes the data.
-
Field Details
-
ID
- See Also:
-
-
Constructor Details
-
PrometheusEndpoint
@Inject public PrometheusEndpoint(io.micrometer.prometheusmetrics.PrometheusMeterRegistry prometheusMeterRegistry) - Parameters:
prometheusMeterRegistry- The meter registry
-
PrometheusEndpoint
@Deprecated(since="6.1.1", forRemoval=true) public PrometheusEndpoint(io.micrometer.prometheusmetrics.PrometheusMeterRegistry prometheusMeterRegistry, ExecutorService scrapeExecutor) Deprecated, for removal: This API element is subject to removal in a future version.The scrape no longer runs on a separate executor. UsePrometheusEndpoint(PrometheusMeterRegistry).- Parameters:
prometheusMeterRegistry- The meter registryscrapeExecutor- Not used. The scrape is written on the thread that handles the request.
-
-
Method Details
-
scrape
Deprecated.Use the streamed endpoint response instead.Scrapes the data.- Returns:
- the data
-
scrapeStream
@Read(produces="text/plain; version=0.0.4") @ExecuteOn("blocking") public InputStream scrapeStream()Scrapes the data.The scrape is written to an in-memory buffer on the calling thread, and the returned stream reads from that buffer. The endpoint runs on the
TaskExecutors.BLOCKINGexecutor so that large scrapes do not block the event loop.- Returns:
- the data
-