The Real User Monitoring (RUM) sub-service of Application Real-Time Monitoring Service (ARMS) allows you to monitor mini programs deployed in mainstream apps, such as Alipay, WeChat, DingTalk, QQ, Douyin, Baidu, and JD.com, and compile mini programs across frameworks such as Taro and uni-app. You can integrate npm packages to collect runtime performance metrics, track exceptions, and improve the user experience of your mini program.
RUM has been available for commercial use since 00:00:00 (UTC +8) on June 24, 2024. For more information, see Billing. To obtain technical support, join the DingTalk group chat (ID: 67370002064).
Procedure
Log on to the ARMS console.
In the left-side navigation pane, choose
. In the top navigation bar, select a region.On the Applications page, click Add Application.
In the Create Application panel, click Mini Program.
In the Mini Program panel, enter the name and description of the mini program, and click Create.
NoteThe name must be unique.
Then, an address to which monitoring data is reported (endpoint) and a mini program ID (pid) are automatically generated for the app.
Initialize the OpenRUM SDK.
To initialize the OpenRUM SDK, use a npm package.
Introduce the npm package.
npm install @arms/rum-miniapp
Initialize the SDK.
NoteReplace the
pid
andendpoint
parameters in the following code with the address and mini program ID obtained from the ARMS console.import ArmsRum from '@arms/rum-miniapp'; ArmsRum.init({ pid: "your app id", endpoint: "your endpint" });
Configure the address.
Add the address to the domain name whitelist of the server.
Sample address:
https://aokcd*****-default-cn.rum.aliyuncs.com
References
The RUM SDK for mini programs of ARMS provides a wide variety of custom configurations to meet your business requirements. For more information, see Sample configurations of the RUM SDK for mini programs.