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
FieldsModifier and TypeFieldDescriptionprivate io.micrometer.prometheus.PrometheusMeterRegistryprivate static final long -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateRegistryServlet(io.micrometer.prometheus.PrometheusMeterRegistry registry) Creates the servlet instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) protected voiddoPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) 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, serviceMethods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
-
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
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:
doGetin classjavax.servlet.http.HttpServlet- Throws:
IOException
-
doPost
protected void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws IOException - Overrides:
doPostin classjavax.servlet.http.HttpServlet- Throws:
IOException
-