🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@bugsnag/node

Package Overview
Dependencies
Maintainers
8
Versions
122
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bugsnag/node

Bugsnag error reporter for Node.js

8.4.0
latest
npm
Version published
Weekly downloads
658K
-5.34%
Maintainers
8
Weekly downloads
 
Created

What is @bugsnag/node?

@bugsnag/node is a comprehensive error monitoring and reporting tool for Node.js applications. It helps developers detect, diagnose, and resolve errors in real-time, ensuring a smoother user experience and more stable application performance.

What are @bugsnag/node's main functionalities?

Error Reporting

This feature allows you to report errors to Bugsnag. By initializing Bugsnag with your API key and using the `notify` method, you can send error details to the Bugsnag dashboard for further analysis.

const Bugsnag = require('@bugsnag/node');
Bugsnag.start({ apiKey: 'YOUR_API_KEY' });

try {
  throw new Error('Something went wrong!');
} catch (e) {
  Bugsnag.notify(e);
}

Breadcrumbs

Breadcrumbs are logs of events that lead up to an error, providing context for debugging. This feature allows you to leave breadcrumbs that will be sent along with error reports.

const Bugsnag = require('@bugsnag/node');
Bugsnag.start({ apiKey: 'YOUR_API_KEY' });

Bugsnag.leaveBreadcrumb('User clicked button', { buttonId: 'submit' });

try {
  throw new Error('Something went wrong!');
} catch (e) {
  Bugsnag.notify(e);
}

Custom Metadata

This feature allows you to add custom metadata to your error reports. This can include any additional information that might be useful for debugging, such as user account details or application state.

const Bugsnag = require('@bugsnag/node');
Bugsnag.start({ apiKey: 'YOUR_API_KEY' });

try {
  throw new Error('Something went wrong!');
} catch (e) {
  Bugsnag.notify(e, event => {
    event.addMetadata('account', {
      id: 1234,
      name: 'Acme Co'
    });
  });
}

Session Tracking

Session tracking helps you understand the stability of your application from the perspective of your users. By starting a session, you can track errors that occur during that session and get insights into user experience.

const Bugsnag = require('@bugsnag/node');
Bugsnag.start({ apiKey: 'YOUR_API_KEY' });

Bugsnag.startSession();

try {
  throw new Error('Something went wrong!');
} catch (e) {
  Bugsnag.notify(e);
}

Other packages similar to @bugsnag/node

FAQs

Package last updated on 18 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts