主权项 |
1. A controller for a distributed system comprising: a processor and a memory;
tracing application flows at an application program interface (API) level in a distributed system, the tracing, wherein the tracing includes capturing and generating message identifiers that can uniquely be linked to a transaction, a trampoline function from trampolines generating a message identification by hashing message contents being sent across to other services, the tracing enabling uniquely identifying a message using the message identification by the same content being routed to an end-service process with message based systems, comprising:
generating an overriding library with placeholders for hot-patching and setting up the trampolines and hot-patch no-operations (NOPs), wherein the overriding library includes overriding functions that are wrapper functions with an exact same signature as a target function, the wrapper functions in turn calling original functions and in the process being able to capture arguments being passed to a real function and a return value, without modifying actual logic, a key aspect in overriding target functions includes a lazy linking of shared libraries of dynamically linked libraries;at any step in execution of an application, patching the application in with an instrumentation being triggered on;capturing, with an override instrumentation function, relevant call parameters and return values that are stored to a common log file along with all process names;finishing hot-patching and pushing all logs for analysis once an instrumentation period is finished; andanalyzing transaction logs from various API boundaries and reconstructing execution flow. |