You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 91a0c73
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: en/rum/quickstart/app-management.mdx
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,7 +75,7 @@ The console provides detailed integration guides for each platform:
75
75
-**JavaScript (Web)**: After configuring parameters like service name, preview the `flashcatRum.init()` initialization code in real-time
76
76
-**Android**: Shows complete integration steps including adding Gradle dependencies (`cloud.flashcat:dd-sdk-android-core` and `cloud.flashcat:dd-sdk-android-rum`), initializing the SDK in `Application.onCreate()` with RUM enabled, and optional WebView tracking integration
77
77
-**iOS**: Shows complete integration steps including adding Swift Package Manager dependency (`fc-sdk-ios`, from version 0.3.0), initializing the SDK in `AppDelegate.didFinishLaunchingWithOptions` with RUM enabled, and optional WebView tracking integration
78
-
-**WeChat Mini Program**: Fill in `env`, `service`, `version`, and `sessionSampleRate` in the form, and the `flashcatRum.init()` snippet built on `@flashcatcloud/fc-sdk-miniprogram` is generated and previewed in real time (see "WeChat Mini Program SDK Configuration Assistant" below)
78
+
-**WeChat Mini Program**: Fill in `env`, `service`, `version`, and `sessionSampleRate` in the form, and the `flashcatRum.init()` snippet built on `@flashcatcloud/miniprogram-rum` is generated and previewed in real time (see "WeChat Mini Program SDK Configuration Assistant" below)
79
79
80
80
Each platform's SDK configuration page automatically fills in the current application's `applicationId` and `clientToken`, so you can copy the code directly into your project.
81
81
@@ -141,15 +141,15 @@ No save action is needed — the preview snippet updates as you type. `applicati
141
141
Install the SDK in your Mini Program project and run the npm build through WeChat DevTools:
142
142
143
143
```bash
144
-
npm install @flashcatcloud/fc-sdk-miniprogram
144
+
npm install @flashcatcloud/miniprogram-rum
145
145
```
146
146
</Step>
147
147
148
148
<Steptitle="Copy the Initialization Snippet">
149
149
Use the copy button at the top-right of the right-hand code block, then paste the generated snippet into your Mini Program's `app.js`:
|`tracing.sampleRate`| number |`1`| Request tracing sample rate. `1` means 100%, and `0.5` means approximately 50% |
62
+
|`tracing.sampleRate`| number |`100`| Request tracing sample rate, from 0 to 100. `100` means all requests are sampled, and `50` means approximately 50% |
63
63
|`tracing.headerName`| string |`traceparent`| Header name injected into requests |
64
64
|`tracing.rootTraceContext`| object | - | Optional root Trace Context. When configured, the SDK creates child spans from this context |
Copy file name to clipboardExpand all lines: en/rum/sdk/wechat-miniprogram/compatible.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ The WeChat Mini Program RUM SDK runs in the WeChat Mini Program environment and
13
13
| Mini Program base library |`2.10.0+`| SDK initialization registers `wx.onUnhandledRejection`; runtimes below this version are not recommended |
14
14
| Recommended base library |`2.12.0+`| Enables complete page rendering, startup, script execution, and setData update timing collection |
15
15
| WeChat DevTools | Recent stable version | Must support npm dependency installation and **Tools > Build npm**|
16
-
| npm package |`@flashcatcloud/fc-sdk-miniprogram`| Includes core functionality, platform adapter, and the RUM entry point |
16
+
| npm package |`@flashcatcloud/miniprogram-rum`| Includes core functionality, platform adapter, and the RUM entry point |
17
17
18
18
<Warning>
19
19
If your Mini Program allows users to run on base library versions below `2.10.0`, SDK initialization may fail to register unhandled Promise rejection listeners. We recommend setting a minimum base library version in the Mini Program admin console, or evaluating low-version user coverage before integration.
@@ -49,7 +49,7 @@ If your Mini Program allows users to run on base library versions below `2.10.0`
49
49
50
50
When integrating through npm, build npm dependencies in WeChat DevTools:
51
51
52
-
1. Run `npm install @flashcatcloud/fc-sdk-miniprogram` in the Mini Program project root
52
+
1. Run `npm install @flashcatcloud/miniprogram-rum` in the Mini Program project root
53
53
2. Open the project in WeChat DevTools
54
54
3. Run **Tools > Build npm**
55
55
4. Confirm that the generated `miniprogram_npm` can be referenced by Mini Program code
When `trackErrors` is enabled, the SDK subscribes to Mini Program app errors and unhandled Promise rejections.
101
+
When `trackErrors` is enabled, the SDK subscribes to Mini Program app errors, unhandled Promise rejections, page-not-found events, and subpackage lazy-load failures. Failed network requests are also recorded as errors.
102
102
103
103
| Source | SDK source | Description |
104
104
|--------|------------|-------------|
105
105
|`wx.onError`|`app`| Mini Program runtime errors |
| Failed network requests |`network`| For a failed request, the SDK creates an error event in addition to the resource event |
107
110
|`addError()`|`custom`| Business errors that you report manually |
108
111
109
112
Error events include the error message, optional stack, and source. When manually reporting an error, pass `error.stack` as the third argument to `addError()`.
@@ -135,7 +138,7 @@ Calling `addCustomEvent(name, context?)` creates a custom event. Use it to recor
Copy file name to clipboardExpand all lines: en/rum/sdk/wechat-miniprogram/sdk-integration.mdx
+8-7Lines changed: 8 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,25 +1,26 @@
1
1
---
2
2
title: "SDK Integration Guide"
3
3
description: "Integrate the RUM SDK into a WeChat Mini Program to collect page, action, request, error, and performance data"
4
-
keywords: ["RUM", "WeChat Mini Program SDK", "Mini Program monitoring", "user monitoring", "@flashcatcloud/fc-sdk-miniprogram"]
4
+
keywords: ["RUM", "WeChat Mini Program SDK", "Mini Program monitoring", "user monitoring", "@flashcatcloud/miniprogram-rum"]
5
5
---
6
6
7
-
The WeChat Mini Program RUM SDK provides the `flashcatRum` instance through `@flashcatcloud/fc-sdk-miniprogram`. After initialization, the SDK automatically collects page lifecycle events, user actions, network requests, app errors, and performance metrics, then reports them to Flashduty RUM.
7
+
The WeChat Mini Program RUM SDK provides the `flashcatRum` instance through `@flashcatcloud/miniprogram-rum`. After initialization, the SDK automatically collects page lifecycle events, user actions, network requests, app errors, and performance metrics, then reports them to Flashduty RUM.
8
8
9
9
## Prerequisites
10
10
11
11
Before integrating the SDK, complete these steps:
12
12
13
13
- Create or select a RUM application in the Flashduty console, then obtain the **Application ID** and **Client Token**
14
14
- Confirm that your Mini Program can access the RUM intake URL. The default URL is `https://browser.flashcat.cloud/api/v2/rum`; configure `proxy` if your network policy requires forwarding
15
+
- Configure the request domain allowlist in the WeChat Official Platform: go to **Development > Development Management > Development Settings > Server Domain** and add `https://browser.flashcat.cloud` (or your proxy domain) to the **request legal domains**. Without this, WeChat blocks all reporting requests on real devices; during development, you can temporarily check the "Do not verify legal domains" option in WeChat DevTools
15
16
- If you use WeChat DevTools, build npm so `miniprogram_npm` can reference the SDK package
16
17
17
18
## Install the SDK
18
19
19
20
Install the RUM SDK in the Mini Program project root:
20
21
21
22
```bash
22
-
npm install @flashcatcloud/fc-sdk-miniprogram
23
+
npm install @flashcatcloud/miniprogram-rum
23
24
```
24
25
25
26
After installation, run **Tools > Build npm** in WeChat DevTools.
@@ -29,7 +30,7 @@ After installation, run **Tools > Build npm** in WeChat DevTools.
29
30
Initialize the SDK as early as possible in the Mini Program entry file. The SDK wraps page lifecycle hooks, request methods, and app error listeners during initialization, so initializing it in `app.js` is recommended.
0 commit comments