@Override public final VertxMetrics metrics(@Nonnull final Vertx vertx, @Nonnull final VertxOptions options) { final MetricsOptions metricsOptions = options.getMetricsOptions(); final StatfulMetricsOptions statfulMetricsOptions; if (metricsOptions instanceof StatfulMetricsOptions) { statfulMetricsOptions = (StatfulMetricsOptions) metricsOptions; } else { statfulMetricsOptions = new StatfulMetricsOptions(); } // check if there is a configuration path set, if so, load configuration from file final StatfulMetricsOptions effective; String configPath = statfulMetricsOptions.getConfigPath(); if (Strings.isNullOrEmpty(configPath)) { effective = statfulMetricsOptions; } else { effective = buildFromFile(vertx, configPath); } return new VertxMetricsImpl(vertx, effective); }
@Override public VertxMetrics metrics(Vertx vertx, VertxOptions options) { MetricsOptions metricsOptions = options.getMetricsOptions(); VertxWarp10Options vertxWarp10Options; if (metricsOptions instanceof VertxWarp10Options) { vertxWarp10Options = (VertxWarp10Options) metricsOptions; } else { vertxWarp10Options = new VertxWarp10Options(metricsOptions.toJson()); } return new VertxMetricsImpl(vertx, vertxWarp10Options); }
@Override public VertxMetrics metrics(Vertx vertx, VertxOptions vertxOptions) { MetricsOptions metricsOptions = vertxOptions.getMetricsOptions(); VertxHawkularOptions vertxHawkularOptions; if (metricsOptions instanceof VertxHawkularOptions) { vertxHawkularOptions = (VertxHawkularOptions) metricsOptions; } else { vertxHawkularOptions = new VertxHawkularOptions(metricsOptions.toJson()); } return new VertxMetricsImpl(vertx, vertxHawkularOptions); }
@Override public VertxMetrics metrics(Vertx vertx, VertxOptions options) { dispatch("vertxStarted", listener -> listener.vertxStarted(vertx, options)); return new ListenerAwareVertxMetrics(vertx); }
public DispatchingVertxMetrics(List<? extends VertxMetrics> delegates) { super(delegates); }
@Override public VertxMetrics metrics(Vertx vertx, VertxOptions options) { return new VertxMetricsImpl(counterService, gaugeService, properties); }
@Override public @NotNull VertxMetrics metrics(@NotNull Vertx vertx, @NotNull VertxOptions vertxOptions) { return new VertxPrometheusMetrics(vertx, asPrometheusOptions(vertxOptions)); }