Class OpenTelemetryVertxHttpMetricsFactory
java.lang.Object
io.quarkus.opentelemetry.runtime.tracing.instrumentation.vertx.OpenTelemetryVertxHttpMetricsFactory
- All Implemented Interfaces:
io.vertx.core.spi.VertxMetricsFactory,io.vertx.core.spi.VertxServiceProvider
public class OpenTelemetryVertxHttpMetricsFactory
extends Object
implements io.vertx.core.spi.VertxMetricsFactory
This is used to retrieve the route name from Vert.x. This is useful for OpenTelemetry to generate the Span name and
http.route attribute. Right now, there is no other way to retrieve the route name from Vert.x using the
Telemetry SPI, so we need to rely on the Metrics SPI.
Right now, it is not possible to register multiple VertxMetrics, meaning that only a single one is
available per Quarkus instance. To avoid clashing with other extensions that provide Metrics data (like the
Micrometer extension), we only register the OpenTelemetryVertxHttpMetricsFactory if the
VertxHttpServerMetrics is not available in the runtime.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.vertx.core.spi.metrics.VertxMetricsmetrics(io.vertx.core.VertxOptions options) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.vertx.core.spi.VertxMetricsFactory
init, newOptions, newOptions, newOptions
-
Constructor Details
-
OpenTelemetryVertxHttpMetricsFactory
public OpenTelemetryVertxHttpMetricsFactory()
-
-
Method Details
-
metrics
public io.vertx.core.spi.metrics.VertxMetrics metrics(io.vertx.core.VertxOptions options) - Specified by:
metricsin interfaceio.vertx.core.spi.VertxMetricsFactory
-