Skip to content

Commit 68e825b

Browse files
committed
feat: update rum docs
1 parent 64fa028 commit 68e825b

6 files changed

Lines changed: 100 additions & 7 deletions

File tree

en/rum/analytics/native.mdx

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ Memory usage details by view name:
7373
- **Peak Memory**: Records peak memory usage during view runtime to identify memory pressure peaks and prevent system termination due to insufficient memory (OOM).
7474
- **P75 Memory**: Shows the P75 percentile of memory usage, reflecting memory usage for most users, more representative of real experience than averages.
7575

76-
For detailed performance metric descriptions, see [Android Data Collection](/en/rum/sdk/android/data-collection) and [iOS Data Collection](/en/rum/sdk/ios/data-collection).
77-
7876
## Error Analysis — Quick Error Identification and Diagnosis
7977

8078
<Frame>
@@ -460,6 +458,45 @@ Flashduty RUM typically completes data collection and display within **1-3 minut
460458

461459
</AccordionGroup>
462460

461+
## Metrics Reference
462+
463+
### Overview Metrics
464+
465+
| Metric | Collection Field | Description |
466+
|--------|-----------------|-------------|
467+
| UV | usr_id | Total deduplicated users |
468+
| Session Count | session_id | Total sessions when app is opened and used |
469+
| Avg Session Duration | - | Total session duration divided by total sessions |
470+
| Session Frequency | - | Total sessions divided by active users |
471+
472+
### Performance Metric Thresholds
473+
474+
| Metric | Collection Field | Good | Moderate | Poor |
475+
|--------|-----------------|------|----------|------|
476+
| App Startup Time | view_app_start_time | Within 2s | Within 4s | Over 4s |
477+
| Frame Rate | view_refresh_rate_average | 55 FPS or above | 50 FPS or above | Below 50 FPS |
478+
| CPU Usage | view_cpu_ticks_per_second | Below 40 ticks/s | Below 60 ticks/s | 60 ticks/s or above |
479+
| Memory Usage | view_memory_average | Below 100 MB | Below 200 MB | 200 MB or above |
480+
| Peak Memory | view_memory_max | Below 200 MB | Below 400 MB | 400 MB or above |
481+
482+
### Smoothness Metrics
483+
484+
| Metric | Definition | Collection Field |
485+
|--------|-----------|-----------------|
486+
| Slow Frames | Frames with render time over 16ms | - |
487+
| Frozen Frames | Frames with render time over 700ms | - |
488+
| Long Tasks | Tasks with execution time over 100ms | long_task_duration |
489+
| Freeze Frequency | Average freezes per second | - |
490+
491+
### Stability Metrics
492+
493+
| Metric | Calculation | Description |
494+
|--------|------------|-------------|
495+
| Crash Count | Direct count | Total crashes caused by unhandled exceptions or signals |
496+
| Crash-free Rate | 1 minus crash session ratio | Recommended to maintain above 99% |
497+
| ANR Rate | ANR sessions divided by total sessions | Triggered when UI thread blocked over 5 seconds (Android) |
498+
| App Freeze Rate | Freeze sessions divided by total sessions | Counted when main thread unresponsive over 250ms (iOS) |
499+
463500
## Further Reading
464501

465502
### SDK Integration and Configuration

en/rum/sdk/web/sdk-integration.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
2-
title: "SDK Integration"
2+
title: "Web SDK Integration Guide"
33
description: "Learn how to integrate Web RUM SDK in Web applications, including NPM, CDN async, and CDN sync methods"
4+
keywords: ["RUM", "Web SDK", "User Monitoring", "Frontend Monitoring"]
45
---
56

67
<Info>
@@ -21,6 +22,9 @@ We provide three integration methods:
2122
NPM and CDN async methods may miss errors, resources, and user actions triggered before SDK initialization. Use CDN sync for complete collection.
2223
</Warning>
2324

25+
26+
## Integration Code
27+
2428
<Tabs>
2529
<Tab title="NPM Package">
2630
Add `@flashcatcloud/browser-rum` to your `package.json`:

zh/rum/analytics/native.mdx

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@ Flashduty Native RUM 分析看板提供开箱即用的可视化仪表板,自
7474
- **峰值内存**:记录各视图运行期间的内存使用峰值,识别内存压力高峰,预防因内存不足导致的系统终止(OOM)。
7575
- **P75 内存**:显示内存占用的 P75 分位数,反映大部分用户的内存使用情况,比平均值更能代表真实体验。
7676

77-
有关性能指标的详细说明,请参阅 [Android 数据收集](/zh/rum/sdk/android/data-collection)[iOS 数据收集](/zh/rum/sdk/ios/data-collection)
78-
7977
## 异常分析 — 快速定位与诊断错误
8078

