Skip to content

Commit

Permalink
fix(sentry): pass sentry error properties with depth of 10 (instead o…
Browse files Browse the repository at this point in the history
…f default 2) (#11)
  • Loading branch information
gr2m authored Sep 6, 2020
1 parent e2b14d2 commit 8c851f6
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const { Transform } = require("readable-stream");

const prettyFactory = require("pino-pretty");
const Sentry = require("@sentry/node");
const { ExtraErrorData } = require("@sentry/integrations");

const LEVEL_MAP = {
"10": "trace",
Expand All @@ -22,6 +23,7 @@ function getTransformStream() {
if (sentryEnabled) {
Sentry.init({
dsn: process.env.SENTRY_DSN,
integrations: [new ExtraErrorData({ depth: 10 })],
});
}

Expand Down
48 changes: 48 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"tap": "^14.10.8"
},
"dependencies": {
"@sentry/integrations": "^5.22.3",
"@sentry/node": "^5.21.1",
"pino-pretty": "^4.1.0",
"pump": "^3.0.0",
Expand Down

0 comments on commit 8c851f6

Please sign in to comment.