public final class PrometheusHandler extends Object implements org.forgerock.http.Handler
Handler
from which Prometheus can scrap monitoring information.Modifier and Type | Field and Description |
---|---|
static List<String> |
SUPPORTED_HTTP_METHODS
List of HTTP methods supported by a Prometheus Handler.
|
Modifier and Type | Method and Description |
---|---|
Promise<org.forgerock.http.protocol.Response,NeverThrowsException> |
handle(org.forgerock.services.context.Context context,
org.forgerock.http.protocol.Request request) |
static PrometheusHandler |
prometheusHandler(String metricPrefix,
Supplier<MeterRegistry> meterRegistrySupplier)
Returns a new Prometheus Handler.
|
public static PrometheusHandler prometheusHandler(String metricPrefix, Supplier<MeterRegistry> meterRegistrySupplier)
metricPrefix
- The prefix that will be prepended before each metrics.
Ideally this will be the product specific prefix.meterRegistrySupplier
- A Supplier
of the MetricRegistry
which will be used to collect metrics to include in
HTTP response sent by this PrometheusHandler
.PrometheusHandler
public Promise<org.forgerock.http.protocol.Response,NeverThrowsException> handle(org.forgerock.services.context.Context context, org.forgerock.http.protocol.Request request)
handle
in interface org.forgerock.http.Handler
Copyright 2010-2018 ForgeRock AS.