Skip to content

Commit e54bc94

Browse files
authored
Merge pull request #330 from flashcatcloud/docs/rum-sdk-versions-page
docs(rum): add an SDK versions page
2 parents 824c03d + f7eb80c commit e54bc94

3 files changed

Lines changed: 120 additions & 0 deletions

File tree

‎docs.json‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1799,6 +1799,7 @@
17991799
"group": "SDK 接入",
18001800
"icon": "code",
18011801
"pages": [
1802+
"zh/rum/sdk/versions",
18021803
{
18031804
"group": "Web",
18041805
"pages": [
@@ -3175,6 +3176,7 @@
31753176
"group": "SDK Integration",
31763177
"icon": "code",
31773178
"pages": [
3179+
"en/rum/sdk/versions",
31783180
{
31793181
"group": "Web",
31803182
"pages": [

‎en/rum/sdk/versions.mdx‎

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
title: "SDK Versions"
3+
description: "Look up the latest version of each RUM SDK, and the versioned url scheme for the Web CDN bundles"
4+
keywords: ["RUM", "SDK version", "version lookup", "CDN"]
5+
---
6+
7+
Each SDK is released independently and carries its own version number — Android's `0.6.0` has no relationship to Web's `0.1.0`. This page gives the **official version lookup page** for every platform. Those pages are maintained by the package registries themselves, so they always show the current release.
8+
9+
<Info>
10+
Most installation examples in the integration guides do not pin a version, so that you get the latest release. When you do need to pin one, look the version up at the link below and write it into your dependency declaration.
11+
</Info>
12+
13+
## Latest version per platform
14+
15+
| Platform | Package | Look up the latest version |
16+
| --- | --- | --- |
17+
| Web | `@flashcatcloud/browser-rum` | [npm](https://www.npmjs.com/package/@flashcatcloud/browser-rum) |
18+
| Electron | `@flashcatcloud/electron-sdk` | [npm](https://www.npmjs.com/package/@flashcatcloud/electron-sdk) |
19+
| WeChat Mini Program | `@flashcatcloud/miniprogram-rum` | [npm](https://www.npmjs.com/package/@flashcatcloud/miniprogram-rum) |
20+
| React Native | `@flashcatcloud/mobile-react-native` | [npm](https://www.npmjs.com/package/@flashcatcloud/mobile-react-native) |
21+
| Android | `cloud.flashcat:dd-sdk-android-core` | [Maven Central](https://central.sonatype.com/artifact/cloud.flashcat/dd-sdk-android-core) |
22+
| iOS | `FlashcatCore` | [CocoaPods](https://cocoapods.org/pods/FlashcatCore) |
23+
| HarmonyOS | `@flashcatcloud/core` | [ohpm](https://ohpm.openharmony.cn/#/cn/detail/@flashcatcloud%2Fcore) |
24+
| Flutter | `flashcat_flutter_plugin` | [pub.dev](https://pub.dev/packages/flashcat_flutter_plugin) |
25+
26+
Most platforms ship companion packages alongside the one above — `dd-sdk-android-rum` and `dd-sdk-android-okhttp` on Android, `FlashcatRUM` and `FlashcatTrace` on iOS, `@flashcatcloud/rum` on HarmonyOS, and so on. Companion packages of the same platform **stay on the same version**, so look up the main package and use that version for all of them.
27+
28+
## Url scheme for the Web CDN bundles
29+
30+
Besides npm, the Web SDK is distributed through a CDN. Each release gets **its own directory** on the CDN, named for the version with a `v` prefix:
31+
32+
```
33+
https://static.flashcat.cloud/browser-sdk/<version>/flashcat-rum.js
34+
https://static.flashcat.cloud/browser-sdk/<version>/fc-rum-legacy.js
35+
```
36+
37+
Take `<version>` from the npm page in the Web row above and add a `v`. If npm shows `0.1.0`, the url is `https://static.flashcat.cloud/browser-sdk/v0.1.0/flashcat-rum.js`.
38+
39+
Directories of earlier releases are **kept indefinitely and never rewritten**, so a url always serves the version it names. Upgrading means pointing at a newer release, not re-downloading the same url.
40+
41+
<Warning>
42+
**Do not use `https://static.flashcat.cloud/browser-sdk/v0/...` any more.** That is an earlier path named for the major version, and it has not been updated since `v0.1.0` — it still resolves, but its contents stay at an old release and will receive no fixes. If your page still references it, switch to a url carrying the full version, as described above.
43+
</Warning>
44+
45+
`fc-rum-legacy.js` is a separate build for browsers without ES2015 support (IE 9 to 11). It ships from `v0.1.0` onwards, is distributed through the CDN only, and is not published to npm. The directories of earlier releases do not contain it.
46+
47+
## Self-hosted deployments
48+
49+
Private networks usually cannot reach the public CDN, so the bundles have to be served from your own static host. The Web SDK's files depend on each other through hash-named chunks, so **do not pick files by hand** — use the sync script in the repository to download a complete set in one go:
50+
51+
```bash
52+
node scripts/deploy/sync-bundles.js
53+
```
54+
55+
With no arguments it downloads the version of the checkout it runs from, and it fails loudly rather than producing a directory with anything missing. See the [browser-sdk repository](https://github.com/flashcatcloud/browser-sdk) for details.
56+
57+
## Release notes
58+
59+
For what changed in each Web SDK release, see the [browser-sdk CHANGELOG](https://github.com/flashcatcloud/browser-sdk/blob/main/CHANGELOG.md). Release notes for the other platforms are on their package pages linked in the table above.

‎zh/rum/sdk/versions.mdx‎

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
title: "SDK 版本"
3+
description: "查询各端 RUM SDK 的最新版本,以及 Web CDN 产物的版本化地址规则"
4+
keywords: ["RUM", "SDK 版本", "版本查询", "CDN"]
5+
---
6+
7+
各端 SDK 独立发版,版本号互不相同 —— Android 的 `0.6.0` 与 Web 的 `0.1.0` 之间没有对应关系。本页给出每个端的**官方版本查询地址**,这些地址由各自的包仓库维护,永远显示当前最新版本。
8+
9+
<Info>
10+
接入文档里的安装示例大多不写死版本号,为的就是让您装到最新版。需要锁定某个具体版本时,先到下表对应的地址查到版本号,再写进依赖声明。
11+
</Info>
12+
13+
## 各端最新版本
14+
15+
| 平台 | 包名 | 查看最新版本 |
16+
| --- | --- | --- |
17+
| Web | `@flashcatcloud/browser-rum` | [npm](https://www.npmjs.com/package/@flashcatcloud/browser-rum) |
18+
| Electron | `@flashcatcloud/electron-sdk` | [npm](https://www.npmjs.com/package/@flashcatcloud/electron-sdk) |
19+
| 微信小程序 | `@flashcatcloud/miniprogram-rum` | [npm](https://www.npmjs.com/package/@flashcatcloud/miniprogram-rum) |
20+
| React Native | `@flashcatcloud/mobile-react-native` | [npm](https://www.npmjs.com/package/@flashcatcloud/mobile-react-native) |
21+
| Android | `cloud.flashcat:dd-sdk-android-core` | [Maven Central](https://central.sonatype.com/artifact/cloud.flashcat/dd-sdk-android-core) |
22+
| iOS | `FlashcatCore` | [CocoaPods](https://cocoapods.org/pods/FlashcatCore) |
23+
| HarmonyOS | `@flashcatcloud/core` | [ohpm](https://ohpm.openharmony.cn/#/cn/detail/@flashcatcloud%2Fcore) |
24+
| Flutter | `flashcat_flutter_plugin` | [pub.dev](https://pub.dev/packages/flashcat_flutter_plugin) |
25+
26+
每个端通常还有若干配套包(如 Android 的 `dd-sdk-android-rum`、`dd-sdk-android-okhttp`,iOS 的 `FlashcatRUM`、`FlashcatTrace`,HarmonyOS 的 `@flashcatcloud/rum` 等)。同一端的配套包**保持版本一致**,查上表中的主包即可,配套包用同一个版本号。
27+
28+
## Web CDN 产物的地址规则
29+
30+
Web SDK 除 npm 外还通过 CDN 分发。CDN 上**每个版本一个独立目录**,目录名就是版本号加 `v` 前缀:
31+
32+
```
33+
https://static.flashcat.cloud/browser-sdk/<version>/flashcat-rum.js
34+
https://static.flashcat.cloud/browser-sdk/<version>/fc-rum-legacy.js
35+
```
36+
37+
`<version>` 从上表 Web 那一行的 npm 页面查得,前面加 `v`。例如 npm 上是 `0.1.0`,地址就是 `https://static.flashcat.cloud/browser-sdk/v0.1.0/flashcat-rum.js`。
38+
39+
旧版本的目录会**永久保留、内容不变**,所以一个地址永远指向它命名的那个版本。升级意味着把地址指向新版本,而不是重新下载同一个地址。
40+
41+
<Warning>
42+
**不要再使用 `https://static.flashcat.cloud/browser-sdk/v0/...`。** 这是早期按大版本号命名的路径,自 `v0.1.0` 起已停止更新 —— 它仍然可以访问,但内容会一直停留在旧版本,不会收到任何修复。如果您的页面还在引用它,请按上面的规则改为带完整版本号的地址。
43+
</Warning>
44+
45+
`fc-rum-legacy.js` 是面向不支持 ES2015 的浏览器(IE 9 ~ 11)的独立构建,自 `v0.1.0` 起提供,仅通过 CDN 分发,不发布到 npm。更早版本的目录里没有这个文件。
46+
47+
## 私有化部署
48+
49+
内网环境通常无法访问公共 CDN,需要把产物下载到自己的静态服务器上。Web SDK 的产物之间存在哈希文件名的依赖关系,**不要手工挑选文件**,请使用仓库提供的同步脚本一次性下载完整集合:
50+
51+
```bash
52+
node scripts/deploy/sync-bundles.js
53+
```
54+
55+
不带参数时它会按当前代码库的版本下载,任何文件缺失都会明确报错并拒绝产出一个不完整的目录。详见 [browser-sdk 仓库](https://github.com/flashcatcloud/browser-sdk)。
56+
57+
## 版本变更记录
58+
59+
Web SDK 的每个版本改了什么,见 [browser-sdk CHANGELOG](https://github.com/flashcatcloud/browser-sdk/blob/main/CHANGELOG.md)。其余各端的变更记录在上表对应的包仓库页面上。

0 commit comments

Comments
 (0)