The (un)official multiagent Opbeat agent for Node.js. Built over the official one
npm install opbeat-multiagent
npm install opbeat --save
`
To get started just require and start the Opbeat agent **at the very
top** of your app's startup script. The Opbeat agent will be returned. The
agent will now instrument your Node.js application and track unhandled
exceptions automatically.
`js
// Add this snippet to the VERY top of your app's startup script
var opbeat = require('opbeat').start({
appId: '...',
organizationId: '...',
secretToken: '...'
})
`
If you want to manually send an error to Opbeat, use the
captureError() function:
`js
opbeat.captureError(new Error('Ups, something broke'))
`
Documentation
- Documentation overview
- Get started with Express
- Get started with hapi
- Get started with Koa
- Agent API
- Troubleshooting guide
- Compatibility with other modules
- Upgrading to v4
Testing
The test suite expects the databases PostgreSQL, MySQL, MongoDB and
Redis to be present. The npm test command will try and start them all
automatically before running the tests. This should work on OS X if the
databases are all installed using Homebrew.
To run the linter without running any tests, run npm run lint. To
automatically fix linting errors run npm run lint-fix`.