# opbeat

> The official Opbeat agent for Node.js

Latest version **4.17.0** (published 2018-01-18) · BSD-2-Clause license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install opbeat
pnpm add opbeat
yarn add opbeat
bun add opbeat
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 4.17.0 |
| Published | 2018-01-18 |
| First published | 2013-04-02 |
| Weekly downloads | 0 |
| License | BSD-2-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 20 |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 153 |
| Author | Thomas Watson Steen |
| Maintainers | roncohen, watson |
| Keywords | opbeat, log, logging, bug, bugs, error, errors, exception, exceptions, catch, monitor, monitoring, alert, alerts, performance, apm, ops, devops, deployment, deploying, deploy, release, stacktrace |

## Links

- npm: https://www.npmjs.com/package/opbeat
- Repository: https://github.com/opbeat/opbeat-node
- Issues: https://github.com/opbeat/opbeat-node/issues
- npm.io page: https://npm.io/package/opbeat

## Dependencies (20)

- [uuid](https://npm.io/package/uuid.md) ^3.0.1
- [debug](https://npm.io/package/debug.md) ^3.0.0
- [cookie](https://npm.io/package/cookie.md) ^0.3.1
- [semver](https://npm.io/package/semver.md) ^5.3.0
- [hashlru](https://npm.io/package/hashlru.md) ^2.0.0
- [stackman](https://npm.io/package/stackman.md) ^2.0.1
- [is-native](https://npm.io/package/is-native.md) ^1.0.1
- [sql-summary](https://npm.io/package/sql-summary.md) ^1.0.0
- [core-util-is](https://npm.io/package/core-util-is.md) ^1.0.2
- [end-of-stream](https://npm.io/package/end-of-stream.md) ^1.1.0
- [object-assign](https://npm.io/package/object-assign.md) ^4.1.1
- [normalize-bool](https://npm.io/package/normalize-bool.md) ^1.0.0
- [redact-secrets](https://npm.io/package/redact-secrets.md) ^1.0.0
- [after-all-results](https://npm.io/package/after-all-results.md) ^2.0.0
- [console-log-level](https://npm.io/package/console-log-level.md) ^1.4.0
- [opbeat-http-client](https://npm.io/package/opbeat-http-client.md) ^1.2.2
- [fast-safe-stringify](https://npm.io/package/fast-safe-stringify.md) ^1.1.3
- [require-in-the-middle](https://npm.io/package/require-in-the-middle.md) ^2.1.2
- [unicode-byte-truncate](https://npm.io/package/unicode-byte-truncate.md) ^1.0.0
- [opbeat-release-tracker](https://npm.io/package/opbeat-release-tracker.md) ^1.1.1

## Alternatives

- [@sentry/react-native](https://npm.io/package/@sentry/react-native.md) — 2.6M weekly downloads
- [@ardatan/aggregate-error](https://npm.io/package/@ardatan/aggregate-error.md) — 708.1K weekly downloads
- [custom-error-generator](https://npm.io/package/custom-error-generator.md) — 2.0K weekly downloads
- [@technik-sde/prosemirror-recreate-transform](https://npm.io/package/@technik-sde/prosemirror-recreate-transform.md) — 1.5K weekly downloads
- [@suchipi/error-utils](https://npm.io/package/@suchipi/error-utils.md) — 78 weekly downloads

## Recent versions

- 4.17.0 (latest) — 2018-01-18
- 3.9.1 (branch-v3) — 2017-03-13
- 2.0.0-beta.2 (beta) — 2015-11-12
- 1.5.0-beta.2 (1.5.0-beta.2) — 2015-05-21
- 1.4.0-beta.1 (1.4.0-beta.1) — 2015-04-24
- 0.2.11 (0.2.11) — 2014-04-09
- 4.16.0 — 2017-09-14
- 4.15.2 — 2017-09-13
- 4.15.1 — 2017-07-31
- 4.15.0 — 2017-07-27
- 4.14.2 — 2017-07-21
- 4.14.1 — 2017-07-14
- 4.14.0 — 2017-05-23
- 4.13.3 — 2017-05-18
- 4.13.2 — 2017-05-18
- … 124 more at https://npm.io/package/opbeat/versions

## README

# Opbeat for Node.js

[![Build status](https://travis-ci.org/opbeat/opbeat-node.svg?branch=master)](https://travis-ci.org/opbeat/opbeat-node)
[![Standard - JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)
<a href="https://opbeat.com" title="Opbeat"><img src="http://opbeat-brand-assets.s3-website-us-east-1.amazonaws.com/svg/logo/logo.svg" align="right" height="25px"></a>

This is the official Node.js agent for Opbeat.

[Opbeat](https://opbeat.com/nodejs) provides instant performance insights, built for Node.js developers.

If you are looking for a module for your frontend JS applications, please see [Opbeat for JS](https://github.com/opbeat/opbeat-js) on GitHub.

**Troubleshooting:** If you encounter any problems setting up the Opbeat
agent, please see our [troubleshooting guide](https://opbeat.com/docs/articles/nodejs-agent-troubleshooting/).


## Quick start

Install the module:

```
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](https://opbeat.com/docs/topics/node-js/)
- [Get started with Express](https://opbeat.com/docs/articles/get-started-with-express/)
- [Get started with hapi](https://opbeat.com/docs/articles/get-started-with-hapi/)
- [Get started with Koa](https://opbeat.com/docs/articles/get-started-with-koa/)
- [Agent API](https://opbeat.com/docs/articles/nodejs-agent-api/)
- [Troubleshooting guide](https://opbeat.com/docs/articles/nodejs-agent-troubleshooting/)
- [Compatibility with other modules](https://github.com/opbeat/opbeat-node/wiki/Compatibility-Guide)
- [Upgrading to v4](https://github.com/opbeat/opbeat-node/wiki/Upgrade-to-version-4.x)

## 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](http://brew.sh).

To run the linter without running any tests, run `npm run lint`. To
automatically fix linting errors run `npm run lint-fix`.

## License

BSD-2-Clause

<br>Made with ♥️ and ☕️ by Opbeat and our community.

---
_Source: https://npm.io/package/opbeat · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
