PHP code example of andersundsehr / sentry-bridge

1. Go to this page and download the library: Download andersundsehr/sentry-bridge library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

andersundsehr / sentry-bridge example snippets


$GLOBALS['TYPO3_CONF_VARS']['SYS']['productionExceptionHandler'] = \Networkteam\SentryClient\ProductionExceptionHandler::class;
$GLOBALS['TYPO3_CONF_VARS']['SYS']['debugExceptionHandler'] = \Networkteam\SentryClient\DebugExceptionHandler::class;
$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['sentry_client']['release'] = trim((string)exec('git rev-parse --verify HEAD'));
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['sentry_client']['options']['transport'] ??= (new \AUS\SentryBridge\Factory\QueueTransportFactory())();
$GLOBALS['TYPO3_CONF_VARS']['LOG']['writerConfiguration'] = [
    \TYPO3\CMS\Core\Log\LogLevel::WARNING => [
        \Networkteam\SentryClient\SentryLogWriter::class => [],
    ],
];