geo6/zend-expressive-sentry
Composer 安装命令:
composer require geo6/zend-expressive-sentry
包简介
Zend Expressive ErrorHandler able to send error to Sentry.io
README 文档
README
This library enables Zend Expressive to send errors and exceptions to Sentry.io.
Install
composer require geo6/zend-expressive-sentry
Configuration
Create a sentry.global.php file in your config directory with your correct DSN (and options, if necessary):
<?php declare(strict_types=1); return [ 'sentry' => [ 'dsn' => 'https://xxxxx@sentry.io/12345', ], ];
Usage
To enable it, you just have to add Geo6\Expressive\Sentry\ConfigProvider::class to your main configuration (usually config/config.php):
...
$aggregator = new ConfigAggregator([
+ Geo6\Expressive\Sentry\ConfigProvider::class,
...
], $cacheConfig['config_cache_path']);
...
The Sentry ErrorHandler will be active only in "production mode" (when $config['debug] is false).
To switch to "production mode", you can use composer run development-disable.
This library was inspired by stickeeuk/zend-expressive-sentry.
The main difference is that this library uses the last version of the PHP SDK.
统计信息
- 总下载量: 22
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0-or-later
- 更新时间: 2019-08-19