Vert.x - Metrics

Java Conceptuel Diagram


What are Application Metrics? ie Perfcounter, Performance Metrics, Operational data, Monitoring, telemetry in Vertx.

By default Vert.x does not record any metrics. Instead it provides an SPI for others to implement which can be added to the classpath.

The metrics SPI is an advanced feature which allows implementers to capture events from Vert.x in order to gather metrics.



VertxOptions vertxOptions = new VertxOptions()
Vertx vertx = Vertx.vertx(vertxOptions);


The configuration of the metrics should (can) be implemented in a custom launcher. See Vertx - Launcher extension (Custom launcher) for an example.



Vertx has a Metrics extension for dropwizard.

  • Initialize Dropwizard metric registry
String registryName = "registry";
MetricRegistry registry = SharedMetricRegistries.getOrCreate(registryName);
Slf4jReporter reporter = Slf4jReporter.forRegistry(registry)
reporter.start(1, TimeUnit.MINUTES);
  • Pass the registry to dropwizard
DropwizardMetricsOptions= new DropwizardMetricsOptions()


  • The API Documentation.

Discover More
Vertx Launcher Extension Custom Idea Run
Vertx - Launcher extension (Custom launcher)

The launcher has several io/vertx/core/Launcherlifecycle methods that you can override in order to add custom code that provide a way to configure the options: for the creation of a vertx or for the...

Share this page:
Follow us:
Task Runner