internal-comms
Write internal communications following company formats, including status reports, leadership updates, and newsletters.
ANanthropics/skills203k3,265 new stars in the last 7 days
Set up or troubleshoot Sentry error monitoring, tracing, offline cache and source maps in native mini programs, Taro or uni-app. Supports WeChat, Alipay, ByteDance, Baidu, QQ, DingTalk, Kuaishou and WeChat/ByteDance/Kuaishou minigames.
Use this skill when a user wants to integrate or troubleshoot sentry-miniapp in a consumer application. Discover the application's runtime, installed SDK and entry point before choosing code. This guide covers the stable 2.x contract.
Read project instructions and inspect the relevant application directory. Prefer rg; exclude generated bundles and dependencies when searching source.
rg --files -g 'package.json' -g '*lock*' -g '*project*.json' -g 'app.json' \
-g '*app.{js,ts,tsx,vue}' -g '*main.{js,ts}' \
-g '*config.{js,ts,mjs}' -g '!node_modules' -g '!dist'
rg -n 'sentry-miniapp|@tarojs/|@dcloudio/uni-' package.json
rg -n 'Sentry\.init|sentry-miniapp|errorHandler|componentDidCatch' \
src app.js app.ts -g '!node_modules' -g '!dist'
Adjust search roots to files that exist; these commands illustrate discovery, not a required directory layout.
Determine:
project.config.json, Alipay's mini.project.json, ByteDance's project.tt.json and Baidu's project.swan.json are useful clues. Confirm QQ, DingTalk and Kuaishou from actual target configuration.app.js/app.ts; Taro uses src/app.tsx or its configured entry; Vue 3 uni-app usually initializes from src/main.js/main.ts.An unqualified install selects the current stable release; sentry-miniapp@2 selects the stable 2.x line. For an explicitly requested prerelease, verify the available tag or exact version before installing; do not assume a next tag exists. Do not silently migrate an existing 1.x application. Use the version and migration guide, including its fixed 1.x documentation archive.
2.0 uses Core v11 and stream spans. Check the target Sentry deployment against the guide's support baseline; successful error ingestion alone does not prove support for spans, Logs, Metrics or Sessions.
Implement the requested coverage. Resolve routine setup choices from the project and user intent; ask only for missing information that affects the result.
| Coverage | When to add it | Reference |
|---|---|---|
| Error monitoring and framework handlers | Basic integration or missing errors | error-monitoring.md |
| HTTP and business tracing | Latency measurement or backend trace correlation | tracing.md |
| Offline cache and consent | Weak networks or a stated privacy requirement | offline-cache.md |
| Source Map upload | Readable stacks from deployed builds | sourcemap.md |
Load only the references needed for the work. Automatic capture depends on available host APIs; optional Performance observers and FPS are not universal platform capabilities.
Use the consumer's existing package manager. For a chosen 2.x release, pin the resolved version and retain the lockfile:
npm install --save-exact sentry-miniapp@2
# Or, in a Yarn project:
yarn add --exact sentry-miniapp@2
For native WeChat projects, run Tools → Build npm in the developer tools after installation or updates. Check the package.json/miniprogramRoot layout against the native installation guide; framework projects use their own build pipeline.
Copy the complete DSN from the target Sentry project; do not construct its hostname. Configure the exact envelope request host as a legal request domain, or configure the chosen tunnel's host. Verify with device debugging and domain-check bypass disabled.
Initialize once, as early as practical, before native App() registration and business requests. In framework projects, put initialization in a dedicated module imported before the application module. Do not put init() inside a temporary scope or an unfinished async span.
// Native app.js
const Sentry = require('sentry-miniapp');
Sentry.init({
dsn: 'YOUR_DSN', // Copy the complete project DSN.
release: '[email protected]',
environment: 'production',
});
App({
// Existing application configuration.
});
For Taro and uni-app, follow their actual entry and preserve existing framework error handling:
H5 needs the official browser/framework SDK through target-specific imports. sentry-miniapp does not provide browser DOM or fetch/XHR instrumentation.
Runtime APIs come from the detected host. Set miniappPlatform only to correct an ambiguous event label; it does not switch the host API. Values are wechat, alipay, bytedance, qq, swan, dingtalk and kuaishou. The event's top-level platform stays javascript.
WeChat/ByteDance/Kuaishou minigames have no App/Page model. Automatic Session tracking requires both native show/hide listeners to register successfully; missing capabilities produce diagnostics. First frame measures SDK installation to the first rAF, not full cold start. FPS/jank defaults off; opt in with enableMinigameFrameRate: true only when needed. See the minigame guide.
Kuaishou games support both ks and legacy kwaigame; prefer ks when both exist. Launch from maps to the shared scene context. Global error/rejection listeners are feature-detected: the Kuaishou game API catalog does not guarantee those APIs, so connect the engine error handler or use explicit capture when absent.
Use the configuration reference for the complete option list. Apply these boundaries when choosing settings:
sampleRate; traces use tracesSampleRate or tracesSampler and are off until configured.tracePropagationTargets defaults to an empty list. Add anchored URL allowlists only for backends the application controls.dataCollection governs automatic fields. userInfo: false stops automatic error IP inference, but does not erase explicit setUser fields or arbitrary business logs.beforeSend, beforeSendLog and beforeSendMetric for their respective data. beforeSendSpan edits streamed spans; ignoreSpans filters them.requireConsent gates sending, not collection. See the offline/consent reference before changing that policy.SpanStreaming when enabling tracing; replacing the full default set requires installing it explicitly.Run the consumer's relevant checks and build the actual target. Verify progressively:
An event ID means capture was attempted. flush() returning true is not a backend receipt or proof of symbolication. Local tests do not establish survival across host freezing or process termination.
Report which version, build, runtime and backend were actually verified. Keep untested capabilities explicit, and include concise remaining steps only when they require user access or a real-device action.
Write internal communications following company formats, including status reports, leadership updates, and newsletters.
ANanthropics/skills203k3,265 new stars in the last 7 days
GAgarrytan/gstack143k598 new stars in the last 7 days
A pre-launch checklist covering monitoring, staged rollouts and rollback plans.
ADaddyosmani/agent-skills122k1,667 new stars in the last 7 days
ADaddyosmani/agent-skills122k1,667 new stars in the last 7 days
PApaperclipai/paperclip119k1,966 new stars in the last 7 days
RUruvnet/RuView106k739 new stars in the last 7 days