Package com.nimbusds.common.servlet
Class PrometheusMonitorServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- io.prometheus.client.exporter.MetricsServlet
-
- com.nimbusds.common.servlet.PrometheusMonitorServlet
-
- All Implemented Interfaces:
Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
public class PrometheusMonitorServlet extends io.prometheus.client.exporter.MetricsServlet
Monitor servlet for exposing Dropwizard metrics in Prometheus TSDB format, requires an OAuth 2.0 bearer token for access.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected MasterAccessTokenValidator
tokenValidator
The access token validator.
-
Constructor Summary
Constructors Constructor Description PrometheusMonitorServlet()
Monitor servlet for exposing Dropwizard metrics in Prometheus TSDB format.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
void
init(javax.servlet.ServletConfig config)
protected void
service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
-
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service
-
-
-
-
Field Detail
-
tokenValidator
protected MasterAccessTokenValidator tokenValidator
The access token validator.
-
-
Constructor Detail
-
PrometheusMonitorServlet
public PrometheusMonitorServlet()
Monitor servlet for exposing Dropwizard metrics in Prometheus TSDB format.
-
-
Method Detail
-
init
public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
- Specified by:
init
in interfacejavax.servlet.Servlet
- Overrides:
init
in classio.prometheus.client.exporter.MetricsServlet
- Throws:
javax.servlet.ServletException
-
doGet
protected void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws IOException
- Overrides:
doGet
in classio.prometheus.client.exporter.MetricsServlet
- Throws:
IOException
-
service
protected void service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException
- Overrides:
service
in classjavax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
IOException
-
-