Do I need to recycle JVM to turn off/on tracing in toggles.pbd?

Document ID : KB000104619
Last Modified Date : 04/07/2018
Show Technical Document Details
Question:
Do I need to recycle JVM to turn off/on tracing in toggles.pbd?
Environment:
Java Agents from 9.7 release until 10x
Answer:
AutoProbe cannot dynamically instrument the tracers configured with SubstituteClass directives. For example, the tracer for SocketTracing have been configured with the following:
 
SubstituteClassIfFlagged: SocketTracing java.net.Socket com.wily.introscope.agent.probe.net.ManagedSocket

This is the reason why you cannot dynamically change the SocketTracing by commenting / uncommenting TurnOn: SocketTracing.

You can say the same to UDPTracing as well. In fact, if you look into java2.pbd, there are a few tracers using SubstituteClass. They require a restart if you toggle it on/off in toggles pbd:

SetFlag: SocketTracing
SetFlag: UDPTracing
SetFlag: FileSystemTracing
SetFlag: ThreadTracing

Other tracers as most in j2ee.pbd do not use substitute class, and therefore can be dynamically instrumented.