8179
<Frame>
@@ -461,6 +459,45 @@ Flashduty RUM 通常在数据产生后的 **1-3 分钟**内完成采集和展示
461459

462460
</AccordionGroup>
463461

462+
## 指标口径参考
463+
464+
### 概览指标
465+
466+
| 指标 | 采集字段 | 说明 |
467+
|------|---------|------|
468+
| UV | usr_id | 去重后的用户总数 |
469+
| 会话数 | session_id | 应用被打开使用的总会话数量 |
470+
| 会话平均时长 | - | 会话总时长除以会话总数 |
471+
| 使用频次 | - | 会话总数除以活跃用户数 |
472+
473+
### 性能指标阈值
474+
475+
| 指标 | 采集字段 | 良好 | 中等 ||
476+
|------|---------|------|------|-----|
477+
| 应用启动时间 | view_app_start_time | 2s 以内 | 4s 以内 | 超过 4s |
478+
| 帧率 | view_refresh_rate_average | 55 FPS 以上 | 50 FPS 以上 | 低于 50 FPS |
479+
| CPU 消耗 | view_cpu_ticks_per_second | 低于 40 ticks/s | 低于 60 ticks/s | 60 ticks/s 以上 |
480+
| 内存使用 | view_memory_average | 低于 100 MB | 低于 200 MB | 200 MB 以上 |
481+
| 峰值内存 | view_memory_max | 低于 200 MB | 低于 400 MB | 400 MB 以上 |
482+
483+
### 流畅度指标
484+
485+
| 指标 | 定义 | 采集字段 |
486+
|------|-----|---------|
487+
| 慢帧数 | 渲染耗时超过 16ms 的帧数 | - |
488+
| 冻结帧数 | 渲染耗时超过 700ms 的帧数 | - |
489+
| 长任务数 | 执行时间超过 100ms 的任务数量 | long_task_duration |
490+
| 卡顿频率 | 平均每秒发生冻结的次数 | - |
491+
492+
### 稳定性指标
493+
494+
| 指标 | 计算方式 | 说明 |
495+
|------|---------|------|
496+
| 崩溃次数 | 直接统计 | 由未处理的异常或信号引起的崩溃总次数 |
497+
| 无崩溃率 | 1 减去崩溃会话占比 | 建议保持在 99% 以上 |
498+
| ANR 率 | ANR 会话数除以总会话数 | UI 线程阻塞超过 5 秒时触发(Android) |
499+
| 应用卡顿率 | 卡顿会话数除以总会话数 | 主线程无响应超过 250ms 时计入(iOS) |
500+
464501
## 延伸阅读
465502

466503
### SDK 接入与配置

zh/rum/sdk/android/sdk-integration.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ dependencies {
2323
</Step>
2424

2525
<Step title="获取应用凭证">
26-
在 Flashduty 控制台的 **RUM 应用管理**页面:
26+
在 Flashduty 控制台的 [RUM 应用管理](https://console.flashcat.cloud/rum/apps)页面:
2727

2828
1. 创建或选择一个 Android 应用
2929
2. 获取以下凭证信息:

zh/rum/sdk/ios/sdk-integration.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Flashcat iOS SDK 通过 Swift Package Manager 安装:
2929

3030
<Step title="获取应用凭证">
3131

32-
在 Flashduty 控制台的 **RUM 应用管理**页面:
32+
在 Flashduty 控制台的 [应用管理](https://console.flashcat.cloud/rum/apps) 页面:
3333

3434
1. 创建或选择一个 iOS 应用
3535
2. 获取以下凭证信息:

zh/rum/sdk/web/sdk-integration.mdx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,21 @@ RUM SDK 支持多种接入方式,您可以根据项目需求选择最适合的
2222
NPM 和 CDN 异步方式可能会错过在 SDK 初始化之前触发的错误、资源和用户操作。如需完整采集,请使用 CDN 同步方式。
2323
</Warning>
2424

25+
## 获取应用凭证
26+
27+
在 Flashduty 控制台的 [RUM 应用管理](https://console.flashcat.cloud/rum/apps)页面:
28+
29+
1. 创建或选择一个 Web 应用
30+
2. 获取以下凭证信息:
31+
- **Application ID** - 应用唯一标识符
32+
- **Client Token** - 客户端访问令牌
33+
34+
<Frame>
35+
![RUM 应用管理页面展示 Application ID 和 Client Token 的位置](https://docs-cdn.flashcat.cloud/imges/png/ec49ca6c7a5c87e5a3fc80cd271250eb.png)
36+
</Frame>
37+
38+
## 接入代码
39+
2540
<Tabs>
2641
<Tab title="NPM 包">
2742
`@flashcatcloud/browser-rum` 添加到您的 `package.json` 文件中:

0 commit comments

Comments
 (0)