friendsofhyperf / telescope
An elegant debug assistant for the hyperf framework.
Package info
github.com/friendsofhyperf/telescope
Language:Vue
pkg:composer/friendsofhyperf/telescope
Requires
- friendsofhyperf/ipc-broadcaster: ~3.2.0
- hyperf/command: ~3.2.0
- hyperf/event: ~3.2.0
- hyperf/framework: ~3.2.0
- hyperf/redis: ~3.2.0
- hyperf/support: ~3.2.0
- nesbot/carbon: ^2.71 || ^3.0
- ramsey/uuid: ^4.7
Suggests
- guzzlehttp/guzzle: Required to use Guzzle annotation.(^6.0|^7.0)
- hyperf/command: Required to use Command annotation.(~3.2.0)
- hyperf/database: Required to use Database annotation.(~3.2.0)
- hyperf/db-connection: Required to use db-connection annotation.(~3.2.0)
- hyperf/dispatcher: Required to use BootApplication event.(~3.2.0)
- hyperf/event: Required to use Event annotation.(~3.2.0)
- hyperf/http-message: Required to use http-message annotation.(~3.2.0)
This package is auto-updated.
Last update: 2026-06-17 01:08:12 UTC
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; }); } }