Integrate a mini program

更新时间:
复制 MD 格式

ARMS Real User Monitoring supports popular mini programs, including those on Alipay, WeChat, DingTalk, QQ, Douyin, Baidu, and JD.com. It also supports applications built with cross-platform frameworks like Taro and Uniapp that compile to mini programs. You can integrate an npm package to collect performance metrics and trace exceptions during runtime to improve your application's user experience.

Important

RUM has been available for commercial use since 00:00:00 (UTC+8), June 24, 2024. For pricing details, see Billing. For technical support, join the DingTalk group (ID: 67370002064).

Create an application

  1. Log on to the ARMS console.

  2. In the navigation pane, choose User Experience Monitoring > Applications. In the top menu bar, select a region.

  3. On the Applications page, click Add Application.

  4. In the Create Application panel, click Mini Program.

  5. In the Mini Program panel, enter an Application Name and a Description, and then click Create.

    Note

    Application names must be unique.

    A pid and an endpoint are automatically generated after the application is created.

  6. Install the probe SDK.

    Currently, the mini program probe can be integrated only via an npm package.

    1. Install the npm package.

      npm install @arms/rum-miniapp
    2. Initialize the SDK.

      Note

      Replace the values for pid and endpoint in the following code with the corresponding values for your application from the console.

      import ArmsRum from '@arms/rum-miniapp';
      ArmsRum.init({
        pid: "YOUR_PID",
        endpoint: "YOUR_ENDPOINT"
      });
  7. Configure the secure domain name.

    Add your application's endpoint to the server domain name whitelist.

    Example endpoint: https://aokcd*****-default-cn.rum.aliyuncs.com

Related topics

ARMS Real User Monitoring provides various SDK configuration options. For more information, see SDK configuration reference.