Class RheaTrace3


  • public class RheaTrace3
    extends java.lang.Object
    This is the only API class exposed externally by RheaTrace. Users are not expected to rely on other classes beyond this one.

    Note: RheaTrace only support main process tracing.

    • Constructor Summary

      Constructors 
      Constructor Description
      RheaTrace3()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void captureStackTrace​(boolean force)
      Capture current stacktrace manually and save into RheaTrace sampling buffer for latter transforming to trace data.
      static void init​(android.content.Context context)
      This is the entry point api for RheaTrace.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RheaTrace3

        public RheaTrace3()
    • Method Detail

      • init

        public static void init​(android.content.Context context)
        This is the entry point api for RheaTrace. The initialization stage includes two aspects: 1. If we are tracing app cold launch stage, we will start tracing immediately. 2. Start a http server for receiving latter tracing commands, such as start/stop tracing.
        Parameters:
        context - used for initializing tracing data directory
      • captureStackTrace

        public static void captureStackTrace​(boolean force)
        Capture current stacktrace manually and save into RheaTrace sampling buffer for latter transforming to trace data.

        RheaTrace3 is a stacktrace based tracing tool. Inside of it, we've built in some hook points for active stack capturing. However, these hook points can't cover the execution of all methods. So, we offer this method to users. Users can decide to invoke it within appropriate methods to make up for the methods that our hook points fail to cover.

        Parameters:
        force - if true, we will ignore the stacktrace capture interval limit and force capture a stacktrace.