sxlxnyw/hyperf-sentry

V2.2.3 2021-08-21 03:17 UTC

README

说明

sentry/sdk 中导出都是静态属性,这个些操作在 swoole 的携程环境中会出现数据异常,所以涉及到的部分都需要 rewrite, 因为 sentry/sdk 中的类大部分都是 final 的。

版本

主版本和 hyperf 保持一致

version hyperf version 说明
0.1.* 1.1.* -
2.0.* 2.0.* -
2.1.* 2.1.* -

使用

  1. 配置文件

发布: php bin/hyperf.php vendor:publish minbaby/hyperf-sentry

然后在 .env 中添加 SENTRY_DSN=

  1. 注册 SentryExceptionHandler
return [
    'handler' => [
        'http' => [
            Minbaby\HyperfSentry\SentryExceptionHandler::class,
            App\Exception\Handler\AppExceptionHandler::class,
        ],
    ],
];

参考