mito / yii2-sentry
Yii 2 的 Sentry 扩展
1.0.4
2017-11-28 16:52 UTC
Requires
- php: >=5.6.0
- bower-asset/raven-js: ~3.17
- sentry/sentry: ~1.8
- yiisoft/yii2: ~2.0.0
Requires (Dev)
- codeception/codeception: ~2.3
- codeception/mockery-module: ^0.2.2
- codeception/specify: *
- codeception/verify: *
- mito/yii2-coding-standards: ~2.0.0@beta
- satooshi/php-coveralls: ~1.0
- yiisoft/yii2-codeception: ~2.0
README
Sentry 提供了实时崩溃报告,适用于服务器端和客户端的 Web 应用程序。这是一个 Yii 2 扩展,允许您将项目与 Sentry 集成并记录 PHP 和 JavaScript 错误。
由 Mito 提供。
安装
安装此扩展的首选方式是通过 composer。
运行以下命令之一
php composer.phar require --prefer-dist mito/yii2-sentry "~1.0.0"
或者将以下行添加到您的 composer.json
文件的 require 部分
"mito/yii2-sentry": "~1.0.0"
要求
Yii 2 及以上版本。Sentry 8 及以上版本。
您可以使用此扩展与 Sentry 的托管和本地版本。
使用方法
安装扩展后,在公共配置文件中设置您的配置
'components' => [ 'sentry' => [ 'class' => 'mito\sentry\Component', 'dsn' => 'YOUR-PRIVATE-DSN', // private DSN 'environment' => 'staging', // if not set, the default is `production` 'jsNotifier' => true, // to collect JS errors. Default value is `false` 'jsOptions' => [ // raven-js config parameter 'whitelistUrls' => [ // collect JS errors from these urls 'http://staging.my-product.com', 'https://my-product.com', ], ], ], 'log' => [ 'targets' => [ [ 'class' => 'mito\sentry\Target', 'levels' => ['error', 'warning'], 'except' => [ 'yii\web\HttpException:404', ], ], ], ], ],
要跳过在开发环境中收集错误,请使用此参数禁用组件
'components' => [ 'sentry' => [ 'enabled' => false, ], ],
许可证
代码根据 MIT 许可证 发布。
联系方式
如有任何评论或疑问,请通过 info@mito.hu 联系我们。