use of io.vertx.micrometer.VertxPrometheusOptions in project vertx-micrometer-metrics by vert-x3.
the class PrometheusMetricsITest method shouldExcludeCategory.
@Test
public void shouldExcludeCategory(TestContext context) {
vertx = Vertx.vertx(new VertxOptions().setMetricsOptions(new MicrometerMetricsOptions().setPrometheusOptions(new VertxPrometheusOptions().setEnabled(true).setStartEmbeddedServer(true).setEmbeddedServerOptions(new HttpServerOptions().setPort(9090))).addDisabledMetricsCategory(MetricsDomain.HTTP_SERVER).setEnabled(true)));
Async async = context.async();
tryConnect(vertx, context, 9090, "localhost", "/metrics", body -> {
context.verify(v -> assertThat(body).contains("vertx_http_client_connections{local=\"?\",remote=\"localhost:9090\",} 1.0").doesNotContain("vertx_http_server_connections{local=\"0.0.0.0:9090\",remote=\"_\",} 1.0"));
async.complete();
}, 0);
async.awaitSuccess(10000);
}
Aggregations