friendsofhyperf/telescope
Composer 安装命令:
composer require friendsofhyperf/telescope
包简介
An elegant debug assistant for the hyperf framework.
关键字:
README 文档
README
Available Listeners
- Request Monitor
- Exception Monitor
- Data Query Monitor
- gRPC Request Monitor
- Redis Monitor
- Log Monitor
- Command Line Monitor
- Event Monitor
- HTTP Client Monitor
- Cache Monitor
- Scheduled Task Monitor
Installation
composer require friendsofhyperf/telescope
Use the vendor:publish command to publish its public resources
php bin/hyperf.php vendor:publish friendsofhyperf/telescope
Run the migrate command to execute database changes and create the tables required by
Telescope:
php bin/hyperf.php migrate
Usage
Middleware (Optional for gRPC)
Add the middleware in the config/autoload/middlewares.php configuration file
To enable additional gRPC functionality, use the grpc middleware
<?php return [ 'grpc' => [ FriendsOfHyperf\Telescope\Middleware\TelescopeMiddleware::class, ], ];
Note: Request tracking is automatically enabled via the RequestHandledListener. The TelescopeMiddleware is only needed for additional gRPC-specific functionality.
View Dashboard
http://127.0.0.1:9501/telescope
Database Configuration
Manage the database connection configuration in config/autoload/telescope.php. It defaults to
the default connection:
'connection' => env('TELESCOPE_DB_CONNECTION', 'default'),
Tags
You may wish to attach your own custom tags to entries. To do this, use the
Telescope::tag method.
Batch Filtering
You may want to record entries only under certain special conditions. To do this, use the
Telescope::filter method.
Example
use FriendsOfHyperf\Telescope\Telescope; use Hyperf\Event\Contract\ListenerInterface; use Hyperf\Framework\Event\BootApplication; use FriendsOfHyperf\Telescope\IncomingEntry; class TelescopeInitListener implements ListenerInterface { public function listen(): array { return [ BootApplication::class, ]; } public function process(object $event): void { // attach your own custom tags Telescope::tag(function (IncomingEntry $entry) { if ($entry->type === 'request') { return [ 'status:' . $entry->content['response_status'], 'uri:'. $entry->content['uri'], ]; } }); // filter entry Telescope::filter(function (IncomingEntry $entry): bool { if ($entry->type === 'request'){ if ($entry->content['uri'] == 'xxxx') { return false; } } return true; }); } }
friendsofhyperf/telescope 适用场景与选型建议
friendsofhyperf/telescope 是一款 基于 Vue 开发的 Composer 扩展包,目前已累计 5.41k 次下载、GitHub Stars 达 22, 最近一次更新时间为 2023 年 11 月 13 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「debugging」 「swoole」 「hyperf」 「v3.2」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 friendsofhyperf/telescope 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 friendsofhyperf/telescope 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 friendsofhyperf/telescope 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
An async event for hyperf.
A PHP package that takes a snapshot of your application and allows you to retrieve it later to help with debugging.
Laravel Database Query Logger and debug helper.
php hyperf xxljob
annotations-scan-plugin
统计信息
- 总下载量: 5.41k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 22
- 点击次数: 22
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-11-13