Skip to content

Camel OpenTelemetry not compatible with Quarkus OpenTelemetry #6642

@jamesnetherton

Description

@jamesnetherton

Bug description

Camel now uses some OTel APIs that were only recently added in 1.43.0. Since Quarkus is still aligned with 1.42.0, building an app with the opentelemetry fails at build time.

Caused by: java.lang.NoSuchMethodError: 'java.util.concurrent.ScheduledExecutorService io.opentelemetry.context.Context.taskWrapping(java.util.concurrent.ScheduledExecutorService)'
	at org.apache.camel.opentelemetry.OpenTelemetryInstrumentedThreadPoolFactory.newScheduledThreadPool(OpenTelemetryInstrumentedThreadPoolFactory.java:66)
	at org.apache.camel.impl.engine.BaseExecutorServiceManager.newScheduledThreadPool(BaseExecutorServiceManager.java:263)
	at org.apache.camel.impl.engine.DefaultExecutorServiceManager.newScheduledThreadPool(DefaultExecutorServiceManager.java:49)
	at org.apache.camel.impl.engine.BaseExecutorServiceManager.newDefaultScheduledThreadPool(BaseExecutorServiceManager.java:181)
	at org.apache.camel.impl.engine.AbstractCamelContext.createErrorHandlerExecutorService(AbstractCamelContext.java:1948)
	at org.apache.camel.impl.engine.SimpleCamelContext.doBuild(SimpleCamelContext.java:141)
	at org.apache.camel.support.service.BaseService.build(BaseService.java:64)
	at org.apache.camel.quarkus.core.FastCamelContext.build(FastCamelContext.java:70)
	at org.apache.camel.quarkus.core.CamelContextRecorder.createContext(CamelContextRecorder.java:86)

The simplest fix until Quarkus upgrades to OTel 1.43.x is to disable discovery of the custom ThreadPoolFactory.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions