elastic-apm-mule4-agent icon indicating copy to clipboard operation
elastic-apm-mule4-agent copied to clipboard

Cannot load class 'co.elastic.apm.attach.ElasticApmAttacher'

Open prco5 opened this issue 4 years ago • 8 comments

Hi,when starting mule app, i get the following error. image

I installed .jar correctly.Added like this image And then when i start app i get the error above. image Ty.

prco5 avatar Feb 10 '21 14:02 prco5

Can you try and get any of the example projects running in your environment? Try the tracing-test first to see that everything works correctly with your setup. There is also a domain example there.

michaelhyatt avatar Feb 12 '21 06:02 michaelhyatt

Hi thank you for you answer. So i installed jar like this. 1111 Build success. Imported project in studio. projectStrcutire pom I didnt do anything to import file, i left it just like that how i imported it.(tracer.xml) And when i run the application i get the following. error error2

Just to be clear im running this without the elastic.apm.config_file to mule agent? Is that maybe the source of the problem? It's just a fresh maven install of jar, imported your tracing-test and just runing it.Am i missing something? Ty.

prco5 avatar Feb 12 '21 07:02 prco5

Not having the config shouldn't cause this. Try to add this to the pom file:

<dependency>
    <groupId>co.elastic.apm</groupId>
    <artifactId>apm-agent-attach</artifactId>
    <version>1.17.0</version>
</dependency>

michaelhyatt avatar Feb 15 '21 07:02 michaelhyatt

Yes with this added to pom.xml i'm able to start the application.Thank you very much.

Capture

But got issuse on server in following post. Thank you for help.

prco5 avatar Feb 15 '21 07:02 prco5

Hi, also one thing, so i tried to deploy it to mule server running apm server,and there it can find server but i get the following message in log file when i trigger the endpoint.

11

But funny thing in Kibana i can see some info in the following. image But there is just some JVM server related stuff, not the actual mule app info. But the log file is spammed with the above error. Thank you.

prco5 avatar Feb 15 '21 08:02 prco5

Hi, got it running by adding

 <dependency>
    <groupId>co.elastic.apm</groupId>
    <artifactId>apm-agent-api</artifactId>
    <version>1.21.0</version>
</dependency>

Any way to see the actual payload or messages inside, or more data? Thanks

prco5 avatar Feb 15 '21 12:02 prco5

Good to hear you managed to get it working. It doesn't capture message payloads or any additional labels, but it is possible to implement it in the code, similar to how Mule 3 agent captures message headers and properties.

TransactionUtils.java and SpanUtils.java have placeholders where such logic can reside.

michaelhyatt avatar Feb 16 '21 04:02 michaelhyatt

Thank you for your help.

prco5 avatar Feb 16 '21 14:02 prco5