Class PrometheusScrapeHandler
java.lang.Object
io.prometheus.metrics.exporter.common.PrometheusScrapeHandler
Prometheus scrape endpoint.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ExpositionFormatsprivate final AtomicIntegerprivate final booleanprivate final PrometheusRegistry -
Constructor Summary
ConstructorsConstructorDescriptionPrometheusScrapeHandler(PrometheusProperties config, PrometheusRegistry registry) PrometheusScrapeHandler(PrometheusRegistry registry) -
Method Summary
Modifier and TypeMethodDescriptionvoidhandleRequest(PrometheusHttpExchange exchange) makeNameFilter(String[] includedNames) private MetricSnapshotsscrape(PrometheusHttpRequest request) private booleanprivate booleanwriteDebugResponse(MetricSnapshots snapshots, EscapingScheme escapingScheme, PrometheusHttpExchange exchange)
-
Field Details
-
registry
-
expositionFormats
-
nameFilter
-
lastResponseSize
-
supportedFormats
-
preferUncompressedResponse
private final boolean preferUncompressedResponse
-
-
Constructor Details
-
PrometheusScrapeHandler
public PrometheusScrapeHandler() -
PrometheusScrapeHandler
-
PrometheusScrapeHandler
-
PrometheusScrapeHandler
-
-
Method Details
-
handleRequest
- Throws:
IOException
-
makeNameFilter
-
makeNameFilter
-
scrape
-
writeDebugResponse
private boolean writeDebugResponse(MetricSnapshots snapshots, EscapingScheme escapingScheme, PrometheusHttpExchange exchange) throws IOException - Throws:
IOException
-
shouldUseCompression
-