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.
npm i pino-airbrake-transport
yarn add pino-airbrake-transport
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
},
});
Originally forked from tomer-yechie's Sentry implementation