1.2.4 • Published 1 year ago

@blacklab/pino-sentry-transport v1.2.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Pino Sentry transport

NPM CircleCI

This module provides a 'transport' for pino that sends errors to Sentry.

Install

npm i pino-sentry-transport

usage

import pino from "pino";

const logger = pino({
  transport: {
    target: "pino-sentry-transport",
    options: {
      sentry: {
        dsn: "https://<key>:<secret>@sentry.io/<project>",
        // aditional options for sentry
      },
      withLogRecord: true, // default false - send the log record to sentry as a context.(if its more then 8Kb Sentry will throw an error)
      tags: ['id'], // sentry tags to add to the event, uses lodash.get to get the value from the log record
      context: ['hostname'] // sentry context to add to the event, uses lodash.get to get the value from the log record,
      minLevel: 40, // which level to send to sentry
    }
  },
});

if log contain error, it will send to sentry using captureException if not it will use captureMessage.

1.2.4

1 year ago

1.2.3

1 year ago

1.2.0

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.2.2

2 years ago

1.1.3

2 years ago

1.2.1

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago