Real User Monitoring (RUM) of Cloud Monitor 2.0 enables performance monitoring for minigames on platforms such as WeChat and TikTok. By integrating the node package manager (NPM) package, it captures performance metrics and detects runtime exceptions.
Procedure
Log on to the Cloud Monitor 2.0 console, and select a workspace. In the left navigation pane, click Integration Center.
In the Frontend Applications section, click the Minigame card, enter an application name, configure other parameters as needed, and click Create Application.
NoteThe application name must be unique.
After the application is created, the integration code appears at the bottom of the page. This code includes key information, such as the application ID and configuration address.
You can later view the created application on the page. To view the integration code, go to the application details and navigate to the page.
Integrate the SDK.
The minigame agent currently supports integration only through an NPM package.
Import the NPM package.
npm install @arms/rum-minigameInitialize the SDK.
NoteReplace
pidandendpointin the following code with the pid and endpoint generated in step 5.import armsRum from '@arms/rum-minigame'; armsRum.init({ pid: "your app id", endpoint: "your endpoint",//Example: https://aokcd*****-default-cn.rum.aliyuncs.com });
Configure a secure domain name.
Add the application endpoint to the domain name whitelist in the minigame management console.
Reference
The RUM SDK for minigames of Cloud Monitor 2.0 provides a wide variety of custom configurations to meet your business requirements.