PHPackages                             ashsmith/magento-bugsnag-notifier-module - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. ashsmith/magento-bugsnag-notifier-module

AbandonedArchivedMagento2-module[Logging &amp; Monitoring](/categories/logging)

ashsmith/magento-bugsnag-notifier-module
========================================

Bugsnag Notifier for Magento 2

2.1.0(5y ago)32.5k2[3 issues](https://github.com/ashsmith/magento-bugsnag-notifier-module/issues)MITPHP

Since Feb 25Pushed 5y ago1 watchersCompare

[ Source](https://github.com/ashsmith/magento-bugsnag-notifier-module)[ Packagist](https://packagist.org/packages/ashsmith/magento-bugsnag-notifier-module)[ RSS](/packages/ashsmith-magento-bugsnag-notifier-module/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (7)Dependencies (7)Versions (12)Used By (0)

Magento 2 Bugsnag Notifier
==========================

[](#magento-2-bugsnag-notifier)

[![phpcs](https://github.com/ashsmith/magento-bugsnag-notifier-module/workflows/phpcs/badge.svg)](https://github.com/ashsmith/magento-bugsnag-notifier-module/workflows/phpcs/badge.svg)

This module integrates the [Bugsnag](https://www.bugsnag.com) notifier into Magento's exception handling. Any exception that is left unhandled and eventually caught within the `Magento\Framework\App\Bootstrap::run` method will then be notified to Bugsnag.

This works by using two plugins (interceptors) that are placed before the `launch` and `catchException` methods on any class that implement the `Magento\Framework\AppInterface` interface. Within the `beforeLaunch` plugin Bugsnag is initialised. You can optionally start a session which enables Bugsnag's [stability score](https://www.bugsnag.com/product/stability-score) (requires their Standard package).

Installation
------------

[](#installation)

```
composer require ashsmith/magento-bugsnag-notifier-module ^2.0.0
bin/magento setup:upgrade

```

Configuration
-------------

[](#configuration)

To configure the Bugsnag Notifier you have two options:

1. Use the following environment variables:

- `BUGSNAG_ENABLED=1` 1 or 0 to enable/disable.
- `BUGSNAG_API_KEY=[your api key]`
- `BUGSNAG_ENDPOINT=[custom host if required]` (optional)
- `BUGSNAG_RELEASE_STAGE=[your environment/release stage (production/staging etc)`
- `BUGSNAG_SESSION_TRACKING=enabled` (Optional. Requires Bugsnag Standard package)

2. Add the following configuration to: `app/etc/env.php`

```
return [
    ...
    'bugsnag' => [
        'enabled' => '1',
        'api_key' => 'YOUR API KEY',
        'endpoint' => 'custom endpoint if required',
        'release_stage' => 'production',
        'session_tracking' => 'enabled',
    ]
]
```

Extending Bugsnag Metadata
--------------------------

[](#extending-bugsnag-metadata)

If you wish to send additional data to Bugsnag that may help debug your Magento application, there are two events dispatched by this module which can be used to add additional metadata.

### Event: `bugsnag_init`

[](#event-bugsnag_init)

`bugsnag_init` is dispatched when the module first initialises Bugsnag and a session is started. You'll be able to retrieve the Bugsnag client by doing: `$observer->getData('client')` which will give you an instance of `\Bugsnag\Client`. From there adding metadata can be done like so:

```
/** @var \Bugsnag\Client $client */
$client = $observer->getData('client');
$client->setMetaData([
    'app' => [
        'new_property' => 'new_value'
    ]
]);
```

Alternatively you can register a callback which will be executed when an exception occurs to add additional information to the report:

```
/** @var \Bugsnag\Client $client */
$client = $observer->getData('client');
$client->registerCallback(function (\Bugsnag\Report $report) {
    $report->setMetaData([
        'app' => [
            'new_property' => 'new_value'
        ]
    ]);
});
```

### Event: `bugsnag_add_customer_data`

[](#event-bugsnag_add_customer_data)

This event allows you add additional customer data to the exception report, you can fetch the current customer data object by calling: `$observer->getData('data')`.

This is an instance of `\Magento\Framework\DataObject`, so you can use the `setData` and `getData` properties to modify the object.

By default the module will only send the customers: ID, customer group, and a boolean whether or not they are logged in.

###  Health Score

27

—

LowBetter than 46% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~62 days

Recently: every ~108 days

Total

8

Last Release

1928d ago

Major Versions

1.0.5 → 2.0.02020-04-06

### Community

Maintainers

![](https://www.gravatar.com/avatar/bd862d92b4f567515049ad0b839cd52a62750910464c77671d62c026842bbe7e?d=identicon)[ashsmith](/maintainers/ashsmith)

---

Top Contributors

[![ashsmith](https://avatars.githubusercontent.com/u/1086841?v=4)](https://github.com/ashsmith "ashsmith (20 commits)")

---

Tags

magentomagento2magento2-module

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ashsmith-magento-bugsnag-notifier-module/health.svg)

```
[![Health](https://phpackages.com/badges/ashsmith-magento-bugsnag-notifier-module/health.svg)](https://phpackages.com/packages/ashsmith-magento-bugsnag-notifier-module)
```

###  Alternatives

[mollie/magento2

Mollie Payment Module for Magento 2

1142.0M17](/packages/mollie-magento2)[loki/magento2-components

Core module for defining Alpine.js components with advanced AJAX features

1015.1k29](/packages/loki-magento2-components)[fastly/magento2

Fastly CDN Module for Magento 2.4.x

1564.5M1](/packages/fastly-magento2)[buckaroo/magento2

Buckaroo Magento 2 extension

32426.0k8](/packages/buckaroo-magento2)[zwernemann/module-withdrawal

Magento 2 EU Withdrawal Button Module - Adds a withdrawal/revocation button for orders in compliance with EU Directive (EU) 2023/2673

2610.9k2](/packages/zwernemann-module-withdrawal)[loki/magento2-admin-components

Admin Panel grids and forms created via Loki Components

178.3k9](/packages/loki-magento2-admin-components)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
