{"_id":"@arthurfiorette/pino-sentry-transport","_rev":"2-2a0ac77bdeafec3903f06fa017eb99d5","name":"@arthurfiorette/pino-sentry-transport","dist-tags":{"latest":"1.5.0"},"versions":{"1.5.0":{"name":"@arthurfiorette/pino-sentry-transport","version":"1.5.0","author":{"name":"Tomer Yechiel"},"license":"MIT","_id":"@arthurfiorette/pino-sentry-transport@1.5.0","maintainers":[{"name":"hazork","email":"arthur.fiorette@gmail.com"}],"homepage":"https://github.com/tomer-yechiel/pino-sentry-transport#readme","bugs":{"url":"https://github.com/tomer-yechiel/pino-sentry-transport/issues"},"dist":{"shasum":"bdfc707060badf59b7df7e104a54a087f53a4c2b","tarball":"https://registry.npmjs.org/@arthurfiorette/pino-sentry-transport/-/pino-sentry-transport-1.5.0.tgz","fileCount":7,"integrity":"sha512-jU6WpJ1atSD0GDYeK1FdaalNZgVe40xnH7xxq4TgOe3SBne/WmIgbvgu5ZsoAXfIMBa/7NjwvVKMAIz6A1V43A==","signatures":[{"sig":"MEUCIQDw2oexQ15NeY+8pswWnkoe9ZzhG8eAS21Dn0W4VZmjiQIgQjxer5NLoMgeZIkXQvOvv2Fx+9+cYEtPrVOrbB+YuXU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":15848},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","volta":{"npm":"9.6.7","node":"18.17.1"},"engines":{"node":"> 14"},"exports":{".":{"import":"./dist/index.js","default":"./dist/index.cjs"},"./package.json":"./package.json"},"gitHead":"d40dacea52cf5862666aff3119dff4cfbcb130f5","scripts":{"ci":"npm run build && npm run lint && npm run check && npm run check-exports && npm run test ","fix":"biome check --fix","lint":"tsc","test":"vitest run","build":"tsup","check":"biome check","changeset":"changeset","spell:check":"cspell \"{README.md,CODE_OF_CONDUCT.md,CONTRIBUTING.md,.github/*.md,src/**/*.ts}\"","check-exports":"attw --pack .","local-release":"changeset version && changeset publish","prepublishOnly":"npm run ci"},"_npmUser":{"name":"hazork","email":"arthur.fiorette@gmail.com"},"overrides":{"semver-regex":"3.1.4"},"repository":{"url":"git+https://github.com/tomer-yechiel/pino-sentry-transport.git","type":"git"},"_npmVersion":"10.8.1","description":"Integrates Pino and Sentry.","directories":{},"_nodeVersion":"20.14.0","dependencies":{"lodash.get":"^4.4.2","pino-abstract-transport":"^2.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"pino":"^9.7.0","tsup":"^8.5.0","cspell":"^9.0.2","dprint":"^0.50.0","vitest":"^3.2.3","esbuild":"^0.25.5","prettier":"^3.5.3","typescript":"^5.8.3","@types/node":"^24.0.1","@sentry/node":"^9.28.1","@biomejs/biome":"1.9.4","@types/prompts":"^2.4.9","esbuild-runner":"^2.2.2","@changesets/cli":"^2.29.4","@types/lodash.get":"^4.4.9","source-map-support":"^0.5.21","@arethetypeswrong/cli":"^0.18.2"},"peerDependencies":{"pino":"^7.0.0 || ^8.0.0 || ^9.0.0","@sentry/node":"^7.0.0 || ^8.0.0 || ^9.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pino-sentry-transport_1.5.0_1749741878735_0.8396917399871693","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Package does not work"}},"time":{"created":"2025-06-12T15:24:38.592Z","modified":"2025-09-15T17:08:43.250Z","1.5.0":"2025-06-12T15:24:38.909Z"},"bugs":{"url":"https://github.com/tomer-yechiel/pino-sentry-transport/issues"},"author":{"name":"Tomer Yechiel"},"license":"MIT","homepage":"https://github.com/tomer-yechiel/pino-sentry-transport#readme","repository":{"url":"git+https://github.com/tomer-yechiel/pino-sentry-transport.git","type":"git"},"description":"Integrates Pino and Sentry.","maintainers":[{"name":"hazork","email":"arthur.fiorette@gmail.com"}],"readme":"# Pino Sentry transport\n\n[![npm version][npm-version-src]][npm-version-href]\n[![npm downloads][npm-downloads-src]][npm-downloads-href]\n[![bundle][bundle-src]][bundle-href]\n[![JSDocs][jsdocs-src]][jsdocs-href]\n[![License][license-src]][license-href]\n\n[//]: # ([![GitHub Workflow Status]&#40;https://github.com/tomer-yechiel/pino-sentry-transport/actions/workflows/pino-sentry-transport.yml/badge.svg?branch=main&#41;]&#40;https://github.com/tomer-yechiel/pino-sentry-transport/actions&#41;)\n\n\n\n**Pino Sentry Transport** allows you to send logs from [Pino](https://github.com/pinojs/pino) directly to [Sentry](https://sentry.io/).\n\n\n## Installation\n\n```shell\nnpm i pino-sentry-transport\n```\n\n## Usage\n\n```typescript\nimport pino from \"pino\";\n\nconst logger = pino({\n    transport: {\n        target: \"pino-sentry-transport\",\n        options: {\n            sentry: {\n                dsn: \"https://<key>:<secret>@sentry.io/<project>\",\n                // additional options for sentry\n            },\n            withLogRecord: true, // default false - send the entire log record to sentry as a context.(FYI if its more then 8Kb Sentry will throw an error)\n            tags: ['level'], // sentry tags to add to the event, uses lodash.get to get the value from the log record\n            context: ['hostname'], // sentry context to add to the event, uses lodash.get to get the value from the log record,\n            minLevel: 40, // which level to send to sentry\n            expectPinoConfig: true, // default false - pass true if pino configured with custom messageKey or errorKey see below\n            sendBreadcrumbs: true, // default false - send the log record as a breadcrumb to Sentry\n        }\n    },\n});\n```\n\n\n### Configuration Options\n\n- **`withLogRecord`**: When set to `true`, sends the entire log record as context to Sentry. Be cautious of log records larger than 8KB, as Sentry will throw an error.\n- **`tags`**: An array specifying which fields from the log record should be added as tags in Sentry. Uses `lodash.get` to extract values.\n- **`context`**: An array specifying which fields from the log record should be added as context in Sentry. Also uses `lodash.get` for value extraction.\n- **`minLevel`**: The minimum log level required for a message to be sent to Sentry. Log levels follow Pino's conventions (e.g., 40 for 'error').\n- **`expectPinoConfig`**: If set to `true`, allows the transport to work with custom `messageKey` or `errorKey` settings in Pino.\n- **`sendBreadcrumbs`**: If set to `true`, sends the log record as a breadcrumb to Sentry.\n\n\n### Sentry initialization\nBecause Pino transport runs in a separate worker thread, Sentry needs to be [initialized](https://docs.sentry.io/platforms/javascript/configuration/webworkers/#usage-with-worker-level-initialization) in the transport.\n\n\n### License\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n\n\n[npm-version-src]: https://img.shields.io/npm/v/pino-sentry-transport\n[npm-version-href]: https://npmjs.com/package/pino-sentry-transport\n[npm-downloads-src]: https://img.shields.io/npm/dm/pino-sentry-transport\n[npm-downloads-href]: https://npmjs.com/package/pino-sentry-transport\n[bundle-src]: https://img.shields.io/bundlephobia/minzip/pino-sentry-transport?label=minzip\n[bundle-href]: https://bundlephobia.com/result?p=pino-sentry-transport\n[license-src]: https://img.shields.io/github/license/tomer-yechiel/pino-sentry-transport.svg\n[license-href]: https://github.com/tomer-yechiel/pino-sentry-transport/blob/main/LICENSE\n[jsdocs-src]: https://img.shields.io/badge/jsdocs-reference-080f12\n[jsdocs-href]: https://www.jsdocs.io/package/pino-sentry-transport\n","readmeFilename":"README.md"}