Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
@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
classEvent
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.
This package is free software released under the MIT License. See LICENSE.txt for details.
v7.9.0 (2021-03-16)
ctx.request.body
is present on the event's request property by collecting it at the last possible moment #1292os_proc_available_memory
runtime link error on Mac Catalyst. bugsnag-cocoa#1025osName
and osVersion
for errors reported from app extensions that do not link against UIKit. bugsnag-cocoa#1022freeMemory
for errors reported via notify()
bugsnag-cocoa#1021FAQs
Core classes and utilities for Bugsnag notifiers
The npm package @bugsnag/core receives a total of 290,607 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.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.