pino-sentry
Advanced tools
Comparing version 0.8.0 to 0.9.0
@@ -91,4 +91,4 @@ "use strict"; | ||
} | ||
; | ||
const tags = chunk.tags || {}; | ||
const breadcrumbs = chunk.breadcrumbs || {}; | ||
if (chunk.reqId) { | ||
@@ -118,2 +118,5 @@ tags.uuid = chunk.reqId; | ||
} | ||
if (this.isObject(breadcrumbs)) { | ||
Object.values(breadcrumbs).forEach(breadcrumb => scope.addBreadcrumb(breadcrumb)); | ||
} | ||
// Capturing Errors / Exceptions | ||
@@ -120,0 +123,0 @@ if (this.isSentryException(severity)) { |
{ | ||
"name": "pino-sentry", | ||
"description": "@sentry/node transport for pino logger", | ||
"version": "0.8.0", | ||
"version": "0.9.0", | ||
"author": "Andrew Avdeev <andrewww.avdeev@gmail.com>", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
@@ -48,2 +48,15 @@ | ||
logger.info({ extra : { foo : "bar" }, msg : "Error" }); | ||
// add breadcrumbs | ||
// https://docs.sentry.io/platforms/node/enriching-events/breadcrumbs/ | ||
logger.info({ | ||
msg: "Error", | ||
breadcrumbs: [ | ||
{ | ||
category: "auth", | ||
message: "Authenticated user " + user.email, | ||
level: "info", | ||
}, | ||
] | ||
}); | ||
``` | ||
@@ -50,0 +63,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34208
311
119