Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

winston-transport-sentry-node

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

winston-transport-sentry-node - npm Package Compare versions

Comparing version 0.4.0 to 0.5.0

7

dist/transport.js

@@ -42,3 +42,3 @@ "use strict";

return callback();
var message = info.message, winstonLevel = info.level, tags = info.tags, meta = tslib_1.__rest(info, ["message", "level", "tags"]);
var message = info.message, winstonLevel = info.level, tags = info.tags, user = info.user, meta = tslib_1.__rest(info, ["message", "level", "tags", "user"]);
var sentryLevel = this.levelsMap[winstonLevel];

@@ -50,4 +50,5 @@ Sentry.configureScope(function (scope) {

scope.setExtras(meta);
// TODO: add user details
// scope.setUser({ id: '4711' }); // id, email, username, ip_address
if (user !== undefined && _this.isObject(user)) {
scope.setUser(user);
}
// TODO: add fingerprints

@@ -54,0 +55,0 @@ // scope.setFingerprint(['{{ default }}', path]); // fingerprint should be an array

{
"name": "winston-transport-sentry-node",
"description": "@sentry/node transport for the winston v3 logger",
"version": "0.4.0",
"version": "0.5.0",
"author": "Andrew Avdeev <andrewww.avdeev@gmail.com>",

@@ -6,0 +6,0 @@ "keywords": [

@@ -92,5 +92,11 @@

Additional properties of `info` are sent as [Sentry Extra Context](https://docs.sentry.io/enriching-error-data/context/?platform=javascript#extra-context).
If `info.user` is an object, it will be sent as [Sentry User](https://docs.sentry.io/platforms/javascript/#capturing-the-user).
```js
logger.error("some error", { user: { username: "somebody", id: "123" } });
```
Additional properties of `info` are sent as [Sentry Extra Context](https://docs.sentry.io/enriching-error-data/context/?platform=javascript#extra-context).
```js
logger.error("some error", { whatever: "is sent as extra" });

@@ -97,0 +103,0 @@ ```

@@ -45,3 +45,3 @@ import * as Sentry from '@sentry/node';

const { message, level: winstonLevel, tags, ...meta } = info;
const { message, level: winstonLevel, tags, user, ...meta } = info;

@@ -57,4 +57,5 @@ const sentryLevel = (this.levelsMap as any)[winstonLevel];

// TODO: add user details
// scope.setUser({ id: '4711' }); // id, email, username, ip_address
if (user !== undefined && this.isObject(user)) {
scope.setUser(user);
}

@@ -61,0 +62,0 @@ // TODO: add fingerprints

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc