use of io.vertx.micrometer.backends.BackendRegistry in project vertx-micrometer-metrics by vert-x3.
the class VertxMetricsFactoryImpl method metrics.
@Override
public VertxMetrics metrics(Vertx vertx, VertxOptions vertxOptions) {
MetricsOptions metricsOptions = vertxOptions.getMetricsOptions();
MicrometerMetricsOptions options;
if (metricsOptions instanceof MicrometerMetricsOptions) {
options = (MicrometerMetricsOptions) metricsOptions;
} else {
options = new MicrometerMetricsOptions(metricsOptions.toJson());
}
BackendRegistry backendRegistry = BackendRegistries.setupBackend(vertx, options);
return new VertxMetricsImpl(options, backendRegistry);
}
Aggregations