App Performance Analytics uses symbol tables to reverse-parse crash logs from HarmonyOS NEXT apps. This process helps you locate problematic code and resolve online exceptions more efficiently. The platform also provides a feature for managing HarmonyOS NEXT symbol tables that you can use to import and query symbol tables, and test reverse parsing.
HarmonyOS NEXT symbol tables
HarmonyOS NEXT apps are primarily developed in the arkts and native (c/cpp) languages. The symbol table for the arkts (ets/ts/js) language is a sourceMap, while the symbol table for the native(c/cpp) language is in the shared object (SO) dynamic library.
When a HarmonyOS app crashes, its crash log contains an obfuscated stack trace. You must use a symbol table to reverse-parse this stack trace. This process converts the trace into readable function names and line numbers, which lets you locate the problematic code.
Import a HarmonyOS NEXT symbol table
Before you can reverse-parse a crash log, you must upload a symbol table. For arkts (ets/ts/js), the symbol table is the sourcemap file. This file is typically named sourceMaps.map and located at entry/build/default/cache/default/default@CompileArkTS/esmodule/release/sourceMaps.map. For native (c/cpp), the symbol table is the SO file, which is typically named xxx.so. You should back up the sourceMaps.map and SO files each time you build or publish your app.
Follow these steps to upload a HarmonyOS NEXT symbol table:
Log on to the mPaaS console and select the target application. In the navigation pane on the left, choose Mobile Analysis > App Performance Analytics > HarmonyOS Symbol Table Management.
To import the sourcemap symbol table, click Import and enter the
VersionandModule Name. You can find theversionNameandbundleNamein theapp.json5file of your HarmonyOS project.To import the SO symbol table, click Import, and then enter the download URL for the SO file or upload the local file.