2017 © Pedro Peláez
 

library yii-sentry

The Yii Sentry extension that allows developers to push messages and logs to the Sentry service or your own Sentry server

image

dotzero/yii-sentry

The Yii Sentry extension that allows developers to push messages and logs to the Sentry service or your own Sentry server

  • Friday, October 6, 2017
  • by dotzero
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2,990 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 5 Versions
  • 20 % Grown

The README.md

YiiSentry

Latest Stable Version License, (*1)

YiiSentry is an extension for the Yii PHP framework that allows developers to push messages and logs to the Sentry service or your own Sentry server., (*2)

Requirements:

Install

Via composer:

$ composer require dotzero/yii-sentry
  • Add vendor path to your configuration file, attach component and set properties:
'aliases' => array(
    ...
    'vendor' => realpath(__DIR__ . '/../../vendor'),
),
'components' => array(
    ...
    'sentry' => array(
        'class' => 'vendor.dotzero.yii-sentry.ESentry',
        'sentryDir' => 'vendor.sentry.sentry', // Path alias of the sentry-php directory (optional)
        'enabled' => true, // Enabled or disabled extension (optional)
        'dsn' => '[YOUR_DSN_FROM_SENTRY_SERVER]',
        // Raven PHP options (https://github.com/getsentry/sentry-php#configuration)
        'options' => array(
            'site' => 'example.com',
            'tags' => array(
                'php_version' => phpversion(),
            ),
        ),
    ),
),
  • Add the following to your config file log section to enable ESentryLogRoute:
'routes' => array(
    ...
    array(
        'class' => 'vendor.dotzero.yii-sentry.ESentryLogRoute',
        'levels' => 'error, warning',
    ),
),

Usage:

// To capture Message
$sentry = Yii::app()->sentry;
$sentry->captureMessage('test', array(
    'param1' => 'value1',
    'param2' => 'value2',
));

// To capture Exception
try {
    throw new Exception('Error Processing Request', 1);
} catch (Exception $e) {
    $sentry = Yii::app()->sentry;
    $sentry->captureException($e);
}

License

Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php, (*3)

The Versions

06/10 2017

dev-master

9999999-dev

The Yii Sentry extension that allows developers to push messages and logs to the Sentry service or your own Sentry server

  Sources   Download

MIT

The Requires

 

by Avatar dotzero

extension yii sentry logs

06/10 2017

v1.1.1

1.1.1.0

The Yii Sentry extension that allows developers to push messages and logs to the Sentry service or your own Sentry server

  Sources   Download

MIT

The Requires

 

by Avatar dotzero

extension yii sentry logs

06/10 2017

v1.1.0

1.1.0.0

The Yii Sentry extension that allows developers to push messages and logs to the Sentry service or your own Sentry server

  Sources   Download

MIT

The Requires

 

by Avatar dotzero

extension yii sentry logs

31/08 2017

v1.0.1

1.0.1.0

The Yii Sentry extension that allows developers to push messages and logs to the Sentry service or your own Sentry server

  Sources   Download

MIT

The Requires

 

by Avatar dotzero

extension yii sentry logs

02/05 2016

v1.0.0

1.0.0.0

The Yii Sentry extension that allows developers to push messages and logs to the Sentry service or your own Sentry server

  Sources   Download

MIT

The Requires

 

by Avatar dotzero

extension yii sentry logs