georgringer/bugsnag

Bugsnag exception handler

Maintainers

Package info

github.com/georgringer/bugsnag

Type:typo3-cms-extension

pkg:composer/georgringer/bugsnag

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 2

Open Issues: 0

12.0 2024-09-02 06:41 UTC

This package is auto-updated.

Last update: 2026-04-09 11:17:35 UTC


README

Requires TYPO3 13 or 14.

Integrates Bugsnag error monitoring into TYPO3 CMS by routing exceptions to the Bugsnag platform.

Originally created and maintained by Michiel Roos — thank you for the great work!

Configuration

General exceptions

Configure the Bugsnag API key in the TYPO3 extension configuration screen, or provide it via environment variable:

BUGSNAG_API_KEY=your-api-key

Set the exception handlers either via the Install Tool or in AdditionalConfiguration.php:

<?php
# AdditionalConfiguration.php

$GLOBALS['TYPO3_CONF_VARS']['SYS']['debugExceptionHandler'] = \GeorgRinger\Bugsnag\Core\Error\DebugExceptionHandler::class;
$GLOBALS['TYPO3_CONF_VARS']['SYS']['productionExceptionHandler'] = \GeorgRinger\Bugsnag\Core\Error\ProductionExceptionHandler::class;

Exceptions thrown by content elements

The content exception handler can be specified in TypoScript. Exceptions that occur during rendering of content objects (typically plugins) are caught by default in production context and a configurable error message is shown in place of the failing element — keeping the rest of the page intact.

# Use 1 for the default exception handler (enabled by default in production context)
config.contentObjectExceptionHandler = 1

# Use a class name for a custom exception handler
config.contentObjectExceptionHandler = GeorgRinger\Bugsnag\ContentObject\Exception\ProductionExceptionHandler

Bugsnag Performance (Site Set)

This extension ships a Site Set (GeorgRinger/bugsnag) that enables Bugsnag Performance Monitoring via a browser module script.

Add the set as a dependency in your site's Set configuration and provide the following settings — either directly or via environment variable:

Setting Description Default
bugsnag.apiKey Bugsnag API key (overrides extension configuration) (empty)
bugsnag.path URL to the Bugsnag Performance JS bundle //d2wy8f7a9ursnm.cloudfront.net/v1/bugsnag-performance.min.js

In config/sites/{site}/settings.yaml:

bugsnag.apiKey: '%env(BUGSNAG_API_KEY)%'

The performance script is only rendered when bugsnag.apiKey is set.

Issues

Please report issues you find.