Package io.prometheus.client.exporter
Class HTTPServer.HTTPMetricHandler
java.lang.Object
io.prometheus.client.exporter.HTTPServer.HTTPMetricHandler
- All Implemented Interfaces:
HttpHandler
- Enclosing class:
HTTPServer
Handles Metrics collections from the given registry.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String
private final CollectorRegistry
private final HTTPServer.LocalByteArray
-
Constructor Summary
ConstructorsConstructorDescriptionHTTPMetricHandler
(CollectorRegistry registry) HTTPMetricHandler
(CollectorRegistry registry, Supplier<Predicate<String>> sampleNameFilterSupplier) -
Method Summary
-
Field Details
-
registry
-
response
-
sampleNameFilterSupplier
-
HEALTHY_RESPONSE
- See Also:
-
-
Constructor Details
-
HTTPMetricHandler
-
HTTPMetricHandler
public HTTPMetricHandler(CollectorRegistry registry, Supplier<Predicate<String>> sampleNameFilterSupplier)
-
-
Method Details
-
handle
- Specified by:
handle
in interfaceHttpHandler
- Throws:
IOException
-