Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

guandeng/hyperf-telescope

Repository files navigation

⚠️ 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published