@tillstack/electron
v0.4.0
Published
TillPulse observability SDK for Electron — main-process crashes, renderer-gone, hangs, native minidumps, crash-free sessions
Downloads
260
Maintainers
Readme
@tillstack/electron
TillPulse observability for Electron desktop apps. Covers the surfaces a web error tracker can't reach: main-process crashes, native C++/V8 minidumps, renderer/GPU/child-process failures, and app hangs.
npm install @tillstack/electronIn your main process:
import { TillPulse } from '@tillstack/electron'
TillPulse.init({
dsn: 'https://<public-key>@ingest.tilldev.dev/<project-id>',
release: app.getVersion(),
environment: 'production',
})In each renderer, use @tillstack/browser — the renderer
is a Chromium page, so it gets the full web treatment (errors, Web Vitals,
network, breadcrumbs) with the same DSN.
The main-process SDK captures:
| Signal | Source |
|---|---|
| Main-process crashes | uncaughtException, unhandledRejection (stack-parsed) |
| Native crashes | Electron crashReporter minidumps (C++/V8 faults the JS layer can't catch) |
| Renderer/GPU/child gone | render-process-gone, child-process-gone (reason → crashed/oom) |
| App hangs | renderer unresponsive/responsive → duration-tagged hang events |
| Crash-free sessions | session on ready, crashed on an uncaught exception, exited on quit |
| Desktop context | OS + arch + RAM, Electron/Chrome/Node/V8 versions |
Events are PII-scrubbed on-device and buffered in a file-backed queue in
userData — so the report explaining a crash survives the restart after it.
The file is encrypted with the OS keychain through Electron's safeStorage
(Keychain on macOS, DPAPI on Windows, the secret service on Linux) and readable
only by your user. A file that can't be decrypted is discarded, and with
enableThreatDetection on, a storage_tamper security event is sent. Events
older than 24 hours are dropped. On Linux without a secret store, the queue stays
in memory unless you set allowPlaintextQueue: true. Call TillPulse.clearQueue()
to wipe it, for example when a user signs out.
Native minidump upload is opt-in (uploadMinidumps: true); by default dumps are
kept locally and a metadata event is sent.
Options
dsn, release required. Toggles (default on): enableNativeCrashReporter,
enableProcessMonitoring, enableHangDetection, enableSessionTracking. Also
uploadMinidumps, environment, dist, disableDefaultPiiScrubbing,
allowPlaintextQueue,
beforeSend, initialTags, flushIntervalMs, debug.
