camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Brown <gbr...@redhat.com>
Subject Re: CamelOpenTracing broken since 2.19.1 ?
Date Mon, 03 Jul 2017 15:34:51 GMT
Hi

Unfortunately there was a breaking API change between OpenTracing 0.22 and
0.30, and there is currently no released version of brave-opentracing that
supports the OpenTracing 0.30.0 API. There is a PR in progress:
https://github.com/openzipkin/brave-opentracing/pull/43

Regards
Gary


On Mon, Jul 3, 2017 at 4:25 PM, labo <joerg@larbig.net> wrote:

> I Have a Spring Boot application annotated with @CamelOpenTracing to trace
> my camel routes and brave-opentracing to forward it to zipkin.
>
> I added a Trace Bean
>
> @Bean(name = "testGroupTracer")
> public io.opentracing.Tracer initTracer() {
>         Reporter reporter =
> AsyncReporter.builder(URLConnectionSender.create("ht
> tp://localhost:9411/api/v1/spans")).build();
>         Tracing crimsGroupTracer =
> Tracing.newBuilder().localServiceName("testGroupTracer").reporter(
> reporter).build();
>         return BraveTracer.create(crimsGroupTracer);
> }
>
> I configured my Camel Context
>
> @Resource(name="testGroupTracer")
> Tracer tracer;
>
>
> @Bean
> CamelContextConfiguration nameConfiguration() {
>         return new CamelContextConfiguration() {
>                 @Override
>                 public void beforeApplicationStart(CamelContext
> camelContext) {
>                         OpenTracingTracer ottracer = new
> OpenTracingTracer();
>                         ottracer.setTracer(tracer);
>                         SpringCamelContext springCamelContext =
> (SpringCamelContext) camelContext;
>
>                         .... do some other actions like add datasources to
> registry etc......
>
>
>
> With Camel 2.19.0 everything works fine.
>
> <dependency>
>                 <groupId>org.apache.camel</groupId>
>                 <artifactId>camel-opentracing-starter</artifactId>
>                 <version>2.19.0</version>
>         </dependency>
>         <dependency>
>                 <groupId>io.opentracing.brave</groupId>
>                 <artifactId>brave-opentracing</artifactId>
>                 <version>0.20.0</version>
>         </dependency>
>         <dependency>
>                 <groupId>io.zipkin.reporter</groupId>
>                 <artifactId>zipkin-sender-urlconnection</artifactId>
>                 <version>0.10.0</version>
>         </dependency>
>
>
> After upgrade the Camel version to 2.19.10
>
> Error starting ApplicationContext. To display the auto-configuration report
> re-run your application with 'debug' enabled.
> 2017-06-29 11:50:46.082 ERROR 13168 --- [           main]
> o.s.boot.SpringApplication               : Application startup failed
>
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean
> with name 'openTracingEventNotifier' defined in
> org.apache.camel.opentracing.starter.OpenTracingAutoConfiguration
> .....
> ....
> Caused by: org.springframework.beans.BeanInstantiationException: Failed to
> instantiate [org.apache.camel.opentracing.OpenTracingTracer]: Factory
> method
> 'openTracingEventNotifier' threw exception; n
>         at
> org.springframework.beans.factory.support.SimpleInstantiationStrategy.
> instantiate(SimpleInstantiationStrategy.java:189)
> ~[spring-beans-4.3.8.RELEASE.jar:4.3.8.RELEASE]
>         at
> org.springframework.beans.factory.support.ConstructorResolver.
> instantiateUsingFactoryMethod(ConstructorResolver.java:588)
> ~[spring-beans-4.3.8.RELEASE.jar:4.3.8.RELEASE]
>         ... 24 common frames omitted
> Caused by: java.lang.NoClassDefFoundError: io/opentracing/BaseSpan
>         at
> org.apache.camel.opentracing.OpenTracingTracer.<init>(
> OpenTracingTracer.java:71)
> ~[camel-opentracing-2.19.1.jar:2.19.1]
>         at
> org.apache.camel.opentracing.starter.OpenTracingAutoConfiguration.
> openTracingEventNotifier(OpenTracingAutoConfiguration.java:43)
> ~[camel-opentracing-starter-2.19.1.jar:2.19.1]
>         at
> org.apache.camel.opentracing.starter.OpenTracingAutoConfiguration$$
> EnhancerBySpringCGLIB$$61400bb0.CGLIB$openTracingEventNotifier$0(<
> generated>)
> ~[camel-opentracing-starter-2.19.1.jar:2.
>         at
> org.apache.camel.opentracing.starter.OpenTracingAutoConfiguration$$
> EnhancerBySpringCGLIB$$61400bb0$$FastClassBySpringCGLIB$$
> 3045287e.invoke(<generated>)
> ~[camel-opentracing-starter-2.19.
>         at
> org.springframework.cglib.proxy.MethodProxy.invokeSuper(
> MethodProxy.java:228)
> ~[spring-core-4.3.8.RELEASE.jar:4.3.8.RELEASE]
>         at
> org.springframework.context.annotation.ConfigurationClassEnhancer$
> BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358)
> ~[spring-context-4.3.8.RELEASE.jar:4.3.8.RELEASE]
>         at
> org.apache.camel.opentracing.starter.OpenTracingAutoConfiguration$$
> EnhancerBySpringCGLIB$$61400bb0.openTracingEventNotifier(<generated>)
> ~[camel-opentracing-starter-2.19.1.jar:2.19.1]
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> ~[na:1.8.0_40]
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> 62)
> ~[na:1.8.0_40]
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
> ~[na:1.8.0_40]
>         at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_40]
>         at
> org.springframework.beans.factory.support.SimpleInstantiationStrategy.
> instantiate(SimpleInstantiationStrategy.java:162)
> ~[spring-beans-4.3.8.RELEASE.jar:4.3.8.RELEASE]
>         ... 25 common frames omitted
> Caused by: java.lang.ClassNotFoundException: io.opentracing.BaseSpan
>
>
> Adding the OpenTracing-Java 0.30.0 jar introduced with
> https://issues.apache.org/jira/browse/CAMEL-11381 to my maven pom leads
> to
>
>
> 2017-06-29 11:57:07.353  WARN 15176 --- [umers:acsddata]]
> o.a.camel.opentracing.OpenTracingTracer  : OpenTracing: Failed to capture
> tracing data
>
> java.lang.AbstractMethodError:
> brave.opentracing.BraveSpan.setTag(Ljava/lang/String;
> Ljava/lang/String;)Lio/opentracing/BaseSpan;
>         at
> org.apache.camel.opentracing.decorators.AbstractSpanDecorator.pre(
> AbstractSpanDecorator.java:72)
> ~[camel-opentracing-2.19.1.jar:2.19.1]
>         at
> org.apache.camel.opentracing.OpenTracingTracer$OpenTracingRoutePolicy.
> onExchangeBegin(OpenTracingTracer.java:256)
> ~[camel-opentracing-2.19.1.jar:2.19.1]
>         at
> org.apache.camel.processor.CamelInternalProcessor$
> RoutePolicyAdvice.before(CamelInternalProcessor.java:491)
> [camel-core-2.19.1.jar:2.19.1]
>         at
> org.apache.camel.processor.CamelInternalProcessor.process(
> CamelInternalProcessor.java:146)
> [camel-core-2.19.1.jar:2.19.1]
>         at
> org.apache.camel.processor.DelegateAsyncProcessor.process(
> DelegateAsyncProcessor.java:97)
> [camel-core-2.19.1.jar:2.19.1]
>         at
> org.apache.camel.component.jms.EndpointMessageListener.onMessage(
> EndpointMessageListener.java:112)
> [camel-jms-2.19.1.jar:2.19.1]
>         at
> org.springframework.jms.listener.AbstractMessageListenerContain
> er.doInvokeListener(AbstractMessageListenerContainer.java:721)
> [spring-jms-4.3.8.RELEASE.jar:4.3.8.RELEASE]
>         at
> org.springframework.jms.listener.AbstractMessageListenerContain
> er.invokeListener(AbstractMessageListenerContainer.java:681)
> [spring-jms-4.3.8.RELEASE.jar:4.3.8.RELEASE]
>         at
> org.springframework.jms.listener.AbstractMessageListenerContain
> er.doExecuteListener(AbstractMessageListenerContainer.java:651)
> [spring-jms-4.3.8.RELEASE.jar:4.3.8.RELEASE]
>         at
> org.springframework.jms.listener.AbstractPollingMessageListener
> Container.doReceiveAndExecute(AbstractPollingMessageListener
> Container.java:317)
> [spring-jms-4.3.8.RELEASE.jar:4.3.8.RELEASE]
>         at
> org.springframework.jms.listener.AbstractPollingMessageListener
> Container.receiveAndExecute(AbstractPollingMessageListener
> Container.java:235)
> [spring-jms-4.3.8.RELEASE.jar:4.3.8.RELEASE]
>         at
> org.springframework.jms.listener.DefaultMessageListenerContaine
> r$AsyncMessageListenerInvoker.invokeListener(
> DefaultMessageListenerContainer.java:1166)
> [spring-jms-4.3.8.RELEASE.jar:4.3.8.RELEASE]
>         at
> org.springframework.jms.listener.DefaultMessageListenerContaine
> r$AsyncMessageListenerInvoker.executeOngoingLoop(
> DefaultMessageListenerContainer.java:1158)
> [spring-jms-4.3.8.RELEASE.jar:4.3.8.RELEASE]
>         at
> org.springframework.jms.listener.DefaultMessageListenerContaine
> r$AsyncMessageListenerInvoker.run(DefaultMessageListenerContaine
> r.java:1055)
> [spring-jms-4.3.8.RELEASE.jar:4.3.8.RELEASE]
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(
> ThreadPoolExecutor.java:1142)
> [na:1.8.0_40]
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java:617)
> [na:1.8.0_40]
>         at java.lang.Thread.run(Thread.java:745) [na:1.8.0_40]
>
> ......
> .....
> 2017-06-29 11:57:07.363  WARN 15176 --- [umers:acsddata]]
> o.a.camel.opentracing.OpenTracingTracer  : OpenTracing: Failed to capture
> tracing data
>
> java.lang.NoSuchFieldError: SAMPLING_PRIORITY
>         at
> brave.opentracing.BraveSpanBuilder.start(BraveSpanBuilder.java:119)
> ~[brave-opentracing-0.20.0.jar:na]
>         at
> brave.opentracing.BraveSpanBuilder.start(BraveSpanBuilder.java:37)
> ~[brave-opentracing-0.20.0.jar:na]
>         at
> org.apache.camel.opentracing.OpenTracingTracer$OpenTracingEventNotifier.
> notify(OpenTracingTracer.java:197)
> ~[camel-opentracing-2.19.1.jar:2.19.1]
>         at
> org.apache.camel.util.EventHelper.doNotifyEvent(EventHelper.java:805)
> [camel-core-2.19.1.jar:2.19.1]
>         at
> org.apache.camel.util.EventHelper.notifyExchangeSending(
> EventHelper.java:611)
> [camel-core-2.19.1.jar:2.19.1]
>         at
> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:140)
> [camel-core-2.19.1.jar:2.19.1]
>         at
> org.apache.camel.management.InstrumentationProcessor.process(
> InstrumentationProcessor.java:77)
> [camel-core-2.19.1.jar:2.19.1]
>         at
> org.apache.camel.processor.RedeliveryErrorHandler.process(
> RedeliveryErrorHandler.java:541)
> [camel-core-2.19.1.jar:2.19.1]
>         at
> org.apache.camel.processor.RedeliveryErrorHandler.process(
> RedeliveryErrorHandler.java:399)
> [camel-core-2.19.1.jar:2.19.1]
>         at
> org.apache.camel.processor.CamelInternalProcessor.process(
> CamelInternalProcessor.java:173)
> [camel-core-2.19.1.jar:2.19.1]
>         at org.apache.camel.processor.Pipeline.process(Pipeline.java:120)
> [camel-core-2.19.1.jar:2.19.1]
>         at org.apache.camel.processor.Pipeline.process(Pipeline.java:83)
> [camel-core-2.19.1.jar:2.19.1]
>         at
> org.apache.camel.processor.RedeliveryErrorHandler.process(
> RedeliveryErrorHandler.java:541)
> [camel-core-2.19.1.jar:2.19.1]
>         at
> org.apache.camel.spring.spi.TransactionErrorHandler.processByErrorHandler(
> TransactionErrorHandler.java:220)
> [camel-spring-2.19.1.jar:2.19.1]
>         at
> org.apache.camel.spring.spi.TransactionErrorHandler$1.
> doInTransactionWithoutResult(TransactionErrorHandler.java:183)
> [camel-spring-2.19.1.jar:2.19.1]
>         at
> org.springframework.transaction.support.TransactionCallbackWithoutResu
> lt.doInTransaction(TransactionCallbackWithoutResult.java:34)
> [spring-tx-4.3.8.RELEASE.jar:4.3.8.RELEASE]
>         at
> org.springframework.transaction.support.TransactionTemplate.execute(
> TransactionTemplate.java:133)
> [spring-tx-4.3.8.RELEASE.jar:4.3.8.RELEASE]
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.
> com/CamelOpenTracing-broken-since-2-19-1-tp5805709.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message