Pushes Craft CMS errors to Sentry.
- Search for 'Sentry SDK'.
- Hit install
- Create a config file as explained below.
- Run:
composer require born05/craft-sentry
- Hit install in Admin > Settings > Plugins
- Create a config file as explained below.
- Craft 3.1 or later
- PHP 7.1 at least
Create a config/sentry-sdk.php
config file with the following contents:
<?php
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.
'excludedCodes' => ['400', '404', '429'],
'release' => getenv('SENTRY_RELEASE') ?: null, // Release number/name used by sentry.
'reportJsErrors' => false
],
];
Based upon the sentry plugin by Luke Youell.
Copyright © Born05
See license