Skip to content

jarydkrish/oc-sentry-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

💂‍♂️ Sentry plugin for OctoberCMS

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages