PHP code example of compono-kit / sentry-error-handler
1. Go to this page and download the library: Download compono-kit/sentry-error-handler 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/ */
compono-kit / sentry-error-handler example snippets
use ComponoKit\SentryClient\SentryClient;
use ComponoKit\SentryClient\SentryClientConfig;
use ComponoKit\ErrorHandlers\Sentry\SentryErrorHandler;
$client = new SentryClient(new SentryClientConfig([
'dsn' => 'https://[email protected]/123',
'environment' => 'production',
'release' => '1.4.2',
'error-reporting' => E_ALL,
'display-errors' => false,
]));
$handler = new SentryErrorHandler($client);
$handler->install();