1. Go to this page and download the library: Download jackshadow/yii2-sentry 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/ */
jackshadow / yii2-sentry example snippets
'components' => [
'sentry' => [
'class' => 'mito\sentry\Component',
'dsn' => 'YOUR-PRIVATE-DSN', // private DSN
'environment' => 'staging', // if not set, the default is `production`
'jsNotifier' => true, // to collect JS errors. Default value is `false`
'jsOptions' => [ // raven-js config parameter
'whitelistUrls' => [ // collect JS errors from these urls
'http://staging.my-product.com',
'https://my-product.com',
],
],
],
'log' => [
'targets' => [
[
'class' => 'mito\sentry\Target',
'levels' => ['error', 'warning'],
'except' => [
'yii\web\HttpException:404',
],
],
],
],
],