pino-airbrake-transport
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

Pino Airbrake transport

NPM NPM GitHub Workflow Status

This module provides a transport for Pino that sends errors to Airbrake.

Thanks to this module you can automatically transmit logs, stacktrace and context from pino to Aibrake.io. The best part is that this happens in a worker thread so that the impact of logging is reduced to the minimum.

Install

npm

npm i pino-airbrake-transport

yarn

yarn add pino-airbrake-transport

Usage

import pino from "pino";

const logger = pino({
  transport: {
    target: "pino-airbrake-transport",
    options: {
      airbrake: {
        projectId: 1,
        projectKey: "REPLACE_ME",
        environment: "production",
        // aditional options for airbrake
        performanceStats: false,
      },
    },
    level: "info", // minimum log level that should be sent to Airbrake
  },
});

Credits

Originally forked from tomer-yechie's Sentry implementation

Package Sidebar

Install

npm i pino-airbrake-transport

Weekly Downloads

8

Version

1.1.1

License

MIT

Unpacked Size

42.2 kB

Total Files

40

Last publish

Collaborators

  • enricodeleo