guandeng / hyperf-telescope
This package is abandoned and no longer maintained.
No replacement package was suggested.
An elegant debug assistant for the hyperf framework.
1.0.6
2023-11-09 02:41 UTC
Requires
- php: >=8.0
- hyperf/event: *
- hyperf/framework: ^3.0.0
- hyperf/support: *
- hyperf/view: *
- hyperf/view-engine: *
- ramsey/uuid: ^4.7
Suggests
- ext-swoole: Required to use swoole engine.
- hyperf/command: Required to use Command annotation.
- hyperf/database: Required to use Database annotation.
- hyperf/db-connection: Required to use db-connection annotation.
- hyperf/dispatcher: Required to use BootApplication event.
- hyperf/event: Required to use Event annotation.
- hyperf/http-message: Required to use http-message annotation.
README
⚠️ This repository has been archived and is no longer actively maintained. The code has been moved to https://github.com/friendsofhyperf/telescope.
Hyperf-telescope
hyperf 版本的望远镜
功能点
- 记录request请求
- 记录异常错误
- 记录sql语句
- 记录grpc service请求
- 记录redis
- 记录log
- 记录command
- 记录event
- 记录http client
安装组件
composer require guandeng/hyperf-telescope:dev-main
发布配置
php bin/hyperf.php vendor:publish guandeng/hyperf-telescope
添加监听器(请求端)
<?php // config/autoload/listeners.php return [ Guandeng\Telescope\Listener\RequestHandledListener::class, ];
添加中间件
<?php // config/autoload/middlewares.php return [ 'grpc' => [ Guandeng\Telescope\Middleware\TelescopeMiddleware::class, ], ];
TelescopeMiddleware 与 RequestHandledListener,二选一即可。
修改.env
# telescope TELESCOPE_DB_CONNECTION=default TELESCOPE_ENABLE_REQUEST=true TELESCOPE_ENABLE_COMMAND=true TELESCOPE_ENABLE_GRPC=true TELESCOPE_ENABLE_LOG=true TELESCOPE_ENABLE_REDIS=true TELESCOPE_ENABLE_EVENT=true TELESCOPE_ENABLE_EXCEPTION=true TELESCOPE_ENABLE_JOB=true TELESCOPE_ENABLE_DB=true TELESCOPE_ENABLE_GUZZLE=true TELESCOPE_SERVER_ENABLE=true
访问地址
http://127.0.0.1:9509/telescope/requests