@WebEndpoint(id="prometheus") public class PrometheusScrapeEndpoint extends Object
@Endpoint
that outputs metrics in a format that can be scraped by the
Prometheus server.Constructor and Description |
---|
PrometheusScrapeEndpoint(io.prometheus.client.CollectorRegistry collectorRegistry) |
Modifier and Type | Method and Description |
---|---|
WebEndpointResponse<String> |
scrape(TextOutputFormat format,
Set<String> includedNames) |
public PrometheusScrapeEndpoint(io.prometheus.client.CollectorRegistry collectorRegistry)
@ReadOperation(producesFrom=TextOutputFormat.class) public WebEndpointResponse<String> scrape(TextOutputFormat format, @Nullable Set<String> includedNames)