Search in sources :

Example 1 with BackendRegistry

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);
}
Also used : BackendRegistry(io.vertx.micrometer.backends.BackendRegistry) MicrometerMetricsOptions(io.vertx.micrometer.MicrometerMetricsOptions) MetricsOptions(io.vertx.core.metrics.MetricsOptions) MicrometerMetricsOptions(io.vertx.micrometer.MicrometerMetricsOptions)

Aggregations

MetricsOptions (io.vertx.core.metrics.MetricsOptions)1 MicrometerMetricsOptions (io.vertx.micrometer.MicrometerMetricsOptions)1 BackendRegistry (io.vertx.micrometer.backends.BackendRegistry)1