Class FunctionCallRecorder

java.lang.Object
com.github.beothorn.agent.recorder.FunctionCallRecorder

public class FunctionCallRecorder extends Object
This class is responsible for recording the call stack of a function call. Usually, this should be written following OO principles of encapsulation. But this class bytecode is injected on the actual code, and having stuff private seems to cause some issues. You will see some questionable visibility choices here.
  • Field Details

    • stackPerThread

      public static final Map<String,Span> stackPerThread
    • shouldPrintQualified

      public static boolean shouldPrintQualified
    • shouldCaptureStacktrace

      public static boolean shouldCaptureStacktrace
    • isRecording

      public static boolean isRecording
    • startTrigger

      public static String startTrigger
    • stopTrigger

      public static String stopTrigger
  • Constructor Details

    • FunctionCallRecorder

      public FunctionCallRecorder()
  • Method Details

    • enterFunction

      public static void enterFunction(Method method)
    • enterConstructor

      public static void enterConstructor(Constructor<?> constructor)
    • exit

      public static void exit()
    • setStartTrigger

      public static void setStartTrigger(String startTriggerFunctionNam)
    • setShouldCaptureStacktrace

      public static void setShouldCaptureStacktrace(boolean captureStacktrace)
    • setStopTrigger

      public static void setStopTrigger(String stopTriggerFunctionNam)
    • getClassNameFor

      public static String getClassNameFor(Method method)
    • getClassNameFor

      public static String getClassNameFor(Constructor<?> constructor)
    • onEnter

      public static void onEnter(String threadName, String name, String className, String method, long entryTime)
    • onEnter

      public static void onEnter(String threadName, String name, String className, String method, long entryTime, String[][] arguments)
    • onLeave

      public static void onLeave(String threadName, long exitTime)
    • onLeave

      public static void onLeave(String threadName, long exitTime, String[] returnValue)
    • getOldCallStack

      public static Optional<String> getOldCallStack()
    • getFinalCallStack

      public static Optional<String> getFinalCallStack()