Skip to content

autoxloo/yii2-sentry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Yii2 wrap of Sentry PHP SDK

Yii2 wrap of Sentry PHP SDK

Note: This package is not supported properly

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist autoxloo/yii2-sentry "*"

or

composer require --prefer-dist autoxloo/yii2-sentry "*"

or add

"autoxloo/yii2-sentry": "*"

to the require section of your composer.json file.

Config

In your application config add:

// ...
'components' => [
        // ...
        'sentry' => [
            'class' => \autoxloo\yii2\sentry\SentryComponent::class,
            'ravenDsn' => 'https://0000000000000000000@sentry.io/000000',          // Your sentry dsn
            'allowCaptureMessage' => true,
        ],
],

Usage

Once the extension is installed, simply use it in your code by:

\Yii::$app->sentry->getRavenClient()->captureMessage('some message');

or

\Yii::$app->sentry->captureMessage('some message');

Note: In last example captures message only if allowCaptureMessage is true.

See sentry docs for more details https://docs.sentry.io/clients/php/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages