You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "jamesnetherton (via GitHub)" <gi...@apache.org> on 2024/10/15 14:07:01 UTC
[I] [camel-main] Camel OpenTelemetry not compatible with Quarkus OpenTelemetry [camel-quarkus]
jamesnetherton opened a new issue, #6642:
URL: https://github.com/apache/camel-quarkus/issues/6642
### 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`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Camel OpenTelemetry not compatible with Quarkus OpenTelemetry [camel-quarkus]
Posted by "Exether (via GitHub)" <gi...@apache.org>.
Exether commented on issue #6642:
URL: https://github.com/apache/camel-quarkus/issues/6642#issuecomment-2687984489
As an Camel-k users we are using OpenTelemetry and while studying the migration to Camel-k 2.6.0 we encountered this issue. We will probably fall back to migrate to Camel-k 2.4.0 (Camel 4.4.1) but of course we want to show our interest in this fix.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Camel OpenTelemetry not compatible with Quarkus OpenTelemetry [camel-quarkus]
Posted by "jamesnetherton (via GitHub)" <gi...@apache.org>.
jamesnetherton commented on issue #6642:
URL: https://github.com/apache/camel-quarkus/issues/6642#issuecomment-2667892129
> Is a new patch release planned anytime soon for 3.15 by any chance?
It depends when Camel 4.8.4 is released. But our window to get changes into the Quarkus Platform for the Quarkus 3.15.4 release will likely be closed by then. Which unfortunately means waiting until 3.15.5 in may.
The alternative would be to release CQ 3.15.3 ASAP without Camel 4.8.4.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Camel OpenTelemetry not compatible with Quarkus OpenTelemetry [camel-quarkus]
Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on issue #6642:
URL: https://github.com/apache/camel-quarkus/issues/6642#issuecomment-2667913630
Thanks for letting me know. I don't have any rush, I wanted to know which are the plan in order to communicate to any interested user. If somebody has some strong needed to have this pushed I will let you know.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Camel OpenTelemetry not compatible with Quarkus OpenTelemetry [camel-quarkus]
Posted by "jamesnetherton (via GitHub)" <gi...@apache.org>.
jamesnetherton commented on issue #6642:
URL: https://github.com/apache/camel-quarkus/issues/6642#issuecomment-2642261702
You'll need to provide some more details about your app. The version of Quarkus used etc.
I just went to code.quarkus.io, generated a app with `camel-quarkus-opentelemetry` and it launches fine.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Camel OpenTelemetry not compatible with Quarkus OpenTelemetry [camel-quarkus]
Posted by "jamesnetherton (via GitHub)" <gi...@apache.org>.
jamesnetherton commented on issue #6642:
URL: https://github.com/apache/camel-quarkus/issues/6642#issuecomment-2642200099
> Any news on this bug, please ?
There is a workaround in place so everything should be working as per normal.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Camel OpenTelemetry not compatible with Quarkus OpenTelemetry [camel-quarkus]
Posted by "costelus27 (via GitHub)" <gi...@apache.org>.
costelus27 commented on issue #6642:
URL: https://github.com/apache/camel-quarkus/issues/6642#issuecomment-2642195972
Any news on this bug, please ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Camel OpenTelemetry not compatible with Quarkus OpenTelemetry [camel-quarkus]
Posted by "jamesnetherton (via GitHub)" <gi...@apache.org>.
jamesnetherton closed issue #6642: Camel OpenTelemetry not compatible with Quarkus OpenTelemetry
URL: https://github.com/apache/camel-quarkus/issues/6642
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Camel OpenTelemetry not compatible with Quarkus OpenTelemetry [camel-quarkus]
Posted by "jamesnetherton (via GitHub)" <gi...@apache.org>.
jamesnetherton commented on issue #6642:
URL: https://github.com/apache/camel-quarkus/issues/6642#issuecomment-2667807947
https://github.com/apache/camel-quarkus/pull/7025 should fix it for all cases.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Camel OpenTelemetry not compatible with Quarkus OpenTelemetry [camel-quarkus]
Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on issue #6642:
URL: https://github.com/apache/camel-quarkus/issues/6642#issuecomment-2667868002
Thanks for taking care. Is a new patch release planned anytime soon for 3.15 by any chance?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Camel OpenTelemetry not compatible with Quarkus OpenTelemetry [camel-quarkus]
Posted by "costelus27 (via GitHub)" <gi...@apache.org>.
costelus27 commented on issue #6642:
URL: https://github.com/apache/camel-quarkus/issues/6642#issuecomment-2642244908
Hmm.. then it's weird. When I add this dependency to my code, I get this exception:
```
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:1931)
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.impl.engine.AbstractCamelContext.<init>(AbstractCamelContext.java:332)
at org.apache.camel.impl.engine.SimpleCamelContext.<init>(SimpleCamelContext.java:128)
at org.apache.camel.impl.DefaultCamelContext.<init>(DefaultCamelContext.java:139)
at org.apache.camel.impl.DefaultCamelContext.<init>(DefaultCamelContext.java:115)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Camel OpenTelemetry not compatible with Quarkus OpenTelemetry [camel-quarkus]
Posted by "jamesnetherton (via GitHub)" <gi...@apache.org>.
jamesnetherton commented on issue #6642:
URL: https://github.com/apache/camel-quarkus/issues/6642#issuecomment-2666945368
@squakez Ah, that's unfortunate. The `kamelet` extension is a bit of a special case because in CQ < 3.18.x it instantiates a `CamelContext` at build time and it won't automatically pick up the workaround that I added.
I need to see if we can suppress the loading of the problem otel `ThreadPoolFactory` [here](https://github.com/apache/camel-quarkus/commit/39f0e08833a8a1531d092e60e38799c4da55946d). Or maybe backport the [refactoring](https://github.com/apache/camel-quarkus/commit/39f0e08833a8a1531d092e60e38799c4da55946d) that I did for that extension, but it's maybe a bit risky to do that in an LTS stream.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Camel OpenTelemetry not compatible with Quarkus OpenTelemetry [camel-quarkus]
Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on issue #6642:
URL: https://github.com/apache/camel-quarkus/issues/6642#issuecomment-2666202403
Hi @jamesnetherton I was reported something similar and indeed it seems we have a problem when we use the opentelemetry dependency in conjunction with other dependencies (in my case, kamelet dependency). I get this error:
```
$ camel run test.yaml --dep camel-opentelemetry --dep camel-kamelet --runtime quarkus --quarkus-version 3.15.2
Running using Quarkus v3.15.2 (preparing and downloading files)
[ERROR] Failed to execute goal io.quarkus.platform:quarkus-maven-plugin:3.15.2:build (default) on project CamelJBang: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR] [error]: Build step org.apache.camel.quarkus.component.kamelet.deployment.KameletProcessor#loadResources threw an exception: java.lang.NoSuchMethodError: 'java.util.concurrent.ScheduledExecutorService io.opentelemetry.context.Context.taskWrapping(java.util.concurrent.ScheduledExecutorService)'
[ERROR] at org.apache.camel.opentelemetry.OpenTelemetryInstrumentedThreadPoolFactory.newScheduledThreadPool(OpenTelemetryInstrumentedThreadPoolFactory.java:66)
[ERROR] at org.apache.camel.impl.engine.BaseExecutorServiceManager.newScheduledThreadPool(BaseExecutorServiceManager.java:263)
[ERROR] at org.apache.camel.impl.engine.DefaultExecutorServiceManager.newScheduledThreadPool(DefaultExecutorServiceManager.java:49)
[ERROR] at org.apache.camel.impl.engine.BaseExecutorServiceManager.newDefaultScheduledThreadPool(BaseExecutorServiceManager.java:181)
[ERROR] at org.apache.camel.impl.engine.AbstractCamelContext.createErrorHandlerExecutorService(AbstractCamelContext.java:1931)
[ERROR] at org.apache.camel.impl.engine.SimpleCamelContext.doBuild(SimpleCamelContext.java:141)
[ERROR] at org.apache.camel.support.service.BaseService.build(BaseService.java:64)
[ERROR] at org.apache.camel.impl.engine.AbstractCamelContext.<init>(AbstractCamelContext.java:332)
[ERROR] at org.apache.camel.impl.engine.SimpleCamelContext.<init>(SimpleCamelContext.java:128)
[ERROR] at org.apache.camel.impl.DefaultCamelContext.<init>(DefaultCamelContext.java:139)
[ERROR] at org.apache.camel.impl.DefaultCamelContext.<init>(DefaultCamelContext.java:115)
[ERROR] at org.apache.camel.quarkus.component.kamelet.deployment.KameletProcessor.loadResources(KameletProcessor.java:80)
[ERROR] at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:732)
[ERROR] at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:856)
[ERROR] at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
[ERROR] at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2516)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2495)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1521)
[ERROR] at java.base/java.lang.Thread.run(Thread.java:833)
[ERROR] at org.jboss.threads.JBossThread.run(JBossThread.java:483)
```
Mind that this is happening on the given specific Quarkus platform version (>= 3.15.2 and < 3.18.1). Would not be convenient if we have any fix on those LTS versions affected as well?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org