Class IipEcospherePrometheusExporter.RegistryServlet

java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
de.iip_ecosphere.platform.monitoring.prometheus.IipEcospherePrometheusExporter.RegistryServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
Enclosing class:
IipEcospherePrometheusExporter

public static class IipEcospherePrometheusExporter.RegistryServlet extends javax.servlet.http.HttpServlet
A simple metrics servlet for a given local, bridged metrics registry. A bit like IipEcospherePrometheusExporter.PrometheusMetricsServlet (unfortunately not much reusable), but with definable registry suitable for our purposes.
Author:
Holger Eichelberger, SSE
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private io.micrometer.prometheus.PrometheusMeterRegistry
     
    private static final long
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    RegistryServlet(io.micrometer.prometheus.PrometheusMeterRegistry registry)
    Creates the servlet instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
     
    protected void
    doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
     
    static Set<String>
    parseNames(javax.servlet.http.HttpServletRequest req)
    Parses the requested names from the request.

    Methods inherited from class javax.servlet.http.HttpServlet

    doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service

    Methods inherited from class javax.servlet.GenericServlet

    destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • registry

      private io.micrometer.prometheus.PrometheusMeterRegistry registry
  • Constructor Details

    • RegistryServlet

      private RegistryServlet(io.micrometer.prometheus.PrometheusMeterRegistry registry)
      Creates the servlet instance.
      Parameters:
      registry - the registry.
  • Method Details

    • parseNames

      public static Set<String> parseNames(javax.servlet.http.HttpServletRequest req)
      Parses the requested names from the request.
      Parameters:
      req - the request
      Returns:
      the names
    • doGet

      protected void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws IOException
      Overrides:
      doGet in class javax.servlet.http.HttpServlet
      Throws:
      IOException
    • doPost

      protected void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws IOException
      Overrides:
      doPost in class javax.servlet.http.HttpServlet
      Throws:
      IOException