APM Problem with Java standalone

Hi all,

I have a couple of Java application which comunicate with rmi. One of them has a part web. I can see document from Jboss (2 server) to MySQL (3 server) in apm dashboard as a service.
But the part of from daemon (1 server) to Jboss (2 server) it seems to be missing, I only get metric documents but I'm unable to see APM information.


Thank you very much in advance

Hi and welcome to the forum :tada:

The Java agent currently does not support RMI out of the box. You can, however, use the public API to manually create a transaction for your daemon service.

If you want to directly correlate the daemon activity with the requests to JBoss and the subsequent activity, you have to manually propagate the relevant tracing headers. In the daemon, create a transaction, either with the programmatic API or via an annotation. Then use the injectTraceHeaders API to inject the relevant headers in a Map. Add this map to your RMI interface method. In JBoss, manually create a transaction for the RMI call via ElasticApm.startTransactionWithRemoteParent, using the Map received from the daemon application.

I hope that helps :slight_smile:


Ok, thank you so much.

I only have one question more. The JBoss (2 Server) has scheduled tasks too and I don't see in APM dashboard, I only see web project (.war) but not scheduler project (.jar). Any idea?

How do you schedule the tasks? Do those methods have something like a @Scheduled annotation? We currently don't have out-of-the-box support for that yet but there is a related issue: https://github.com/elastic/apm-agent-java/issues/418

In the mean time, you can use the @CaptureTransaction annotation to capture those methods.

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.