@sentry/electron

Official Sentry SDK for capturing crashes, errors, and native crash reports in Electron applications

SDK
npm
v7.16.0
260stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
88/100Excellent
Development Activity96
Maintenance96
Community80
Maturity60
Momentum20

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
75/100Good
Architecture78
Code Quality82
Innovation70
Learning Curve68

@sentry/electron is Sentry’s official SDK for Electron apps, instrumenting both the main and renderer processes to capture JavaScript exceptions, unhandled rejections, and — critically — native process crashes via Electron’s crashReporter and minidump upload pipeline. It wires together Sentry’s Node.js SDK in the main process with a browser-style SDK in the renderer, bridging events across Electron’s IPC boundary so a single Sentry project sees a unified stream of errors from every process.

Maintained directly by Sentry (getsentry), the SDK also supports Electron’s context-isolation and preload security model, and ships breadcrumbs for Electron-specific events like app lifecycle, window creation, and IPC calls, making it the standard way to add crash reporting to a production Electron desktop application.

What You Get

  • Main-process and renderer-process SDK entry points (@sentry/electron/main, @sentry/electron/renderer) that share one Sentry project
  • Native crash capture via Electron’s crashReporter, uploading minidumps automatically on process crash
  • IPC-safe integration compatible with Electron’s contextIsolation and preload-script security model
  • Electron-specific breadcrumbs for app lifecycle, window management, and IPC events
  • Source-map support for both bundled main-process code and renderer web bundles

Common Use Cases

  • Capturing unhandled exceptions and promise rejections across an Electron app’s main and renderer processes
  • Collecting native crash reports (segfaults, out-of-memory kills) via minidump upload for desktop app stability monitoring
  • Correlating errors from context-isolated renderer processes back to the main process in a single Sentry issue stream
  • Instrumenting Electron Forge/Vite/webpack-based apps for production error monitoring, per the SDK’s bundled example projects

Under The Hood

Architecture The SDK is split by Electron process boundary — src/main initializes Sentry in the main process and manages native crash-reporter wiring, src/renderer provides a browser-like client for renderer processes, src/preload bridges renderer error/breadcrumb data across IPC when context isolation is enabled, and src/common holds shared types/transport logic while src/native and src/utility handle native crash-dump collection and helper utilities respectively.

Tech Stack TypeScript throughout, built on top of @sentry/node and @sentry/browser as underlying SDKs, targeting Electron’s multi-process model; ships both CommonJS and ESM builds (index.js / esm/) with full .d.ts type definitions, and includes six example projects (electron-forge, electron-vite, webpack context-isolation variants) demonstrating integration patterns.

Code Quality The repository has both test/unit and test/e2e suites, the latter exercising real Electron app scenarios rather than just mocked units, which is notable given the complexity of cross-process crash capture; the codebase is actively maintained with frequent releases and clear separation of concerns by process type.

API Design Initialization mirrors other Sentry SDKs (Sentry.init({ dsn: '...' })) called once per process, keeping the getting-started experience consistent with Sentry’s broader JS SDK family; supporting context-isolated Electron apps requires an extra preload-script wiring step, documented via the bundled examples, which adds some setup complexity beyond a single-process web SDK.

Used by 7 apps in this directory

TypeScript
88%
Other

AFFiNE

Productivity · Project Management · Note Taking

71,668

Write, draw, and plan in one infinite canvas — the open-source alternative to Notion and Miro that keeps your data yours.

View details
91
Repo Health
87
Technical
68
Dependency
Built with
TypeScript88%
Updated today
TypeScript
95%
Apache 2.0

AionUi

AI Agents · Productivity

32,102

Free, open-source Cowork desktop app that unifies Claude Code, Codex, Gemini CLI, and 20+ AI agents into a single platform with multi-agent teams, 24/7 cron automation, and zero-config built-in agent.

View details
88
Repo Health
76
Technical
66
Dependency
Built with
TypeScript95%
Updated today
TypeScript
99%
MIT

Cate

AI Code Assistants

2,087

A desktop IDE built on an infinite canvas — spread code editors, terminals, browsers, docs, and AI agents across freeform space instead of stacking windows and tabs, with layouts restored automatically.

View details
79
Repo Health
71
Technical
72
Dependency
Built with
TypeScript99%
Updated today
TypeScript
94%
AGPL 3.0

Element Web

Team Chat · Collaboration

13,387

A polished, self-hostable Matrix client for secure, decentralized messaging and collaboration that puts your organization in full control of its data.

View details
96
Repo Health
83
Technical
67
Dependency
Built with
TypeScript94%
Updated today
TypeScript
76%
Other

Joplin

Note Taking

56,003

The privacy-first, open-source note-taking app with end-to-end encrypted sync, AI assistance, and a powerful plugin ecosystem across every platform.

View details
93
Repo Health
87
Technical
62
Dependency
Built with
TypeScript76%
JavaScript15%
Updated yesterday
TypeScript
56%
AGPL 3.0

Responsively App

Design Tools · Developer Tools

25,119

Preview and interact with your responsive web design across every device size simultaneously — no more manual resizing.

View details
67
Repo Health
71
Technical
69
Dependency
Built with
TypeScript56%
JavaScript42%
Updated 2 weeks ago
TypeScript
92%
Apache 2.0

superset

AI Code Assistants · AI Development

13,068

Orchestrate an army of AI coding agents—Claude Code, Codex, Gemini CLI, and more—running simultaneously in isolated git worktrees from a single Electron desktop app.

View details
85
Repo Health
80
Technical
69
Dependency
Built with
TypeScript92%
Updated today

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search