Class PrometheusExpositionService
- java.lang.Object
-
- com.linecorp.armeria.server.AbstractHttpService
-
- com.linecorp.armeria.server.metric.PrometheusExpositionService
-
- All Implemented Interfaces:
Unwrappable
,HttpService
,Service<HttpRequest,HttpResponse>
public class PrometheusExpositionService extends AbstractHttpService
Exposes Prometheus metrics in text format 0.0.4.
-
-
Constructor Summary
Constructors Constructor Description PrometheusExpositionService(CollectorRegistry collectorRegistry)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected HttpResponse
doGet(ServiceRequestContext ctx, HttpRequest req)
Handles aGET
request.protected HttpResponse
doPost(ServiceRequestContext ctx, HttpRequest req)
Handles aPOST
request.-
Methods inherited from class com.linecorp.armeria.server.AbstractHttpService
doDelete, doDelete, doGet, doHead, doHead, doOptions, doOptions, doPatch, doPatch, doPost, doPut, doPut, doTrace, doTrace, serve
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.linecorp.armeria.server.Service
as, decorate, decorate, decorate, serviceAdded, shouldCachePath
-
-
-
-
Constructor Detail
-
PrometheusExpositionService
public PrometheusExpositionService(CollectorRegistry collectorRegistry)
Creates a new instance.- Parameters:
collectorRegistry
- Prometheus registry
-
-
Method Detail
-
doGet
protected HttpResponse doGet(ServiceRequestContext ctx, HttpRequest req) throws Exception
Description copied from class:AbstractHttpService
Handles aGET
request. This method sends a405 Method Not Allowed
response by default.- Overrides:
doGet
in classAbstractHttpService
- Throws:
Exception
-
doPost
protected HttpResponse doPost(ServiceRequestContext ctx, HttpRequest req) throws Exception
Description copied from class:AbstractHttpService
Handles aPOST
request. This method sends a405 Method Not Allowed
response by default.- Overrides:
doPost
in classAbstractHttpService
- Throws:
Exception
-
-