Class Exporter
- java.lang.Object
-
- io.prometheus.client.servlet.common.exporter.Exporter
-
-
Field Summary
Fields Modifier and Type Field Description static StringNAME_MUST_BE_EQUAL_TOstatic StringNAME_MUST_NOT_BE_EQUAL_TOstatic StringNAME_MUST_NOT_START_WITHstatic StringNAME_MUST_START_WITH
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoGet(HttpServletRequestAdapter req, HttpServletResponseAdapter resp)voiddoPost(HttpServletRequestAdapter req, HttpServletResponseAdapter resp)voidinit(ServletConfigAdapter servletConfig)
-
-
-
Field Detail
-
NAME_MUST_BE_EQUAL_TO
public static final String NAME_MUST_BE_EQUAL_TO
- See Also:
- Constant Field Values
-
NAME_MUST_NOT_BE_EQUAL_TO
public static final String NAME_MUST_NOT_BE_EQUAL_TO
- See Also:
- Constant Field Values
-
NAME_MUST_START_WITH
public static final String NAME_MUST_START_WITH
- See Also:
- Constant Field Values
-
NAME_MUST_NOT_START_WITH
public static final String NAME_MUST_NOT_START_WITH
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Exporter
public Exporter(io.prometheus.client.CollectorRegistry registry, io.prometheus.client.Predicate<String> sampleNameFilter)
Construct a MetricsServlet for the given registry.- Parameters:
registry- collector registrysampleNameFilter- programmatically set aSampleNameFilter. If there are any filter options configured inServletConfig, they will be merged so that samples need to pass both filters to be exported. sampleNameFilter may benullindicating that nothing should be filtered.
-
-
Method Detail
-
init
public void init(ServletConfigAdapter servletConfig) throws ServletConfigurationException
- Throws:
ServletConfigurationException
-
doGet
public void doGet(HttpServletRequestAdapter req, HttpServletResponseAdapter resp) throws IOException
- Throws:
IOException
-
doPost
public void doPost(HttpServletRequestAdapter req, HttpServletResponseAdapter resp) throws IOException
- Throws:
IOException
-
-