diff --git a/extensions/micrometer/runtime/src/main/java/io/quarkus/micrometer/runtime/binder/vertx/VertxHttpServerMetrics.java b/extensions/micrometer/runtime/src/main/java/io/quarkus/micrometer/runtime/binder/vertx/VertxHttpServerMetrics.java index 8714275850068..81d01bbca82a1 100644 --- a/extensions/micrometer/runtime/src/main/java/io/quarkus/micrometer/runtime/binder/vertx/VertxHttpServerMetrics.java +++ b/extensions/micrometer/runtime/src/main/java/io/quarkus/micrometer/runtime/binder/vertx/VertxHttpServerMetrics.java @@ -22,6 +22,7 @@ import io.quarkus.micrometer.runtime.binder.HttpCommonTags; import io.quarkus.micrometer.runtime.export.exemplars.OpenTelemetryContextUnwrapper; import io.vertx.core.http.HttpMethod; +import io.vertx.core.http.HttpServerOptions; import io.vertx.core.http.HttpServerRequest; import io.vertx.core.http.ServerWebSocket; import io.vertx.core.spi.metrics.HttpServerMetrics; @@ -53,13 +54,14 @@ public class VertxHttpServerMetrics extends VertxTcpServerMetrics VertxHttpServerMetrics(MeterRegistry registry, HttpBinderConfiguration config, - OpenTelemetryContextUnwrapper openTelemetryContextUnwrapper) { + OpenTelemetryContextUnwrapper openTelemetryContextUnwrapper, HttpServerOptions httpServerOptions) { super(registry, "http.server", null); this.config = config; this.openTelemetryContextUnwrapper = openTelemetryContextUnwrapper; activeRequests = new LongAdder(); Gauge.builder(config.getHttpServerActiveRequestsName(), activeRequests, LongAdder::doubleValue) + .tag("url.scheme", httpServerOptions.isSsl() ? "https" : "http") .register(registry); httpServerMetricsTagsContributors = resolveHttpServerMetricsTagsContributors(); diff --git a/extensions/micrometer/runtime/src/main/java/io/quarkus/micrometer/runtime/binder/vertx/VertxMeterBinderAdapter.java b/extensions/micrometer/runtime/src/main/java/io/quarkus/micrometer/runtime/binder/vertx/VertxMeterBinderAdapter.java index 6b9b7625de565..e33b212c1172b 100644 --- a/extensions/micrometer/runtime/src/main/java/io/quarkus/micrometer/runtime/binder/vertx/VertxMeterBinderAdapter.java +++ b/extensions/micrometer/runtime/src/main/java/io/quarkus/micrometer/runtime/binder/vertx/VertxMeterBinderAdapter.java @@ -79,7 +79,8 @@ public MetricsOptions newOptions() { } if (httpBinderConfiguration.isServerEnabled()) { log.debugf("Create HttpServerMetrics with options %s and address %s", options, localAddress); - return new VertxHttpServerMetrics(Metrics.globalRegistry, httpBinderConfiguration, openTelemetryContextUnwrapper); + return new VertxHttpServerMetrics(Metrics.globalRegistry, httpBinderConfiguration, openTelemetryContextUnwrapper, + options); } return null; }