DEV.co
Open-Source Observability · lizhiyao

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.

Source: GitHub — github.com/lizhiyao/sentry-miniapp
669
GitHub stars
144
Forks
TypeScript
Primary language
MIT
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Repositorylizhiyao/sentry-miniapp
Ownerlizhiyao
Primary languageTypeScript
LicenseMIT — OSI-approved
Stars669
Forks144
Open issues0
Latest releaseUnknown
Last updated2026-07-07
Sourcehttps://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.

Quickstart

Get the sentry-miniapp source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/lizhiyao/sentry-miniapp.gitcd sentry-miniapp# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

WeChat / Alipay mini-program error monitoring

Drop-in error capture and performance tracking for Chinese-market mini-apps; automatic platform API abstraction means single integration covers multiple endpoints without manual polyfills.

Taro / uni-app cross-platform projects

Unified monitoring across iOS/Android WeChat, Alipay, and ByteDance mini-app builds from one codebase; includes documented Vue/React component error handling patterns.

Mini-game performance and crash monitoring

Auto-detects game environment with FPS, jank, cold-start first-frame, and crash reporting; supports WeChat and ByteDance game platforms with minimal setup.

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.

SignalAssessment
MaintenanceActive
DocumentationStrong
License clarityClear
Deployment complexityLow
DEV.co fitGood
Assessment confidenceHigh
Security considerations

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.

Software development agency

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.co

Related 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?
No. Sentry.init() automatically registers global error listeners for onError, onUnhandledRejection, onPageNotFound, and onMemoryWarning. Manual calls are only needed for business logic errors.
Will network requests be captured alongside errors?
Yes, by default. Network breadcrumbs (xhr category) are auto-recorded and sent together with error events. Can be disabled via integrations config if privacy-sensitive.
How do I handle Vue/React component errors in Taro/uni-app?
Vue: attach errorHandler to app.config. React (Taro): wrap components in error boundary. Both patterns are documented in platform guides on sentry-miniapp.pages.dev.
Is source map upload mandatory?
No, but highly recommended for production. Without it, stack traces show bundled line numbers. SDK provides automation via sentry-cli and includes a two-layer source map merge script for transpiler chains.

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.