Class PrometheusEndpoint

java.lang.Object
io.micronaut.configuration.metrics.micrometer.prometheus.management.PrometheusEndpoint

@Endpoint("prometheus") public class PrometheusEndpoint extends Object
Adds a management endpoint for Prometheus.
Since:
1.1
Author:
graemerocher
  • Field Details

  • Constructor Details

    • PrometheusEndpoint

      public PrometheusEndpoint(io.micrometer.prometheusmetrics.PrometheusMeterRegistry prometheusMeterRegistry)
      Parameters:
      prometheusMeterRegistry - The meter registry
    • PrometheusEndpoint

      @Inject public PrometheusEndpoint(io.micrometer.prometheusmetrics.PrometheusMeterRegistry prometheusMeterRegistry, @Named("blocking") ExecutorService scrapeExecutor)
      Parameters:
      prometheusMeterRegistry - The meter registry
      scrapeExecutor - The executor used to stream the scrape
  • Method Details

    • scrape

      @Deprecated(since="6.0") public String scrape()
      Deprecated.
      Use the streamed endpoint response instead.
      Scrapes the data.
      Returns:
      the data
    • scrapeStream

      @Read(produces="text/plain; version=0.0.4") public InputStream scrapeStream()
      Scrapes the data.
      Returns:
      the data