Search in sources :

Example 1 with MetricsService

use of io.vertx.micrometer.MetricsService in project vertx-micrometer-metrics by vert-x3.

the class MetricsExamples method createSnapshotFromPrefix.

public void createSnapshotFromPrefix() {
    MetricsService metricsService = MetricsService.create(vertx);
    // Client + server
    JsonObject metrics = metricsService.getMetricsSnapshot("vertx.http");
    System.out.println(metrics);
}
Also used : MetricsService(io.vertx.micrometer.MetricsService) JsonObject(io.vertx.core.json.JsonObject)

Example 2 with MetricsService

use of io.vertx.micrometer.MetricsService in project vertx-micrometer-metrics by vert-x3.

the class MetricsExamples method createFullSnapshot.

public void createFullSnapshot() {
    MetricsService metricsService = MetricsService.create(vertx);
    JsonObject metrics = metricsService.getMetricsSnapshot();
    System.out.println(metrics);
}
Also used : MetricsService(io.vertx.micrometer.MetricsService) JsonObject(io.vertx.core.json.JsonObject)

Example 3 with MetricsService

use of io.vertx.micrometer.MetricsService in project vertx-micrometer-metrics by vert-x3.

the class MetricsExamples method createPartialSnapshot.

public void createPartialSnapshot() {
    HttpServer server = vertx.createHttpServer();
    MetricsService metricsService = MetricsService.create(server);
    JsonObject metrics = metricsService.getMetricsSnapshot();
    System.out.println(metrics);
}
Also used : MetricsService(io.vertx.micrometer.MetricsService) HttpServer(io.vertx.core.http.HttpServer) JsonObject(io.vertx.core.json.JsonObject)

Aggregations

JsonObject (io.vertx.core.json.JsonObject)3 MetricsService (io.vertx.micrometer.MetricsService)3 HttpServer (io.vertx.core.http.HttpServer)1