Skip to content

Latest commit

 

History

History
44 lines (34 loc) · 1.53 KB

File metadata and controls

44 lines (34 loc) · 1.53 KB

OctoberCMS Sentry Plugin

This is a sample for how to integrate Sentry's laravel plugin with OctoberCMS.

To install, simply:

  1. Create a new plugin with the php artisan create:plugin command.
  2. Replace the newly created plugin with these files.
  3. Change the namespace 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 package (this will update everything... just a heads up 😃)

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

return [

    /*
    |--------------------------------------------------------------------------
    | Sentry Configuration
    |--------------------------------------------------------------------------
    |
    | Use the Your Sentry DSN!
    |
    */

    'dsn' => '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:

SENTRY_DSN=https://****:*****@sentry.io/*****

License

MIT