Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bugsnag/browser

Package Overview
Dependencies
Maintainers
9
Versions
134
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bugsnag/browser

Bugsnag error reporter for browser JavaScript

  • 8.0.0-alpha.7
  • npm
  • Socket score

Version published
Weekly downloads
510K
decreased by-24.23%
Maintainers
9
Weekly downloads
 
Created

What is @bugsnag/browser?

@bugsnag/browser is a JavaScript library for capturing and reporting errors in web applications. It helps developers monitor and track errors in real-time, providing detailed reports that include stack traces, user information, and other contextual data to help diagnose and fix issues quickly.

What are @bugsnag/browser's main functionalities?

Error Reporting

This feature allows you to capture and report errors that occur in your application. By initializing the Bugsnag client with your API key, you can use the `notify` method to send error reports to Bugsnag.

const bugsnagClient = bugsnag('YOUR_API_KEY');

try {
  // Code that may throw an error
} catch (e) {
  bugsnagClient.notify(e);
}

Breadcrumbs

Breadcrumbs are a way to log events leading up to an error, providing context that can help diagnose the issue. This feature allows you to leave breadcrumbs that will be included in error reports.

const bugsnagClient = bugsnag('YOUR_API_KEY');

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

User Information

This feature allows you to attach user information to error reports, making it easier to identify and address issues affecting specific users.

const bugsnagClient = bugsnag('YOUR_API_KEY');

bugsnagClient.setUser('12345', 'user@example.com', 'John Doe');

Custom Metadata

Custom metadata allows you to include additional contextual information in your error reports. This can be useful for debugging and understanding the state of your application when the error occurred.

const bugsnagClient = bugsnag('YOUR_API_KEY');

bugsnagClient.addMetadata('account', { id: '12345', name: 'Acme Co.' });

Other packages similar to @bugsnag/browser

FAQs

Package last updated on 03 Apr 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc