Search code examples
appdynamics

How Method invocation data collectors works?


Im getting started with AppDynamics capabilities, they provide different ways to collect data from the code.

One of them is Method invocation data collectors, I want to understand how this works under hood? How AppDynamics can gather this data without adding any code, api calls, just specifying the classname and method in AppDynamics UI is enough.

How they collect the stack trace details? Do they patch low level capabilities of the language itself?

Thanks


Solution

  • The implementation will vary per language type however generally the information is gathered through agent side configuration received from the controller to control the instrumentation.

    In Java, instrumentation is done through the Java Instrumentation API - the agent being injected through the javaagent JVM flag. See https://medium.com/javarevisited/what-is-java-instrumentation-why-is-it-needed-1f9aa467433 for an explanation of the API

    In .NET, instrumentation is done through CLR Profiling Interfaces - the agent being loaded from a dll as per profiler ENV VARS on the host. See https://learn.microsoft.com/en-us/dotnet/framework/unmanaged-api/profiling/setting-up-a-profiling-environment for related MS docs