Alibaba Cloud RUM plugin for HarmonyOS applications
npm install @arms/rum-harmonyos-pluginThis plugin is used to inject Alibaba Cloud RUM monitoring code into HarmonyOS applications.
1. Add the plugin to your project's hvigor/hvigor-config.json5 file:
``json5`
{
"dependencies": {
"@arms/rum-harmonyos-plugin": "^1.0.3"
}
}
2. Run the following command in your project root directory to sync dependencies:
`bash`
hvigorw --sync
1. Create a configuration file named alibabaCloudRumConfig.txt in your project root directory:-hook
- : Specify the directory or file to be processed-keep
- : Specify the directory or file to be excluded from processing`
example:text`
-hook ./src/main/ets/
-keep ./src/main/ets/hook/
2. Add the plugin to your project's build configuration:
`typescript
import { AlibabaCloudRumPlugin } from '@arms/rum-harmonyos-plugin';
// In your build configuration
export default {
plugins: [
AlibabaCloudRumPlugin() // 注意这里需要调用函数
]
};
`
The alibabaCloudRumConfig.txt file supports the following directives:
- -hook : Specify the directory or file to be processed-keep
-
Apache-2.0