Class 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
    • 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 io.prometheus.client.exporter.MetricsServlet

        doPost
      • Methods inherited from class javax.servlet.http.HttpServlet

        doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service
      • Methods inherited from class javax.servlet.GenericServlet

        destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
    • 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 interface javax.servlet.Servlet
        Overrides:
        init in class io.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 class io.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 class javax.servlet.http.HttpServlet
        Throws:
        javax.servlet.ServletException
        IOException