jop-software / typo3-sentry-client
Sentry Client for TYPO3
Installs: 1 105
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 1
Open Issues: 14
Type:typo3-cms-extension
Requires
- php: ^7.4 || ^8.0
- php-http/curl-client: ^2.2
- sentry/sentry: ^3.3
- typo3/cms-core: ^11.5
Requires (Dev)
- jop-software/demo-extension: @dev
- phpstan/extension-installer: ^1.1
- phpstan/phpstan: ^1.0
- rector/rector: ^0.12.23
- saschaegerer/phpstan-typo3: ^1.0
- squizlabs/php_codesniffer: ^3.6
- typo3/cms-backend: ^11.5
- typo3/cms-extbase: ^11.5
- typo3/cms-extensionmanager: ^11.5
- typo3/cms-filelist: ^11.5
- typo3/cms-fluid: ^11.5
- typo3/cms-frontend: ^11.5
- typo3/cms-install: ^11.5
- typo3/cms-recordlist: ^11.5
- typo3/cms-rte-ckeditor: ^11.5
- typo3/cms-tstemplate: ^11.5
- typo3/testing-framework: ^5.0 || ^6.4
- typo3fluid/fluid: ^2.5.2
README
This TYPO3 extension allows you to send exceptions that occur in a TYPO3 installation to Sentry.
Professional Support
Professional support is available, please contact info@jop-software.de for more information.
Installation
Install this TYPO3 Extension via composer.
composer require jop-software/typo3-sentry-client
Attention: Installation for non-composer installations on TYPO3 is not supported currently, because we depend on some composer packages. See Issue #4 for more information.
Configuration
Configuration is supported via TYPO3 Extension configuration and environment variables.
See Settings
> Extension Configuration
> typo3_sentry_client
in the TYPO3 backend.
You can overwrite those settings with environment variables:
###> jop-software/typo3-sentry-client SetEnv SENTRY_ACTIVE true SetEnv SENTRY_DSN http://publicKey@your-sentry.tld/projectId SetEnv SENTRY_ENVIRONMENT Production SetEnv SENTRY_TRACES_SAMPLE_RATE 1.0 SetEnv SENTRY_RELEASE 9.10.19 ###< jop-software/typo3-sentry-client
Add the productionExceptionHandler
/ debugExceptionHandler
to your LocalConfiguration.php
or AdditionalConfiguration.php
file.
$GLOBALS['TYPO3_CONF_VARS']['SYS']['productionExceptionHandler'] = 'Jops\TYPO3\Sentry\Handler\ProductionExceptionHandler'; $GLOBALS['TYPO3_CONF_VARS']['SYS']['debugExceptionHandler'] = 'Jops\TYPO3\Sentry\Handler\DebugExceptionHandler';
Multiple Environments
If you use the same .htaccess
file for multiple environments like Production / Development, you can move the
SetEnv SENTRY_ENVIRONMENT Production
into the ApplicationContext
section of the TYPO3 htaccess. e.G.:
# Rules to set ApplicationContext based on hostname RewriteCond %{HTTP_HOST} ^dev\.example\.com$ RewriteRule .? - [E=TYPO3_CONTEXT:Development,E=SENTRY_ENVIRONMENT:Development] RewriteCond %{HTTP_HOST} ^staging\.example\.com$ RewriteRule .? - [E=TYPO3_CONTEXT:Production/Staging,E=SENTRY_ENVIRONMENT:Production-Staging] RewriteCond %{HTTP_HOST} ^www\.example\.com$ RewriteRule .? - [E=TYPO3_CONTEXT:Production,E=SENTRY_ENVIRONMENT:Production]
Local Development
We use DDEV for local development.
With the extension you get a complete TYPO3 DDEV setup. Type ddev start
to start the container.
Headless
If you use EXT:headless, you can use the official @nuxtjs/sentry module for the frontend. There is great documentation available here.
This extension itself can be used together with EXT:headless without any known problems.
License
This project is licensed under GPL-2.0-or-later, see the LICENSE file for more information.