web-and-cow/wac-sentry

Plugin to connect a CakePHP project to your Sentry account

Installs: 6 281

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:cakephp-plugin

2.0.2 2020-07-07 14:10 UTC

This package is auto-updated.

Last update: 2024-04-21 20:20:38 UTC


README

Plugin CakePHP to connect a CakePHP project to your Sentry account.

You can find IP of client and users.id in the Sentry issue.

Installation

You can install this plugin into your CakePHP application using composer.

The recommended way to install composer packages is :

CakePHP 3

composer require web-and-cow/wac-sentry:"^1.0.0"

CakePHP 4

composer require web-and-cow/wac-sentry:"^2.0.0"

Load the plugin :

CakePHP 3

bin/cake plugin load WacSentry -b

CakePHP 4

bin/cake plugin load WacSentry

And add the configuration to your app.php :

'Sentry' => [
    'dsn' => 'https://XXXXXXXXXX@sentry.io/XXXXXX', // The DSN PHP Key of Sentry
    'avoid_bot_scan_errors' => true, // Default true : if true, MissingControllerException and MissingPluginException aren't sent to Sentry to avoid bot scan errors
    'userFields' => [ // List of user session values sent to Sentry
        'id',
        'role',
        ...
    ],
    'unauthorizedWordsInUrl' => [ // If a word of this array is in the url, the error event will not be sent to Sentry
        'robots.txt',
        'wp-admin',
        ...
    ]
]