Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@bugsnag/browser
Advanced tools
@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.
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.' });
Rollbar is another error tracking service that offers real-time error reporting and monitoring. It provides features like error grouping, user tracking, and custom metadata, similar to @bugsnag/browser. Rollbar also offers integrations with various development tools and services.
Airbrake is an error monitoring service that captures and reports errors in web applications. It offers features like error reporting, user tracking, and custom metadata, similar to @bugsnag/browser. Airbrake also provides integrations with various development and collaboration tools.
This package contains the browser implementation of the Bugsnag notifier for JavaScript. The normal use case is to install this package via @bugsnag/js
, but you can install it directly if you want to.
This package is free software released under the MIT License. See LICENSE.txt for details.
FAQs
Bugsnag error reporter for browser JavaScript
The npm package @bugsnag/browser receives a total of 596,469 weekly downloads. As such, @bugsnag/browser popularity was classified as popular.
We found that @bugsnag/browser demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 9 open source maintainers collaborating on the project.
Did you know?
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.