node-octoblu-raven
Raven Error handling for Octoblu Services and Workers.
Installation
npm install --save octoblu-raven
Usage
Configuration Environment
Recommended:
env SENTRY_DSN='the-sentry-dsn'
Optional:
const options = dsn: 'the-sentry-dsn' {}options
NOTE: if no DSN is provided, it default to normal behavior and will not log with sentry
Express
!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 handleExpress app
Catch Uncaught Exceptions
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'patchGlobal
Report Error, or Message
Use this to manually report an error or message to Sentry.
OctobluRaven = require 'octoblu-raven'octobluRaven = octobluRavenreportError'oh no'