Offline transport for Sentry Node.js that persists events to a local better-sqlite3 database when the network is unavailable, then flushes them on reconnection. Current version 1.1.2, stable, with infrequent releases. Key differentiator: uses synchronous better-sqlite3 for simpler setup compared to async alternatives like @sentry/utils's offline transport. Requires Node >=18 and better-sqlite3 as a peer dependency. Not for browser use.
npm install sentry-offline-transport-better-sqliteNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initialize Sentry with offline transport using better-sqlite3 for persistent event queuing.
Ensure the database path is on a fast local disk and avoid high-frequency events in production if event loop blocking is a concern.
Use import syntax or dynamic import() in CJS projects. Set type: "module" in package.json or use .mjs extension.
Currently still supported. Monitor for updates.
Run npm install better-sqlite3 alongside this package.
Implement manual flush or periodic retry logic using Sentry.flush().
Run npm install better-sqlite3
Use dynamic import: const createOfflineTransport = (await import('sentry-offline-transport-better-sqlite')).default;Change import to: import createOfflineTransport from 'sentry-offline-transport-better-sqlite'
Pass the createOfflineTransport function (not its result) to the transport option: transport: createOfflineTransport