1. Go to this page and download the library: Download born05/craft-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/ */
born05 / craft-sentry example snippets
return [
'*' => [
'enabled' => true,
'anonymous' => false, // Determines to log user info or not
'clientDsn' => getenv('SENTRY_DSN') ?: 'https://[email protected]/123456789', // Set as string or use environment variable.
'clientKey' => getenv('SENTRY_CLIENT_KEY') ?: 'z987654321a', // https://js.sentry-cdn.com/z987654321a.min.js
'excludedCodes' => ['400', '404', '429'],
'release' => getenv('SENTRY_RELEASE') ?: null, // Release number/name used by sentry.
'reportJsErrors' => false,
'sampleRate' => 1.0,
'ignoreErrors' => [
// Email link Microsoft Outlook crawler compatibility error
// cf. https://forum.sentry.io/t/unhandledrejection-non-error-promise-rejection-captured-with-value/14062
"Non-Error promise rejection captured with value: Object Not Found Matching Id:",
]
],
];
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.