Tencent / matrix

Matrix is a plugin style, non-invasive APM system developed by WeChat.
Other
11.65k stars 1.89k forks source link

Matrix.StartupTracer: start up from unknown scene #800

Open kongxiaoan opened 1 year ago

kongxiaoan commented 1 year ago

异常类型:app 运行时异常/编译异常

手机型号:如: Nexus 5(如是编译异常,则可以不填)

手机系统版本:如:Android 10.0

matrix版本:如: 2.0.8

gradle版本:如: 4.0.0

问题描述:如:在 android 10 启动耗时统计时不能正常统计

配置代码:
val traceConfig: TraceConfig = TraceConfig.Builder()
            .dynamicConfig(dynamicConfig)
            .enableFPS(false)
            .enableEvilMethodTrace(false)
            .enableAnrTrace(false)
            .enableStartup(true) //启动速度
            .enableIdleHandlerTrace(true) // Introduced in Matrix 2.0
            .enableMainThreadPriorityTrace(true) // Introduced in Matrix 2.0
            .enableSignalAnrTrace(signalAnrTraceEnable) // Introduced in Matrix 2.0
            .anrTracePath(anrTraceFile.absolutePath)
            .printTracePath(printTraceFile.absolutePath)
            .splashActivities("com.xxx.android.ui.start.SplashActivity;")
            .isDebug(true)
            .isDevEnv(true)
            .build()

        //Another way to use SignalAnrTracer separately
        //useSignalAnrTraceAlone(anrTraceFile.getAbsolutePath(), printTraceFile.getAbsolutePath());
        return TracePlugin(traceConfig)