Download the PHP package muhammadhuzaifa/telescope-guzzle-watcher without Composer

On this page you can find all versions of the php package muhammadhuzaifa/telescope-guzzle-watcher. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package telescope-guzzle-watcher

We Stand With Palestine, Pakistan Stand With Palestine

StandWithPalestine

Telescope Guzzle Watcher

Latest Version on Packagist GitHub Tests Action Status Total Downloads


Telescope Guzzle Watcher provide a custom watcher for intercepting http requests made via guzzlehttp/guzzle php library. The package uses the on_stats request option for extracting the request/response data. The watcher intercept and log the request into the Laravel Telescope HTTP Client Watcher.

Once the installation and configurations are completed, you will be able to see the request logs under telescope/client-requests

Table of Contents

Requirements

Installation

Install the package via Composer:

Laravel's package auto-discovery will register the service provider for you. No manual provider entry is required unless auto-discovery is disabled.

After the package is installed, publish the configuration file so that you can tweak the watcher defaults:

The published file lives at config/telescope-guzzle-watcher.php.

How It Works

  1. Client Hijacking via the Container – The package binds GuzzleHttp\Client in the service container to a custom Guzzle Client Factory. Every time a client is resolved from the container, the factory injects an on_stats callback that forwards request and response information to Telescope.
  2. Transfer Stats Hook – Guzzle fires the on_stats callback when a request completes (successfully or not). The watcher converts the raw PSR-7 request/response objects into Laravel's Illuminate\Http\Client\Request and Response wrappers so that Telescope can index the payload.
  3. Telescope Recording – When Telescope is actively recording, the watcher forwards each HTTP transfer to the client-requests panel, applying configuration such as tag extraction, payload truncation, and header redaction.

Because the watcher is a first-class Telescope watcher, it benefits from all Telescope filters, tags, and search capabilities right out of the box.

Configuration Reference

The configuration file ships with the following options:

Key Type Default Description
except_request_headers array<string> [] Header names (case-insensitive) that should be hidden from Telescope for outgoing requests. Useful for API keys or authorization tokens.
except_response_headers array<string> [] Header names that should be hidden from Telescope responses.
enable_uri_tags bool true When true, the watcher will explode the request URI into segments and push them as Telescope tags (host, followed by each non-empty path segment).
exclude_words_from_uri_tags array<string> [] List of words that should be excluded from the tag list after it is generated. Matching is case-insensitive.
size_limit int|null null Overrides Telescope's default 64 KB payload truncation limit when set. Provide the value in kilobytes. null defers to Telescope's own limit.

Tweak these settings in config/telescope-guzzle-watcher.php and cache your configuration if your deployment workflow requires it (php artisan config:cache).

Registering the Watcher

Tell Telescope to use this watcher by updating your config/telescope.php file:

Set the value to true to enable it or to a configuration array if you want to supply watcher-specific options in-line (for example, to disable it per-environment using a closure).

Resolving Guzzle Clients

For the watcher to intercept traffic you must resolve Guzzle clients through Laravel's service container:

If you already provide an on_stats callback, the factory will wrap it so both Telescope and your callback execute.

Using Multiple Clients

The watcher supports any number of clients or middleware stacks as long as they are resolved through the container. A few patterns you may find useful:

Integration Example: HubSpot PHP SDK

The HubSpot PHP SDK ships with a Pluggable HTTP client stack. To hook it into Telescope you only need to hand it a Guzzle client from the container.

  1. Install the SDK

  2. Bind a HubSpot client that reuses the Telescope-aware Guzzle client

    Adjust the configuration array to include proxies, retry middleware, or any other Guzzle options your integration needs.

  3. Use the client

    Each call will now appear in Telescope under Client Requests, tagged with api.hubapi.com and the path segments (unless you disable URI tagging).

Tip: HubSpot APIs enforce rate limits. Telescope will record both successful responses and 429 errors so you can diagnose throttling in development.

Testing & Verification

  1. Run a request through your application that uses the container-resolved Guzzle client.
  2. Visit https://your-app.test/telescope/client-requests (or the path configured for Telescope) to verify the entry.
  3. Adjust configuration options and clear caches as needed.

Automated testing tips:

Troubleshooting

Changelog

Please see CHANGELOG for more information on what has changed recently.

Credits

Other Projects

License

The MIT License (MIT). Please see License File for more information.


All versions of telescope-guzzle-watcher with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
guzzlehttp/guzzle Version ^7.9
illuminate/contracts Version ^12.0|^13.0
laravel/telescope Version ^5.11
spatie/laravel-package-tools Version ^1.92
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package muhammadhuzaifa/telescope-guzzle-watcher contains the following files

Loading the files please wait ...