sentry-miniapp
Cross-platform Sentry SDK for Mini Programs & Mini Games — error monitoring, performance monitoring, Source Maps and end-to-end tracing | 跨端小程序 / 小游戏监
What is sentry-miniapp?
Cross-platform Sentry SDK for Mini Programs & Mini Games — error monitoring, performance monitoring, Source Maps and end-to-end tracing | 跨端小程序 / 小游戏监控 SDK
Overview of sentry-miniapp
What it is
sentry-miniapp is a cross-platform Sentry SDK designed for Mini Programs and Mini Games. It provides error monitoring, performance monitoring, Source Maps support, and end-to-end tracing. The SDK supports WeChat, Alipay, ByteDance, Baidu, QQ, DingTalk, Kuaishou Mini Programs, as well as WeChat and Douyin Mini Games. It works with native projects, Taro, and uni-app frameworks.
Key features
- Error monitoring with device, page, action, and request context
- Performance sampling to analyze request and business operation durations
- Source Map upload and automatic stack trace resolution to original source code
- End-to-end tracing to correlate frontend and backend operations
- Offline queue with capacity limit for retrying failed requests when network recovers
- Privacy consent gate to pause network sending until user agrees
- Mini Game support including frame rate and lag statistics (opt-in)
Use cases
- Reproduce and debug errors reported by users in production
- Identify slow operations in login, payment, or page interactions
- Track business failures without exceptions using custom logs and metrics
- Monitor errors and lag in WeChat / Douyin Mini Games
- Handle weak network environments with local buffering and retry
- Comply with privacy regulations by deferring data transmission until user consent
Getting started
Install the package:bashnpm install sentry-miniappFor native WeChat projects, run “Tools → Build npm” in the developer tools. Then initialize in the entry file (app.js/app.ts) before App():javascriptconst Sentry = require('sentry-miniapp');Sentry.init({ dsn: 'YOUR_DSN', release: '[email protected]', environment: 'production',});App({ onLaunch() {} });Verify with:javascriptSentry.captureException(new Error('sentry test'));
License and pricing
License: MIT. Pricing: open source (free).
Based on the project's public README and repository metadata.