PHPackages                             keerill/guzzle-clockwork - 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. keerill/guzzle-clockwork

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

keerill/guzzle-clockwork
========================

A Guzzle middleware that logs requests with Clockwork

v1.0.6(2y ago)0768MITPHPPHP &gt;=8.1

Since Oct 3Pushed 2y agoCompare

[ Source](https://github.com/popkovkirill/guzzle-clockwork)[ Packagist](https://packagist.org/packages/keerill/guzzle-clockwork)[ RSS](/packages/keerill-guzzle-clockwork/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (6)Dependencies (8)Versions (7)Used By (0)

[Guzzle](http://docs.guzzlephp.org/en/latest/) middleware for [Clockwork](https://github.com/itsgoingd/clockwork) logging
=========================================================================================================================

[](#guzzle-middleware-for-clockwork-logging)

[![Build Status](https://camo.githubusercontent.com/365feafcbe306e2a611df6fec8508e11e576355d1e5df245b6688157a4a8016e/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6b656572696c6c2f67757a7a6c652d636c6f636b776f726b2f332e783f7374796c653d666c61742d737175617265)](https://travis-ci.org/hannesvdvreken/guzzle-clockwork)[![Latest Stable Version](https://camo.githubusercontent.com/c4df783c5a19753ca099388c017a748d86b11e37d351454ae07cc0833d64b10f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b656572696c6c2f67757a7a6c652d636c6f636b776f726b3f7374796c653d666c61742d737175617265)](https://packagist.org/packages/hannesvdvreken/guzzle-clockwork)[![Code Quality](https://camo.githubusercontent.com/39d4863e77cad88b4c58abea2e187a1b8880bd936baa46e76ef6b81365baf3bd/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6b656572696c6c2f67757a7a6c652d636c6f636b776f726b3f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/hannesvdvreken/guzzle-clockwork/)[![Code Coverage](https://camo.githubusercontent.com/53f4bc4f7d31ca06967b0ca37196ba7d616966d187f6f7d7ff9588e784a534ce/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6b656572696c6c2f67757a7a6c652d636c6f636b776f726b3f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/hannesvdvreken/guzzle-clockwork/)[![Total Downloads](https://camo.githubusercontent.com/46fb1dd71d604a34be9e5a68cae428026f363c585d728a348c666cde708750fd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b656572696c6c2f67757a7a6c652d636c6f636b776f726b3f7374796c653d666c61742d737175617265)](https://packagist.org/packages/hannesvdvreken/guzzle-clockwork)[![License](https://camo.githubusercontent.com/b2d408fa966581cfcd92197e208454eeb3e86c9f3956933ea74bf72e285218bf/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6b656572696c6c2f67757a7a6c652d636c6f636b776f726b3f7374796c653d666c61742d737175617265)](#license)

Guzzle middleware for logging requests clockwork's timeline so you can view the timeline in your browser's developer tools.

[![Developer tools timeline](images/clockwork-timeline.png "Developer tools timeline")](images/clockwork-timeline.png)

Usage
-----

[](#usage)

Composer install

```
composer require keerill/guzzle-clockwork
```

```
// First you need a Clockwork object
$clockwork = \Clockwork\Support\Vanilla\Clockwork::init();

// Create the Guzzle middleware
$middleware = new \GuzzleHttp\Profiling\Middleware(
    new \GuzzleHttp\Profiling\Clockwork\Profiler($clockwork->getClockwork()->timeline())
);

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

$stack->unshift($middleware);

$client = new \GuzzleHttp\Client(['handler' => $stack]);

$client->get('https://httpbin.org/status/418');
```

Depending on your integration of Clockwork, make sure that you call `$clockwork->requestProcessed();` before you output your page.

### Laravel

[](#laravel)

If you are using Laravel, use the included service providers to add the subscriber to every Guzzle Client.

```
'providers' => [
    ...
    \Clockwork\Support\Laravel\ClockworkServiceProvider::class,
    \GuzzleHttp\Profiling\Clockwork\GuzzleClockworkServiceProvider::class,
],
```

Be sure to create every client (type hint with `GuzzleHttp\ClientInterface` or `GuzzleHttp\Client`) via the IoC container.

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 `composer format`. 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.

```
composer test
```

License
-------

[](#license)

[MIT](LICENSE.md)

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 81.7% 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 ~0 days

Total

6

Last Release

1003d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/920047b57e71b2959cf0934a7d6e45a3a18b639a3bc297cab6e0f0ccb488d535?d=identicon)[kEERill](/maintainers/kEERill)

---

Top Contributors

[![hannesvdvreken](https://avatars.githubusercontent.com/u/1410358?v=4)](https://github.com/hannesvdvreken "hannesvdvreken (67 commits)")[![popkovkirill](https://avatars.githubusercontent.com/u/6718174?v=4)](https://github.com/popkovkirill "popkovkirill (10 commits)")[![jenssegers](https://avatars.githubusercontent.com/u/194377?v=4)](https://github.com/jenssegers "jenssegers (2 commits)")[![hareland](https://avatars.githubusercontent.com/u/32701939?v=4)](https://github.com/hareland "hareland (1 commits)")[![marcus-at-localhost](https://avatars.githubusercontent.com/u/1337223?v=4)](https://github.com/marcus-at-localhost "marcus-at-localhost (1 commits)")[![mikepsinn](https://avatars.githubusercontent.com/u/2808553?v=4)](https://github.com/mikepsinn "mikepsinn (1 commits)")

---

Tags

logphpmiddlewarebrowserprofilerGuzzleprofilingDevtoolsClockwork

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/keerill-guzzle-clockwork/health.svg)

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

###  Alternatives

[hannesvdvreken/guzzle-clockwork

A Guzzle middleware that logs requests with Clockwork

4558.0k](/packages/hannesvdvreken-guzzle-clockwork)[hannesvdvreken/guzzle-debugbar

A Guzzle middleware that logs requests to debugbar's timeline

77428.9k2](/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)

44018.6M133](/packages/kevinrob-guzzle-cache-middleware)[mateusjunges/laravel-kafka

A kafka driver for laravel

7253.6M21](/packages/mateusjunges-laravel-kafka)[rtheunissen/guzzle-log-middleware

Guzzle middleware to log requests and responses

822.3M17](/packages/rtheunissen-guzzle-log-middleware)[api-platform/laravel

API Platform support for Laravel

58171.5k14](/packages/api-platform-laravel)

PHPackages © 2026

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