How to use Universal Profiling to minitor JBoss

LS,

at the moment we are using an additional javaagent argument on JBoss’ commandline to monitor it using apm. Which works but has (at least) one downside: to roll out a new version of the apm agent you have to restart JBoss (and the applications inside).

My question is if it is possible to use apm-agent-attach-cli.jar (as a separate process) to monitor JBoss? If so, do I need to do something specific to set things up?

Kind regards, Edgar Matzinger

Hi !

Updating to a new APM Java agent will always require to restart the JBoss server, this is not something that we can work around.

Using `apm-agent-attach-cli.jar` allows to attach to an already running JVM, but does not allow to detach from it, hence we can’t use that to detach and update the APM agent.

On a technical level, java agents run within the JVM process, not as an external process, the ability to attach at runtime only allows to attach to an existing JVM not to run the instrumentation in a separate process. This limitation is common with most of the java agents from other vendors.

It is however possible to use a symbolic link to the latest agent jar and use that in JBoss configuration, this will allow to update the agent whenever JBoss server is restarted, which is expected to happen from time to time.