A transport (stream) for the pino logger that sends logs to Sentry via @sentry/node. Current stable version 0.15.0 supports pino v7+ and Sentry SDK v7. It works as a CLI tool or programmatic stream, exposing both createWriteStream and the Sentry instance directly. Release cadence is sporadic. Key differentiators: lightweight, simple integration, and exposes the underlying Sentry instance for advanced usage. Requires Node >=10 and @sentry/node as a peer dependency. Self-hosted Sentry users must be on 20.6.0+ with Sentry SDK v7.
npm install pino-sentryVerified import paths — ran on the pinned version, not inferred.
Configures pino-sentry with a DSN and pino instance, logs a message and an error sent to Sentry.
Upgrade sentry self-hosted to 20.6.0+ or use pino-sentry versions prior to 0.15.0 with Sentry SDK v6.
Provide DSN via --dsn flag or SENTRY_DSN env var.
Replace sampleRate with 'tracesSampleRate' in Sentry.init (outside pino-sentry options).
Update @sentry/node to v7.x and ensure self-hosted Sentry >=20.6.0.
Install it: npm install @sentry/node
Upgrade @sentry/node to version ^7.0.0
Use import { createWriteStream } from 'pino-sentry'Set SENTRY_DSN env var or pass dsn option to createWriteStream.