PHPackages                             hannesvdvreken/guzzle-profiler - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. hannesvdvreken/guzzle-profiler

ActiveLibrary[HTTP &amp; Networking](/categories/http)

hannesvdvreken/guzzle-profiler
==============================

A Guzzle middleware that profiles requests made by the client.

2.1.0(4y ago)7517.0k↓47.4%4MITPHPPHP &gt;=7.2CI failing

Since Nov 25Pushed 2mo agoCompare

[ Source](https://github.com/hannesvdvreken/guzzle-profiler)[ Packagist](https://packagist.org/packages/hannesvdvreken/guzzle-profiler)[ GitHub Sponsors](https://github.com/sponsors/hannesvdvreken)[ RSS](/packages/hannesvdvreken-guzzle-profiler/feed)WikiDiscussions 2.x Synced 2w ago

READMEChangelog (3)Dependencies (3)Versions (6)Used By (4)

[Guzzle client](http://docs.guzzlephp.org/en/latest/) middleware to profile HTTP requests.
==========================================================================================

[](#guzzle-client-middleware-to-profile-http-requests)

⚠️ This project is up for adoption. Get in touch if you're interested in actively maintaining 3 closely related packages.

[![Build Status](https://camo.githubusercontent.com/ac34ffa9f598f5eaa42e98a58d2f636d52ff47e00b161f69132b42f5ef05532c/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f636f6d2f68616e6e657376647672656b656e2f67757a7a6c652d70726f66696c65722f322e783f7374796c653d666c61742d737175617265)](https://app.travis-ci.com/github/hannesvdvreken/guzzle-profiler/)[![Latest Stable Version](https://camo.githubusercontent.com/926c68a2ed3a4faeccd16ce89d59c47f173632d2a32bdf64756328c50fc56954/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f68616e6e657376647672656b656e2f67757a7a6c652d70726f66696c65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/hannesvdvreken/guzzle-profiler)[![Code Quality](https://camo.githubusercontent.com/014fb7d0f0b444d1ab16c83597657553bccbe845a6ebcb4bc0d494337d4d251f/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f68616e6e657376647672656b656e2f67757a7a6c652d70726f66696c65722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/hannesvdvreken/guzzle-profiler/)[![Code Coverage](https://camo.githubusercontent.com/2708a3f0073409a6f585957e796661487f0228be510f417a95a63a94f5e3a68f/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f68616e6e657376647672656b656e2f67757a7a6c652d70726f66696c65722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/hannesvdvreken/guzzle-profiler/)[![Total Downloads](https://camo.githubusercontent.com/b302308cf6b798f3add0729bb929b013fc2d444b8dfc5f1c1a8649dba98cad19/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f68616e6e657376647672656b656e2f67757a7a6c652d70726f66696c65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/hannesvdvreken/guzzle-profiler)[![License](https://camo.githubusercontent.com/0fe5532db3e8b83bb5dc1ce174508ffb55313f738232e63a98fc257b45d32bb1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f68616e6e657376647672656b656e2f67757a7a6c652d70726f66696c65723f7374796c653d666c61742d737175617265)](#license)

Guzzle Middleware to log made HTTP requests to a timeline for debugging.

Adapter
-------

[](#adapter)

A couple of adapters are available:

- [`hannesvdvreken/guzzle-debugbar`](https://github.com/hannesvdvreken/guzzle-debugbar)
- [`hannesvdvreken/guzzle-clockwork`](https://github.com/hannesvdvreken/guzzle-clockwork)

Usage
-----

[](#usage)

```
// First you need a HandlerStack
$stack = GuzzleHttp\HandlerStack::create();

// Create a middleware by wrapping a profiler (eg: DebugBar's profiler):
/** @var DebugBar\DebugBar $debugBar */
$timeline = $debugBar->getCollector('time');
$profiler = new GuzzleHttp\Profiling\DebugBar\Profiler($timeline);
$middleware = new GuzzleHttp\Profiling\Middleware($profiler);

// Add the Middleware to the stack of middlewares.
$stack->unshift($middleware);

// Then you need to add it to the Guzzle HandlerStack
$stack = GuzzleHttp\HandlerStack::create();

$stack->unshift($middleware);

// Create a Guzzle Client with the new HandlerStack:
$client = new GuzzleHttp\Client(['handler' => $stack]);
```

And you are done! All requests will now be logged to whatever profiler you wrapped.

Contributing
------------

[](#contributing)

Feel free to make a pull request. Please try to be as [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)compliant as possible. Fix Code Style quickly by running `vendor/bin/php-cs-fixer fix`. Give a good description of what is supposed to be added/changed/removed/fixed.

### Testing

[](#testing)

To test your code before pushing, run the unit test suite.

```
vendor/bin/phpunit
```

License
-------

[](#license)

[MIT](LICENSE)

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance56

Moderate activity, may be stable

Popularity40

Moderate usage in the ecosystem

Community12

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~767 days

Recently: every ~542 days

Total

6

Last Release

83d ago

Major Versions

1.x-dev → 2.0.02020-07-17

PHP version history (2 changes)1.0.0PHP &gt;=5.5.0

2.0.0PHP &gt;=7.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1410358?v=4)[Hannes Van De Vreken](/maintainers/hannesvdvreken)[@hannesvdvreken](https://github.com/hannesvdvreken)

---

Top Contributors

[![hannesvdvreken](https://avatars.githubusercontent.com/u/1410358?v=4)](https://github.com/hannesvdvreken "hannesvdvreken (37 commits)")

---

Tags

httplogmiddlewaredebugprofilerGuzzleprofilingtimeline

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/hannesvdvreken-guzzle-profiler/health.svg)

```
[![Health](https://phpackages.com/badges/hannesvdvreken-guzzle-profiler/health.svg)](https://phpackages.com/packages/hannesvdvreken-guzzle-profiler)
```

###  Alternatives

[hannesvdvreken/guzzle-debugbar

A Guzzle middleware that logs requests to debugbar's timeline

76433.4k2](/packages/hannesvdvreken-guzzle-debugbar)[rtheunissen/guzzle-log-middleware

Guzzle middleware to log requests and responses

852.4M19](/packages/rtheunissen-guzzle-log-middleware)[graham-campbell/guzzle-factory

Provides A Simple Guzzle Factory With Good Defaults

927.2M57](/packages/graham-campbell-guzzle-factory)[hannesvdvreken/guzzle-clockwork

A Guzzle middleware that logs requests with Clockwork

4458.1k](/packages/hannesvdvreken-guzzle-clockwork)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

353.6k](/packages/eslazarev-wildberries-sdk)[eljam/guzzle-jwt-middleware

A jwt authentication middleware for guzzle 6

28772.6k3](/packages/eljam-guzzle-jwt-middleware)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
