michaelhyatt / elastic-apm-mule4-agent

APM agent for tracing Mule 4 applications using Elastic APM
18 stars 9 forks source link

One transaction per app only in Elastic cloud #19

Open Teormech opened 2 years ago

Teormech commented 2 years ago

Can see one transaction only in Elastic cloud (top level flow). Other transactions seems to be missing.

elk_apm_trans

Mule Runtime 4.2.2 Java 1.8 Elastic Cloud

Prop file config: apm_conf

As I'm running in DEBUG mode I can see lots of NoSuchMethodError errors in the logs. Not sure it it's an issue though...

org.mule.runtime.core.internal.context.notification.Policy: NotificationListener co.elastic.apm.mule4.agent.ApmMessageProcessorNotificationListener$$EnhancerByCGLIB$$e967d973@774037d3 was unable to fire notification MessageProcessorNotification{action=message processor pre invoke, processor=get:\expr\LPG\delivery\v1:expr_lpg_delivery_v1-config/processors/3/route/0/processors/3, resourceId=get:\expr\LPG\delivery\v1:expr_lpg_delivery_v1-config, serverId=JTK90POF12G2..expr_lpg_delivery_v1, timestamp=1644803889465} due to an exception: java.lang.NoSuchMethodError: org.mule.runtime.api.component.Component.getIdentifier()Lorg/mule/runtime/api/component/ComponentIdentifier;.

michaelhyatt commented 2 years ago

Hey @Teormech

Looks like you are missing the flow steps in the APM screen. What version of Mule are you using?

Teormech commented 2 years ago

@michaelhyatt Mule Runtime 4.2.2

michaelhyatt commented 2 years ago

Just trying to think on my feet, I think somehow the project is missing a dependency, can you try and add it to the pom.xml?

<dependency>
    <groupId>org.mule.runtime</groupId>
    <artifactId>mule-api</artifactId>
    <version>1.3.0</version>
</dependency>
Teormech commented 2 years ago

Added mule-api dependency. Unfortunately, the flow steps are still missing in the APM screen.

michaelhyatt commented 2 years ago

The latest version doesn't work on 4.2.2 due to the API change that the agent relies on available on 4.3 only.

I can't see a way around it without building and testing the agent on 4.2.2 with all the right Mule API jars.

Can you please test that you can run it properly on 4.3 or 4.4?

Teormech commented 2 years ago

Is there any version of the agent I can use with 4.2.2 runtime? I'll give version 0.4 a try with 4.3 runtime, but unfortunately we have to use 4.2.2 :(

michaelhyatt commented 2 years ago

No version, but it should be fairly easy to rebuild the agent with the right version of Mule runtime API jar that works with 4.2.2