bunyan-newrelic-stream

1.3.1 • Public • Published

bunyan-newrelic-stream

This library will send error logs to your newrelic account. It assumes that your application has a newrelic config file all set up.

import NewRelicStream from 'bunyan-newrelic-stream';
bunyan.createLogger({
  ...
  streams: [{
    level: 'error',
    type: 'raw',
    stream: new NewRelicStream()
  }]
});

What data is sent to newrelic?

Whatever is in err. If you log an error directly logger.trace(new Error()), or via the err key logger.trace({ err: new Error() }), this library will receive the serialized contents of that error. This is generally done by the standard bunyan error serializer, but can be configured via the serializers option passed into bunyan. I recommend https://github.com/pwmckenna/bunyan-error-serializer :)

Package Sidebar

Install

npm i bunyan-newrelic-stream

Weekly Downloads

125

Version

1.3.1

License

ISC

Unpacked Size

10.9 kB

Total Files

9

Last publish

Collaborators

  • pwmckenna