Kibana version: 7.6.2
Elasticsearch version: 7.6.2
APM Server version: 7.6.2
APM Agent language and version: Java - elastic-apm-agent-1.15.0.jar
Original install method and version: APT repository
Fresh install or upgraded from other version? Fresh install
Is there anything special in your setup? None
Description of the problem including expected versus actual behavior. Please include screenshots (if relevant):
Hi
I'm trying to start my tomcat with recording and instrumentation set to false, and then on demand i'm trying to set them to true during debug sessions.
The configs are kept in the elasticapm.properties file in the same directory as the jar file (/opt/).
While setting recording=true, I could see the JVM metrics are sent to apm-server thus displayed in Kibana.
However setting instrumentation=true, I couldn't get any data captured (the application is constantly accessed by a script to simulate the traffic for the demo)
I couldn't find any error in my apm-agent.log file (set via log_file=/var/log/tomcat9/apm-agent.log parameter).
But the syslog from tomcat9 throws the below exception.
java.lang.ClassNotFoundException: co.elastic.apm.agent.shaded.bytebuddy.agent.Installer
I've attached the logs for further reference. The same applies to when you try to set the instrumentation to false from true. The data is continued to sent to apm-server.
Steps to reproduce:
- Start the agent with recording & instrumentation set to false
- After starting the tomcat9, change the instrumentation to true in the elaspticapm.properties
- watch the syslog (tail -f /var/log/syslog | grep apm)
Provide logs and/or server output (if relevant):
#tail -f /var/log/syslog | grep apm
May 14 12:12:15 tomcat tomcat9[6687]: #011at co.elastic.apm.agent.shaded.bytebuddy.agent.builder.AgentBuilder$Default.patchOnByteBuddyAgent(AgentBuilder.java:9435)
May 14 12:12:15 tomcat tomcat9[6687]: #011at co.elastic.apm.agent.shaded.bytebuddy.agent.builder.AgentBuilder$Default$Delegator.patchOnByteBuddyAgent(AgentBuilder.java:11007)
May 14 12:12:15 tomcat tomcat9[6687]: #011at co.elastic.apm.agent.bci.ElasticApmAgent.doReInitInstrumentation(ElasticApmAgent.java:196)
May 14 12:12:15 tomcat tomcat9[6687]: #011at co.elastic.apm.agent.bci.ElasticApmAgent$3.run(ElasticApmAgent.java:183)
May 14 12:12:15 tomcat tomcat9[6687]: Caused by: java.lang.ClassNotFoundException: co.elastic.apm.agent.shaded.bytebuddy.agent.Installer
May 14 12:12:15 tomcat tomcat9[6687]: #011at co.elastic.apm.agent.shaded.bytebuddy.agent.builder.AgentBuilder$Default.patchOnByteBuddyAgent(AgentBuilder.java:9429)
apm-agent.log = https://gist.github.com/Anandababu/dc3b04f4284157c0f240acc55934c9ec