sentry-miniapp
sentry-miniapp is an open-source error and performance monitoring SDK built on Sentry's core, designed for Chinese mini-program platforms (WeChat, Alipay, ByteDance, Baidu, QQ, DingTalk, Kuaishou) and cross-platform frameworks (Taro, uni-app). It provides automatic exception capture, performance tracking, offline caching, and distributed tracing without requiring a maintained release channel.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | lizhiyao/sentry-miniapp |
| Owner | lizhiyao |
| Primary language | TypeScript |
| License | MIT — OSI-approved |
| Stars | 669 |
| Forks | 144 |
| Open issues | 0 |
| Latest release | Unknown |
| Last updated | 2026-07-07 |
| Source | https://github.com/lizhiyao/sentry-miniapp |
What sentry-miniapp is
TypeScript-based SDK (MIT licensed) wrapping @sentry/core with platform abstraction for 8+ mini-program engines and mini-game support. Provides breadcrumbs, source map path normalization, session tracking, network monitoring, and weak-network offline storage; integrates distributed tracing headers (sentry-trace, baggage) for backend correlation.
Get the sentry-miniapp source
Clone the repository and explore it locally.
git clone https://github.com/lizhiyao/sentry-miniapp.gitcd sentry-miniapp# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Initialize in app entry file (app.js/app.ts) *before* App() call to capture lifecycle errors; placement inside onLaunch will miss early startup telemetry.
- Configure DSN and release matching upstream Sentry instance and source map upload; source map path prefix must be set to 'app:///' for multi-platform stack normalization.
- Set requireConsent: true for China-compliant privacy-by-default mode; users must call Sentry.setConsent(true) after opt-in before network transmission begins.
- Requires Sentry domain added to mini-program request domain allowlist; each platform (WeChat, Alipay, etc.) has separate domain configuration.
- For Taro/uni-app, integrate Vue errorHandler or React error boundary separately to capture component lifecycle exceptions not caught by global handler.
When to avoid it — and what to weigh
- Requires Session Replay or DOM-based diagnostics — Mini-programs have no DOM; SDK relies on breadcrumbs and custom spans for context reconstruction. If DOM replay is essential, this is not suitable.
- Need guaranteed SLA / commercial support — Community-maintained project (single author); no commercial support channel or SLA documented. Relies on GitHub issues and WeChat group community.
- Operating on non-Chinese mini-program ecosystems only — SDK is optimized for WeChat, Alipay, ByteDance, and similar platforms. If targeting only iOS/Android native or browser-only, Sentry's official SDKs may be simpler.
- Strict zero-dependency or minimal-footprint requirement — SDK includes ~100 KB compiled. While splittable into subpackages, main package footprint is non-trivial; may be problematic for strict size budgets.
License & commercial use
MIT License. Permissive OSI license allowing commercial use, modification, and redistribution with attribution. No restrictions on proprietary applications.
MIT license permits commercial use without restriction. However, project is community-maintained (single author); no commercial support, indemnification, or SLA. Use in production requires acceptance of community-only support model and willingness to fork/maintain if author discontinues.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Strong |
| License clarity | Clear |
| Deployment complexity | Low |
| DEV.co fit | Good |
| Assessment confidence | High |
SDK captures breadcrumbs including network request bodies by default (can be disabled); ensure sensitive data (tokens, PII) is filtered before upload via beforeSend hook or scrubbing rules in Sentry backend. Mini-program environments are sandboxed; SDK runs in app context without elevated privileges. No known CVEs mentioned in data. Offline storage uses device local cache; consider data residency implications in regulated jurisdictions.
Alternatives to consider
Official Sentry JavaScript SDK (@sentry/browser) + custom adapter
Requires manual platform abstraction and breadcrumb normalization; more verbose but backed by Sentry staff and receives SLA support for production use.
TalkingData / Sensors Analytics (Chinese APM vendors)
Native multi-platform mini-app SDKs with commercial support; tailored for China market compliance but less integration with Sentry backend or distributed tracing.
Platform-native error reporting (WeChat, Alipay built-in APIs)
Zero dependency, guaranteed compatibility; but minimal breadcrumb context, no cross-platform code reuse, and limited backend integrations.
Build on sentry-miniapp with DEV.co software developers
sentry-miniapp provides drop-in error and performance tracking for WeChat, Alipay, and other Chinese platforms. Start with the quick-start guide, or contact our team to discuss integration with your backend and compliance requirements.
Talk to DEV.coRelated open-source tools
Surfaced by semantic similarity across the DEV.co open-source index.
Related on DEV.co
Explore the category and the services that help you build with it.
sentry-miniapp FAQ
Do I need to manually call captureException in onError?
Will network requests be captured alongside errors?
How do I handle Vue/React component errors in Taro/uni-app?
Is source map upload mandatory?
Software development & web development with DEV.co
DEV.co helps companies turn open-source tools like sentry-miniapp into production software. Our software development services cover the full lifecycle — architecture, web development, integration, and maintenance — delivered by software developers and web developers who ship. Engage our software development agency to implement or customize it for your open-source observability stack.
Ready to Add Production Monitoring to Your Mini-App?
sentry-miniapp provides drop-in error and performance tracking for WeChat, Alipay, and other Chinese platforms. Start with the quick-start guide, or contact our team to discuss integration with your backend and compliance requirements.