elastic / apm-agent-java

Home Page:https://www.elastic.co/guide/en/apm/agent/java/current/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how can we detach from a JVM at Runtime using elastic apm CLI ?

vamshigottam opened this issue · comments

this link https://www.elastic.co/guide/en/apm/agent/java/current/setup-attach-cli.html talks about attaching the apm CLI to the running apm.
could you confirm how to detach the cli from a running JVM similar to this

The agent does not support "detaching" itself after it started.
I think the closest thing you could get would be to make the agent remove all its instrumentations at runtime using the instrument config and to disable sending anything via disable_send. The agent would still be present though, it just wouldn't do much.

Also please use our discussion forums in the future for general questions.

Tried the above suggetions with following command. We are still getting metrics. Anything else we need to be checking?

java -jar apm-agent-attach-cli-1.43.0.jar
--exclude-user root
--include-vmarg Dconsul.port=8500
--config instrument=false
--config disable_send=true
--agent-jar elastic-apm-agent-1.43.0.jar &