Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
@bugsnag/node
Advanced tools
@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.
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);
}
Sentry is another popular error tracking and monitoring tool. It provides similar functionalities to Bugsnag, such as error reporting, breadcrumbs, and custom metadata. Sentry also offers performance monitoring and release tracking, which can be beneficial for more comprehensive application monitoring.
Rollbar is an error monitoring and alerting tool that helps developers track and fix errors in real-time. It offers features like error grouping, real-time alerts, and detailed error reports. Rollbar also supports a wide range of programming languages and frameworks, making it a versatile choice for error monitoring.
Airbrake provides error monitoring and performance management for web applications. It offers features like error aggregation, real-time notifications, and detailed error reports. Airbrake is known for its simplicity and ease of integration, making it a good choice for smaller teams or projects.
This package contains the Node.js 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.
[8.0.0] - 2024-08-29
As well as some bug fixes and breaking changes described in the Upgrade Guide, this major SDK release has the following key features:
Bugsnag
client can now be used to call SDK methods in the context of the current requestBugsnag.notify
#1861pushState
or replaceState
no longer triggers a new session when autoTrackSessions
is enabled #1820request
metadata field in network breadcrumbs has been renamed to url
and is no longer pre-pended with the HTTP method #1988method
metadata field to network breadcrumbs #1988duration
metadata field to network breadcrumbs #1903FAQs
Bugsnag error reporter for Node.js
The npm package @bugsnag/node receives a total of 646,218 weekly downloads. As such, @bugsnag/node popularity was classified as popular.
We found that @bugsnag/node 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.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.