MCPcopy Index your code
hub / github.com/bugsnag/bugsnag-js

github.com/bugsnag/bugsnag-js @v8.9.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v8.9.0 ↗ · + Follow
2,668 symbols 6,835 edges 814 files 130 documented · 5% 1 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

  <img alt="SmartBear BugSnag logo" src="https://assets.smartbear.com/m/3945e02cdc983893/original/BugSnag-Repository-Header-Light.svg">


Error monitoring & reporting for JavaScript

Documentation Build status OpenSSF Scorecard

Automatically detect JavaScript errors in the browser, Node.js and React Native, with plugins for React, Vue, Angular, Express, Restify and Koa. Get cross-platform error detection for handled and unhandled errors with real-time error alerts and detailed diagnostic reports.

Learn more about JavaScript error reporting and React Native error reporting from Bugsnag.


This is a monorepo (managed with Lerna containing our universal error reporting client @bugsnag/js, and our React Native client @bugsnag/react-native, along with:

Etc. See packages for a full list of contents.

Getting started

  1. Create a Bugsnag account
  2. Complete the instructions in the integration guide
  3. Report handled exceptions using Bugsnag.notify()
  4. Customize your integration using the configuration options

Integrating with frameworks

Use the following plugins and guides to integrate Bugsnag with various frameworks.

Browser

Framework Bugsnag plugin Documentation
Vue @bugsnag/plugin-vue Vue docs
React @bugsnag/plugin-react React docs
Angular @bugsnag/plugin-angular Angular docs

Desktop

Framework Bugsnag notifier Documentation
Electron @bugsnag/electron Electron docs

Server

Framework Bugsnag plugin Documentation
Koa @bugsnag/plugin-koa Koa docs
Express @bugsnag/plugin-express Express docs
Restify @bugsnag/plugin-restify Restify docs

Mobile

Framework Bugsnag notifier Documentation
React Native @bugsnag/react-native React Native docs

Support

Contributing

Most updates to this repo will be made by Bugsnag employees. We are unable to accommodate significant external PRs such as features additions or any large refactoring, however minor fixes are welcome. See contributing for more information.

Development quick start

# Clone the repository
git clone git@github.com:bugsnag/bugsnag-js.git --recursive
cd bugsnag-js

# Install top-level dependencies
npm i

# Build the standalone notifiers and plugins
npm run build

# Run the unit tests
npm run test:unit

# Run tests for a specific package
npm run test:unit -- --testPathPattern="packages/react-native"

# Generate a code coverage report
npm run test:unit -- --coverage

# Run the linter
npm run test:lint

# Run the typescript compatibility tests
npm run test:types

See contributing for more information.

License

All packages in this repository are released under the MIT License. See LICENSE.txt for details.

Extension points exported contracts — how you extend this code

SendEmail (Interface)
* A binding that allows a Worker to send email messages. [3 implementers]
test/cloudflare-workers/features/fixtures/cloudflare-worker/worker-configuration.d.ts
Plugin (Interface)
(no doc) [2 implementers]
packages/core/types/common.d.ts
Client (Interface)
(no doc) [1 implementers]
packages/plugin-restify/types/bugsnag-restify.d.ts
Client (Interface)
(no doc) [1 implementers]
packages/plugin-cloudflare-workers/types/bugsnag-plugin-cloudflare-workers.d.ts
BrowserWindow (Interface)
(no doc) [1 implementers]
packages/electron-test-helpers/src/BrowserWindow.ts
Client (Interface)
(no doc) [1 implementers]
packages/plugin-aws-lambda/types/bugsnag-plugin-aws-lambda.d.ts
Client (Interface)
(no doc) [1 implementers]
packages/plugin-koa/types/bugsnag-koa.d.ts
Client (Interface)
(no doc) [1 implementers]
packages/plugin-hono/types/bugsnag-hono.d.ts

Core symbols most depended-on inside this repo

notify
called by 304
packages/core/client.js
on
called by 210
packages/electron-test-helpers/src/App.ts
push
called by 201
packages/plugin-electron-deliver-minidumps/minidump-queue.js
_setDelivery
called by 189
packages/core/client.js
getPlugin
called by 177
packages/plugin-vue/types/bugsnag-plugin-vue.d.ts
addMetadata
called by 139
packages/react-native/src/NativeBugsnag.ts
leaveBreadcrumb
called by 130
packages/react-native/src/NativeBugsnag.ts
error
called by 107
test/cloudflare-workers/features/fixtures/cloudflare-worker/worker-configuration.d.ts

Shape

Function 951
Method 846
Interface 457
Class 410
Enum 4

Languages

TypeScript80%
C9%
Java7%
Kotlin3%
Ruby1%
C++1%

Modules by API surface

test/cloudflare-workers/features/fixtures/cloudflare-worker/worker-configuration.d.ts633 symbols
packages/plugin-electron-client-state-persistence/src/deps/parson/parson.c144 symbols
packages/plugin-node-surrounding-code/test/fixtures/04.js66 symbols
packages/core/client.js38 symbols
packages/plugin-electron-client-state-persistence/src/deps/tinycthread/tinycthread.c35 symbols
packages/react-native/android/src/main/java/com/bugsnag/android/BugsnagReactNativeImpl.java27 symbols
packages/core/event.js27 symbols
packages/react-native/android/src/oldarch/java/com/bugsnag/android/BugsnagReactNative.java24 symbols
packages/react-native/android/src/newarch/java/com/bugsnag/android/NativeBugsnagImpl.java24 symbols
test/electron/features/support/server.js22 symbols
packages/react-native/src/NativeBugsnag.ts22 symbols
packages/plugin-electron-ipc/bugsnag-ipc-renderer.js21 symbols

Used by 1 indexed graphs manifest dependencies, hub-wide

For agents

$ claude mcp add bugsnag-js \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact