docs: fix WeChat miniprogram SDK docs (package name, tracing sampleRate, domain allowlist, error sources)#140
Merged
Conversation
…omain allowlist step - Replace non-existent npm package @flashcatcloud/fc-sdk-miniprogram with the actually published @flashcatcloud/miniprogram-rum (zh/en, 8 files) - Fix tracing.sampleRate semantics: it is a 0-100 percentage with default 100, not a 0-1 fraction; update example from 1 to 100 - Add WeChat request legal-domain allowlist configuration to prerequisites - Document the three additional auto-collected error sources: page-not-found, lazy-load, network - Mark startPage name parameter as optional Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
客户接入小程序 SDK 前对文档做了一次与 SDK 代码(fc-sdk-wechat-miniprogram @ 0.1.5)的逐项核对,发现两处阻断性错误和两处完备性缺口。
修改内容
🔴 阻断性错误
@flashcatcloud/fc-sdk-miniprogram在 npm 上不存在(404),实际发布的是@flashcatcloud/miniprogram-rum。zh/en 共 8 个文件(sdk-integration / compatible / data-collection / quickstart/app-management)。控制台前端的同名问题已在 main 分支修复。tracing.sampleRate语义:代码中是 0–100 的百分比、默认 100(requestObservable.ts:Math.random() * 100 < sampleRate);文档误写为默认1、0.5=50%,示例sampleRate: 1实际只采样 1% 请求。🟡 完备性补充
startRum.ts:97-114):page-not-found(wx.onPageNotFound)、lazy-load(wx.onLazyLoadError)、network(请求失败时额外生成 error 事件)。🟢 小修
startPage(name?)的name参数实际可选。验证
mint broken-links通过(no broken links found)npm view核实:fc-sdk-miniprogram404,miniprogram-rum@0.1.5存在🤖 Generated with Claude Code