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)7487.4k—6.6%4MITPHPPHP &gt;=7.2

Since Nov 25Pushed 2y 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 1mo 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/7ba1f1e8c7f14050fac561f6b12c2ddc96a6a82d66af50f7d57295674776fc9f/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f68616e6e657376647672656b656e2f67757a7a6c652d70726f66696c65722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/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

38

—

LowBetter than 85% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity41

Moderate usage in the ecosystem

Community11

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 ~598 days

Recently: every ~331 days

Total

6

Last Release

837d 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 (34 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

76410.4k1](/packages/hannesvdvreken-guzzle-debugbar)[kevinrob/guzzle-cache-middleware

A HTTP/1.1 Cache for Guzzle 6. It's a simple Middleware to be added in the HandlerStack. (RFC 7234)

43117.4M104](/packages/kevinrob-guzzle-cache-middleware)[rtheunissen/guzzle-log-middleware

Guzzle middleware to log requests and responses

842.3M17](/packages/rtheunissen-guzzle-log-middleware)[hannesvdvreken/guzzle-clockwork

A Guzzle middleware that logs requests with Clockwork

4557.7k](/packages/hannesvdvreken-guzzle-clockwork)[graham-campbell/guzzle-factory

Provides A Simple Guzzle Factory With Good Defaults

916.4M49](/packages/graham-campbell-guzzle-factory)[eljam/guzzle-jwt-middleware

A jwt authentication middleware for guzzle 6

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

PHPackages © 2026

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