https://github.com/jop-software/typo3-sentry-client
Use Sentry to track down errors in your TYPO3 installation!
https://github.com/jop-software/typo3-sentry-client
hacktoberfest sentry sentry-client sentry-integration typo3 typo3-cms typo3-cms-extension typo3-extension
Last synced: about 1 year ago
JSON representation
Use Sentry to track down errors in your TYPO3 installation!
- Host: GitHub
- URL: https://github.com/jop-software/typo3-sentry-client
- Owner: jop-software
- License: gpl-2.0
- Created: 2021-09-18T05:21:50.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-08-21T18:43:09.000Z (almost 3 years ago)
- Last Synced: 2024-04-25T04:42:44.735Z (about 2 years ago)
- Topics: hacktoberfest, sentry, sentry-client, sentry-integration, typo3, typo3-cms, typo3-cms-extension, typo3-extension
- Language: PHP
- Homepage: https://extensions.typo3.org/extension/typo3_sentry_client
- Size: 140 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TYPO3 Sentry Client
This TYPO3 extension allows you to send exceptions that occur in a TYPO3 installation to Sentry.
---
[](https://github.com/jop-software/typo3-sentry-client/actions/workflows/ci.yaml)
## Professional Support
Professional support is available, please contact [info@jop-software.de](mailto:info@jop-software.de) for more information.
## Installation
Install this TYPO3 Extension via composer.
```console
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](https://github.com/jop-software/typo3_sentry_client/issues/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:
```apacheconf
###> 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
SetEnv SENTRY_ERROR_LEVEL 32767 # See https://www.php.net/manual/en/errorfunc.constants.php
###< jop-software/typo3-sentry-client
```
Add the `productionExceptionHandler` / `debugExceptionHandler` to your `LocalConfiguration.php` or `AdditionalConfiguration.php`file.
```php
$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
```apacheconf
SetEnv SENTRY_ENVIRONMENT Production
```
into the `ApplicationContext` section of the TYPO3 htaccess. e.G.:
```apacheconf
# 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](https://ddev.readthedocs.io/en/stable/) 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](https://github.com/TYPO3-Initiatives/headless), you can use the official [@nuxtjs/sentry](https://www.npmjs.com/package/@nuxtjs/sentry) module for the frontend.
There is great documentation available [here](https://sentry.nuxtjs.org/).
This extension itself can be used together with [EXT:headless](https://github.com/TYPO3-Initiatives/headless) without any known problems.
## License
This project is licensed under [GPL-2.0-or-later](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html), see the [LICENSE](./LICENSE) file for more information.