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

book

Article ID: 104619

calendar_today

Updated On:

Products

APP PERF MANAGEMENT CA Application Performance Management Agent (APM / Wily / Introscope) CUSTOMER EXPERIENCE MANAGER INTROSCOPE

Issue/Introduction



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

Environment

Java Agents from 9.7 release until 10x

Resolution

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.