承接 friendsofhyperf/telescope 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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 我们能提供哪些服务?
定制开发 / 二次开发

基于 friendsofhyperf/telescope 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 5.41k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 22
  • 点击次数: 22
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 22
  • Watchers: 2
  • Forks: 2
  • 开发语言: Vue

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-11-13