Raven Error handling for Octoblu Services and Workers.
npm install --save octoblu-raven
Recommended:
env SENTRY_DSN='the-sentry-dsn'
Optional:
const options = {
dsn: 'the-sentry-dsn',
logFn: function() {}
}
new OctobluRaven(options)
NOTE: if no DSN is provided, it default to normal behavior and will not log with sentry
!IMPORTANT: As of v4.0.0 use the new expressBundle method since it makes everyones life easier.
There is no longer a need for including express-send-error since that is included in the bundle.
For use with express apps.
express = require 'express'
OctobluRaven = require 'octoblu-raven'
app = express()
new OctobluRaven().handleExpress({ app })
Use at the root the project, typically in ./command.js
. This can be used independently or with the use of the Express Middleware.
OctobluRaven = require 'octoblu-raven'
new OctobluRaven().patchGlobal()
Use this to manually report an error or message to Sentry.
OctobluRaven = require 'octoblu-raven'
octobluRaven = new OctobluRaven()
octobluRaven.reportError(new Error('oh no'))