Search in sources :

Example 1 with PrometheusPushGatewayManager

use of org.springframework.boot.actuate.metrics.export.prometheus.PrometheusPushGatewayManager in project spring-boot by spring-projects.

the class PrometheusMetricsExportAutoConfigurationTests method getPushGateway.

private PushGateway getPushGateway(AssertableApplicationContext context) {
    assertThat(context).hasSingleBean(PrometheusPushGatewayManager.class);
    PrometheusPushGatewayManager gatewayManager = context.getBean(PrometheusPushGatewayManager.class);
    return (PushGateway) ReflectionTestUtils.getField(gatewayManager, "pushGateway");
}
Also used : PushGateway(io.prometheus.client.exporter.PushGateway) PrometheusPushGatewayManager(org.springframework.boot.actuate.metrics.export.prometheus.PrometheusPushGatewayManager)

Aggregations

PushGateway (io.prometheus.client.exporter.PushGateway)1 PrometheusPushGatewayManager (org.springframework.boot.actuate.metrics.export.prometheus.PrometheusPushGatewayManager)1