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,二选一即可。
# 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
https://127.0.0.1:9509/telescope/requests