Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
@bugsnag/core
Advanced tools
@bugsnag/core is a core library for the Bugsnag error monitoring service. It provides the essential functionality for capturing and reporting errors in your applications. This package is typically used as a dependency for other Bugsnag notifier packages that are specific to different platforms (e.g., JavaScript, React Native, etc.).
Initializing Bugsnag
This code initializes the Bugsnag client with your API key, allowing you to start capturing and reporting errors.
const Bugsnag = require('@bugsnag/core');
const bugsnagClient = Bugsnag.createClient({ apiKey: 'YOUR_API_KEY' });
Notifying Errors
This code sends a notification to Bugsnag about an error. This is useful for capturing and reporting errors that occur in your application.
bugsnagClient.notify(new Error('Test error'));
Adding Metadata
This code adds custom metadata to the error report, which can be useful for providing additional context about the error.
bugsnagClient.notify(new Error('Test error'), event => {
event.addMetadata('account', {
id: 123,
name: 'Acme Co'
});
});
Breadcrumbs
This code leaves a breadcrumb, which is a log of actions that happened before an error occurred. Breadcrumbs help in understanding the sequence of events leading up to an error.
bugsnagClient.leaveBreadcrumb('User clicked button', { buttonName: 'Submit' });
Sentry is another popular error tracking and monitoring service. It provides similar functionalities to Bugsnag, such as capturing and reporting errors, adding metadata, and breadcrumbs. Sentry also offers additional features like performance monitoring and release tracking.
Rollbar is an error monitoring service that provides real-time error tracking and debugging tools. It offers similar functionalities to Bugsnag, including error notification, metadata addition, and breadcrumbs. Rollbar also provides features like deployment tracking and error grouping.
Airbrake is an error monitoring service that helps you track and fix errors in your applications. It offers similar functionalities to Bugsnag, such as error notification, metadata addition, and breadcrumbs. Airbrake also provides features like performance monitoring and error grouping.
This package contains the core classes and utilities common to the Bugsnag notifier for any JS-based platform:
Client
classReport
classBreadcrumb
classSession
classconfig
scheme and utilsUnless you are writing your own notifier, it is unlikely that you want to install this module – for the universal error reporting client, see @bugsnag/js.
MIT
FAQs
Core classes and utilities for Bugsnag notifiers
The npm package @bugsnag/core receives a total of 621,775 weekly downloads. As such, @bugsnag/core popularity was classified as popular.
We found that @bugsnag/core 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
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.