Class OpenTelemetryVertxMetricsFactory

java.lang.Object
io.quarkus.opentelemetry.runtime.tracing.intrumentation.vertx.OpenTelemetryVertxMetricsFactory
All Implemented Interfaces:
io.vertx.core.spi.VertxMetricsFactory, io.vertx.core.spi.VertxServiceProvider

public class OpenTelemetryVertxMetricsFactory 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 OpenTelemetryVertxMetricsFactory if the VertxHttpServerMetrics is not available in the runtime.
  • Constructor Details

    • OpenTelemetryVertxMetricsFactory

      public OpenTelemetryVertxMetricsFactory()
  • Method Details

    • metrics

      public io.vertx.core.spi.metrics.VertxMetrics metrics(io.vertx.core.VertxOptions options)
      Specified by:
      metrics in interface io.vertx.core.spi.VertxMetricsFactory