DevOps / AppDynamics Interview questions
Why does the Java Agent use byte-code instrumentation?
Byte-code instrumentation lets the Java Agent add monitoring logic — timing a method, capturing a database call, injecting a correlation header — into a running application without ever touching or recompiling the application's actual source code.
The alternative approaches are both worse in practice: manually adding logging/timing code throughout an application is invasive, error-prone, and needs a new deployment for every change; and only inspecting metrics at the process or OS level (like the Machine Agent does) can't see inside individual method calls or attribute latency to a specific line of business logic at all.
Because the Java Agent modifies bytecode as classes are loaded by the JVM — not the .java or .class files on disk — instrumentation is applied fresh on every JVM restart and never permanently alters the deployed artifact, which is why enabling or disabling monitoring doesn't require a rebuild.
More Related questions...
