{"record":{"id":"42e6eb04a70ea10d","repo":"quarkusio/quarkus","slug":"opentelemetrycontextunwrapper-was-not-found","errorCode":null,"errorMessage":"OpenTelemetryContextUnwrapper was not found","messagePattern":"OpenTelemetryContextUnwrapper was not found","errorType":"exception","errorClass":"VertxException","httpStatus":null,"severity":"error","filePath":"extensions/micrometer/runtime/src/main/java/io/quarkus/micrometer/runtime/binder/vertx/VertxMeterBinderAdapter.java","lineNumber":75,"sourceCode":"\n    @Override\n    public VertxMetrics metrics(VertxOptions vertxOptions) {\n        return this;\n    }\n\n    @Override\n    public MetricsOptions newOptions() {\n        return this;\n    }\n\n    @Override\n    public HttpServerMetrics<?, ?> createHttpServerMetrics(final HttpServerConfig options,\n            final SocketAddress tcpLocalAddress, final SocketAddress localAddress) {\n        if (httpBinderConfiguration == null) {\n            throw new VertxException(\"HttpBinderConfiguration was not found\");\n        }\n        if (openTelemetryContextUnwrapper == null) {\n            throw new VertxException(\"OpenTelemetryContextUnwrapper was not found\");\n        }\n        if (httpBinderConfiguration.isServerEnabled()) {\n            log.debugf(\"Create HttpServerMetrics with options %s and address %s\", options, localAddress);\n            return new VertxHttpServerMetrics(Metrics.globalRegistry, httpBinderConfiguration, openTelemetryContextUnwrapper,\n                    options, longAdderGauges);\n        }\n        return null;\n    }\n\n    @Override\n    public HttpClientMetrics<?, ?> createHttpClientMetrics(HttpClientConfig config) {\n        if (httpBinderConfiguration == null) {\n            return null;\n        }\n        if (httpBinderConfiguration.isClientEnabled()) {\n            String metricsName = config.getObservabilityConfig() != null\n                    ? config.getObservabilityConfig().getMetricsName()\n                    : null;","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/micrometer/runtime/src/main/java/io/quarkus/micrometer/runtime/binder/vertx/VertxMeterBinderAdapter.java#L57-L93","documentation":"Vert.x 4.5+ passes an OpenTelemetryContextUnwrapper to createHttpServerMetrics so HTTP server metrics can bridge into OpenTelemetry context. VertxMeterBinderAdapter requires this collaborator whenever it builds VertxHttpServerMetrics; if it is null (the OpenTelemetry bridge class/bean not available) the adapter throws VertxException instead of creating metrics without OTel support.","triggerScenarios":"Vert.x starts an HTTP server and invokes createHttpServerMetrics while openTelemetryContextUnwrapper was never set — typically because the OpenTelemetry context propagating classes are not on the classpath (opentelemetry extension absent) or the field was not initialized when the adapter was constructed manually.","commonSituations":"Using quarkus-micrometer without quarkus-opentelemetry where the adapter still expects the unwrapper; partial manual wiring in tests; version skew between vertx-core (which calls the new API) and the micrometer adapter built for an older Vert.x.","solutions":["Add quarkus-opentelemetry (and quarkus-micrometer-opentelemetry if applicable) so the OpenTelemetryContextUnwrapper is available and injected","Align vertx-core and quarkus-micrometer versions via the Quarkus BOM so the adapter and Vert.x agree on this API","If constructing the adapter manually (tests), pass/set a non-null OpenTelemetryContextUnwrapper instance before creating HTTP server metrics","If OTel is not wanted, use a no-op unwrapper implementation to satisfy the contract"],"exampleFix":"// before\n<dependency>\n  <groupId>io.quarkus</groupId>\n  <artifactId>quarkus-micrometer</artifactId>\n</dependency>\n<!-- OTel unwrapper missing -> VertxException -->\n\n// after\n<dependency>\n  <groupId>io.quarkus</groupId>\n  <artifactId>quarkus-micrometer</artifactId>\n</dependency>\n<dependency>\n  <groupId>io.quarkus</groupId>\n  <artifactId>quarkus-opentelemetry</artifactId>\n</dependency>","handlingStrategy":"validation","validationCode":"if (adapter.openTelemetryContextUnwrapper == null) {\n    throw new IllegalStateException(\"Add quarkus-opentelemetry or provide an OpenTelemetryContextUnwrapper\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    return adapter.createHttpServerMetrics(options, tcpAddr, localAddr);\n} catch (VertxException e) {\n    if (e.getMessage().contains(\"OpenTelemetryContextUnwrapper\")) {\n        log.error(\"OpenTelemetry bridge missing; add quarkus-opentelemetry\");\n    }\n    throw e;\n}","preventionTips":["Add quarkus-opentelemetry whenever vertx metrics are combined with micrometer in modern Vert.x versions","Keep vertx-core and quarkus-micrometer aligned via the Quarkus BOM","In tests, supply a no-op OpenTelemetryContextUnwrapper when constructing the adapter"],"tags":["quarkus","micrometer","vertx","opentelemetry","null-dependency"],"backgroundTag":"missing-metrics-binder-configuration","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}