https://github.com/jarydkrish/oc-sentry-plugin
:guardsman: Sentry plugin for OctoberCMS
https://github.com/jarydkrish/oc-sentry-plugin
octobercms-plugin
Last synced: 10 days ago
JSON representation
:guardsman: Sentry plugin for OctoberCMS
- Host: GitHub
- URL: https://github.com/jarydkrish/oc-sentry-plugin
- Owner: jarydkrish
- License: mit
- Created: 2017-02-09T20:07:03.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-26T20:54:54.000Z (about 9 years ago)
- Last Synced: 2026-03-29T14:33:23.488Z (3 months ago)
- Topics: octobercms-plugin
- Language: PHP
- Size: 4.88 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OctoberCMS Sentry Plugin
This is a sample for how to integrate [Sentry's](https://sentry.io) [laravel plugin](https://github.com/getsentry/sentry-laravel) with OctoberCMS.
To install, simply:
1. [Create a new plugin](https://octobercms.com/docs/console/scaffolding#scaffold-create-plugin) with the `php artisan create:plugin` command.
2. Replace the newly created plugin with these files.
3. Change the [`namespace`](Plugin.php#L1) in the `Plugin.php` file to reflect your new plugin author/name.
4. Run `composer update --prefer-stable` in the main repo to install the [sentry-laravel](https://github.com/getsentry/sentry-laravel) package (this will update everything... just a heads up :smiley:)
## Configuration
You will need to add either a **configuration file**, or a **`.env` file** to use this plugin.
### Using an configuration file
Create a file in your main October directory, `config/sentry.php`, with the following contents:
```php
'https://****:*****@sentry.io/***',
'breadcrumbs.sql_bindings' => true, # Could be insecure!
'release' => trim(exec('git log --pretty="%h" -n1 HEAD')),
];
```
### Using an environment variable
Just add your Sentry DSN to your `.env` file, like so:
```sh
SENTRY_DSN=https://****:*****@sentry.io/*****
```
## License
[MIT](LICENSE)