georgringer / bugsnag
Bugsnag exception handler
Package info
github.com/georgringer/bugsnag
Type:typo3-cms-extension
pkg:composer/georgringer/bugsnag
Fund package maintenance!
Requires
- bugsnag/bugsnag: ^3.29
- typo3/cms-core: ^12
Replaces
- typo3-ter/bugsnag: 12.0
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.