<commit_before>cakephp-sentry
==============

A CakePHP plugin to send errors/exceptions/logs to Sentry (getsentry.com) https://www.getsentry.com<commit_msg>Updating README with installation instructions.<commit_after>CakePHP-Sentry
--------------

A CakePHP plugin to send errors/exceptions/logs to Sentry (getsentry.com) https://www.getsentry.com

Installation
------------

1. Clone the files into `app/Plugin/Sentry` (remember to also get the PHP Raven submodule - `gitsubmodule init` then `git submodule update`)
2. Load the plugin in `app/Config/bootstrap.php` by calling `CakePlugin::load('Sentry');`
3. Setup the plugin as the Error/Exception handler in `app/Config/core.php`
```php
	App::uses('SentryErrorHandler', 'Sentry.Lib');

  Configure::write('Error', array(
    'handler' => 'SentryErrorHandler::handleError',
    'level' => E_ALL & ~E_DEPRECATED,
    'trace' => true
  ));

  Configure::write('Exception', array(
    'handler' => 'SentryErrorHandler::handleException',
    'renderer' => 'ExceptionRenderer',
    'log' => true
  ));
```

4. Place your settings in `app/Config/core.php`
```php
    Configure::write('Sentry', array(
        'DSN' => array(
            // Your private Sentry DSN
            'PHP' => 'http://123456@sentry.com/1'
        ),
        // Configuration for the Sentry user interface - will display a CakePHP logged in user
        'user' => array(
            // Change the model used for the CakePHP user
            'model' => 'CustomUser',
            // Map the fields sent by Sentry to custom fields on the user model
            'fieldMapping' => array(
                'username' => 'custom_username',
                'email' => 'custom_email'
            )
        ),
        'ignoredExceptions' => array('NotFoundException')
    ));
```
{'fraction_non_alphanumeric': 0.15148127445500278, 'fraction_numerical': 0.006148686416992733, 'mean_word_length': 2.8412017167381975, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6213079', 'n_tokens_mistral': 535, 'n_tokens_neox': 515, 'n_words': 148}