avioconsulting / mule-opentelemetry-module

Mule Extension to generate OpenTelemetry traces and metrics
https://avioconsulting.github.io/mule-opentelemetry-module/
BSD 2-Clause "Simplified" License
26 stars 8 forks source link

After installing new version of opentelemetry getting this error in my working flow #76

Closed Zubair199 closed 2 years ago

Zubair199 commented 2 years ago
INFO  2022-10-16 15:10:28,971 [[MuleRuntime].uber.15: [poc-datadog].uber@org.mule.runtime.module.extension.internal.runtime.source.ExtensionMessageSource.lambda$null$17:419 @183f91ee] [processor: ; event: ] org.mule.runtime.module.extension.internal.runtime.source.ExtensionMessageSource: Message source 'listener' on flow 'poc-datadogFlow' successfully reconnected
INFO  2022-10-16 15:14:55,669 [http.listener.11 SelectorRunner] [processor: ; event: ] com.avioconsulting.mule.opentelemetry.internal.connection.OpenTelemetryConnection: Initialising OpenTelemetry Mule 4 Agent for instrumentation mule-opentelemetry-module:1.1.0
INFO  2022-10-16 15:14:55,688 [http.listener.11 SelectorRunner] [processor: ; event: ] org.mule.runtime.core.internal.context.notification.Policy: NotificationListener com.avioconsulting.mule.opentelemetry.internal.listeners.MulePipelineMessageNotificationListener@6542dce6 was unable to fire notification PipelineMessageNotification{action=pipeline process start, resourceId=poc-datadogFlow, serverId=Zubair-Aslam..poc-datadog, timestamp=1665915295668} due to an exception: java.lang.NoSuchMethodError: io.opentelemetry.sdk.resources.ResourceBuilder.removeIf(Ljava/util/function/Predicate;)Lio/opentelemetry/sdk/resources/ResourceBuilder;.
INFO  2022-10-16 15:14:55,689 [[MuleRuntime].uber.15: [poc-datadog].poc-datadogFlow.CPU_LITE @257b8a19] [processor: poc-datadogFlow/processors/0; event: ] com.avioconsulting.mule.opentelemetry.internal.connection.OpenTelemetryConnection: Initialising OpenTelemetry Mule 4 Agent for instrumentation mule-opentelemetry-module:1.1.0
INFO  2022-10-16 15:14:55,690 [[MuleRuntime].uber.15: [poc-datadog].poc-datadogFlow.CPU_LITE @257b8a19] [processor: poc-datadogFlow/processors/0; event: ] org.mule.runtime.core.internal.context.notification.Policy: NotificationListener com.avioconsulting.mule.opentelemetry.internal.listeners.MuleMessageProcessorNotificationListener@795caae3 was unable to fire notification MessageProcessorNotification{action=message processor pre invoke, processor=poc-datadogFlow/processors/0, resourceId=poc-datadogFlow, serverId=Zubair-Aslam..poc-datadog, timestamp=1665915295688} due to an exception: java.lang.NoSuchMethodError: io.opentelemetry.sdk.resources.ResourceBuilder.removeIf(Ljava/util/function/Predicate;)Lio/opentelemetry/sdk/resources/ResourceBuilder;.
INFO  2022-10-16 15:14:55,690 [[MuleRuntime].uber.15: [poc-datadog].poc-datadogFlow.CPU_LITE @257b8a19] [processor: poc-datadogFlow/processors/0; event: ] com.avioconsulting.mule.opentelemetry.internal.connection.OpenTelemetryConnection: Initialising OpenTelemetry Mule 4 Agent for instrumentation mule-opentelemetry-module:1.1.0
ERROR 2022-10-16 15:14:55,691 [[MuleRuntime].uber.15: [poc-datadog].poc-datadogFlow.CPU_LITE @257b8a19] [processor: poc-datadogFlow/processors/0; event: ] org.mule.service.scheduler.internal.threads.SchedulerThreadPools: Thread '[MuleRuntime].uber.15: [poc-datadog].poc-datadogFlow.CPU_LITE @257b8a19' stopped.
java.lang.NoSuchMethodError: io.opentelemetry.sdk.resources.ResourceBuilder.removeIf(Ljava/util/function/Predicate;)Lio/opentelemetry/sdk/resources/ResourceBuilder;
    at io.opentelemetry.sdk.autoconfigure.ResourceConfiguration.filterAttributes(ResourceConfiguration.java:84) ~[?:?]
    at io.opentelemetry.sdk.autoconfigure.ResourceConfiguration.configureResource(ResourceConfiguration.java:59) ~[?:?]
    at io.opentelemetry.sdk.autoconfigure.AutoConfiguredOpenTelemetrySdkBuilder.build(AutoConfiguredOpenTelemetrySdkBuilder.java:331) ~[?:?]
    at com.avioconsulting.mule.opentelemetry.internal.connection.OpenTelemetryConnection.<init>(OpenTelemetryConnection.java:69) ~[?:?]
    at com.avioconsulting.mule.opentelemetry.internal.connection.OpenTelemetryConnection.getInstance(OpenTelemetryConnection.java:81) ~[?:?]
    at com.avioconsulting.mule.opentelemetry.internal.config.OpenTelemetryExtensionConfiguration.lambda$start$0(OpenTelemetryExtensionConfiguration.java:135) ~[?:?]
    at com.avioconsulting.mule.opentelemetry.internal.interceptor.ProcessorTracingInterceptor.before(ProcessorTracingInterceptor.java:53) ~[?:?]
    at org.mule.runtime.core.internal.processor.interceptor.ProcessorInterceptorWrapper.before(ProcessorInterceptorWrapper.java:60) ~[mule-core-4.4.0-20220722.jar:4.4.0-20220722]
    at org.mule.runtime.core.internal.processor.interceptor.ReactiveInterceptorAdapter.lambda$null$5(ReactiveInterceptorAdapter.java:159) ~[mule-core-4.4.0-20220722.jar:4.4.0-20220722]
    at org.mule.runtime.core.api.util.ExceptionUtils.tryExpecting(ExceptionUtils.java:265) ~[mule-core-4.4.0-20220722.jar:4.4.0-20220722]
    at org.mule.runtime.core.api.util.ClassUtils.withContextClassLoader(ClassUtils.java:1032) ~[mule-core-4.4.0-20220722.jar:4.4.0-20220722]
    at org.mule.runtime.core.api.util.ClassUtils.withContextClassLoader(ClassUtils.java:970) ~[mule-core-4.4.0-20220722.jar:4.4.0-20220722]
    at org.mule.runtime.core.internal.processor.interceptor.ReactiveInterceptorAdapter.lambda$doBefore$6(ReactiveInterceptorAdapter.java:159) ~[mule-core-4.4.0-20220722.jar:4.4.0-20220722]
    at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:107) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:121) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.Operators$ScalarSubscription.request(Operators.java:2205) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.request(FluxMapFuseable.java:162) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.request(FluxMapFuseable.java:162) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.request(FluxMapFuseable.java:162) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.request(FluxOnAssembly.java:448) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.FluxPeekFuseable$PeekFuseableSubscriber.request(FluxPeekFuseable.java:138) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.request(FluxHide.java:142) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.FluxHandleFuseable$HandleFuseableSubscriber.request(FluxHandleFuseable.java:245) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.request(FluxHide.java:142) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.FluxPeekFuseable$PeekFuseableConditionalSubscriber.request(FluxPeekFuseable.java:430) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.FluxContextStart$ContextStartSubscriber.request(FluxContextStart.java:132) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.MonoFlatMapMany$FlatMapManyMain.onSubscribeInner(MonoFlatMapMany.java:143) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.MonoFlatMapMany$FlatMapManyInner.onSubscribe(MonoFlatMapMany.java:237) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.FluxContextStart$ContextStartSubscriber.onSubscribe(FluxContextStart.java:97) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.FluxPeekFuseable$PeekFuseableConditionalSubscriber.onSubscribe(FluxPeekFuseable.java:464) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at org.mule.runtime.core.privileged.processor.chain.AbstractMessageProcessorChain$2.onSubscribe(AbstractMessageProcessorChain.java:511) ~[mule-core-4.4.0-20220722.jar:4.4.0-20220722]
    at reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onSubscribe(FluxHide.java:113) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.FluxHandleFuseable$HandleFuseableSubscriber.onSubscribe(FluxHandleFuseable.java:150) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at org.mule.runtime.core.privileged.processor.chain.AbstractMessageProcessorChain$2.onSubscribe(AbstractMessageProcessorChain.java:511) ~[mule-core-4.4.0-20220722.jar:4.4.0-20220722]
    at reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onSubscribe(FluxHide.java:113) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.FluxPeekFuseable$PeekFuseableSubscriber.onSubscribe(FluxPeekFuseable.java:172) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onSubscribe(FluxOnAssembly.java:432) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onSubscribe(FluxMapFuseable.java:90) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onSubscribe(FluxMapFuseable.java:90) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onSubscribe(FluxMapFuseable.java:90) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.MonoJust.subscribe(MonoJust.java:54) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.MonoMapFuseable.subscribe(MonoMapFuseable.java:59) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.MonoMapFuseable.subscribe(MonoMapFuseable.java:59) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.MonoMapFuseable.subscribe(MonoMapFuseable.java:59) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.FluxSourceMonoFuseable.subscribe(FluxSourceMonoFuseable.java:39) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.FluxOnAssembly.subscribe(FluxOnAssembly.java:122) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.FluxPeekFuseable.subscribe(FluxPeekFuseable.java:86) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.FluxLiftFuseable.subscribe(FluxLiftFuseable.java:78) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.FluxHandleFuseable.subscribe(FluxHandleFuseable.java:66) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.FluxLiftFuseable.subscribe(FluxLiftFuseable.java:78) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.FluxPeekFuseable.subscribe(FluxPeekFuseable.java:82) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.FluxContextStart.subscribe(FluxContextStart.java:49) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.Flux.subscribe(Flux.java:7967) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.MonoFlatMapMany$FlatMapManyMain.onNext(MonoFlatMapMany.java:188) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.Operators$ScalarSubscription.request(Operators.java:2205) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.MonoFlatMapMany$FlatMapManyMain.onSubscribe(MonoFlatMapMany.java:134) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.MonoCurrentContext.subscribe(MonoCurrentContext.java:35) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.MonoFlatMapMany.subscribe(MonoFlatMapMany.java:52) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.MonoNext.subscribe(MonoNext.java:40) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.MonoOnErrorResume.subscribe(MonoOnErrorResume.java:44) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.MonoMap.subscribe(MonoMap.java:52) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.MonoMap.subscribe(MonoMap.java:52) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.MonoSubscriberContext.subscribe(MonoSubscriberContext.java:47) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.MonoSubscriberContext.subscribe(MonoSubscriberContext.java:47) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.Mono.subscribe(Mono.java:3873) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.FluxFlatMap$FlatMapMain.onNext(FluxFlatMap.java:420) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.FluxPeekFuseable$PeekFuseableSubscriber.onNext(FluxPeekFuseable.java:204) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.FluxPeekFuseable$PeekFuseableSubscriber.onNext(FluxPeekFuseable.java:204) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.FluxPublishOn$PublishOnSubscriber.runAsync(FluxPublishOn.java:447) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.publisher.FluxPublishOn$PublishOnSubscriber.run(FluxPublishOn.java:534) ~[reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:84) [reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:37) [reactor-core-3.2.22.RELEASE.jar:3.2.22.RELEASE]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_332]
    at org.mule.service.scheduler.internal.AbstractRunnableFutureDecorator.doRun(AbstractRunnableFutureDecorator.java:151) [mule-service-scheduler-1.4.2/:?]
    at org.mule.service.scheduler.internal.RunnableFutureDecorator.run(RunnableFutureDecorator.java:54) [mule-service-scheduler-1.4.2/:?]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_332]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_332]
    at java.lang.Thread.run(Thread.java:750) [?:1.8.0_332]
![opentelconfig](https://user-images.githubusercontent.com/60172905/196030355-e2e3e53d-d6cf-46b0-8edd-ed88c5d2935d.png)
manikmagar commented 2 years ago

@Zubair199 Could you also add here your mule-maven-plugin configuration with additional zipkin dependency?

manikmagar commented 2 years ago

@Zubair199 I was able to reproduce this using the zipkin example in documentation - https://avioconsulting.github.io/mule-opentelemetry-module/#_generic_exporter. Looks like we missed to update the zipkin exporter dependency in that document. Module 1.1.0 is upgraded to use OpenTelemetry 1.19.0 ( PR #56 ) and hence any related dependencies from OpenTelemetry must be 1.19.0 or later.

Please upgrade opentelemetry-exporter-zipkin dependency version to 1.19.0 and try again.

manikmagar commented 2 years ago

@Zubair199 If updating dependency version resolved your error, please close this issue.