PHPackages                             manomano-tech/correlation-ids-guzzle - 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. manomano-tech/correlation-ids-guzzle

Abandoned → not maintained any moreArchivedLibrary[HTTP &amp; Networking](/categories/http)

manomano-tech/correlation-ids-guzzle
====================================

Guzzle plugin for manomano-tech/correlation-ids package

1.0.0(7y ago)08871MITPHPPHP ^7.1.3

Since Sep 29Pushed 3y agoCompare

[ Source](https://github.com/ManoManoTech/correlation-ids-guzzle)[ Packagist](https://packagist.org/packages/manomano-tech/correlation-ids-guzzle)[ RSS](/packages/manomano-tech-correlation-ids-guzzle/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (5)Versions (3)Used By (1)

Inactive
========

[](#inactive)

**📢 Note:** This repository is not maintained any more.

Guzzle Request Correlation
==========================

[](#guzzle-request-correlation)

Injects request correlation headers in guzzle requests

Installation
------------

[](#installation)

```
composer require manomano-tech/correlation-ids-guzzle
```

Usage
-----

[](#usage)

First, generate a CorrelationIdContainer:

```
use ManoManoTech\CorrelationId\Factory\CorrelationIdContainerFactory;
use ManoManoTech\CorrelationId\Generator\RamseyUuidGenerator;

// We specify which generator will be responsible for generating the
// identification of the current process
$generator = new RamseyUuidGenerator();

$factory = new CorrelationIdContainerFactory($generator);
$correlationIdContainer = $factory->create(
    '3fc044d9-90fa-4b50-b6d9-3423f567155f',
    '3b5263fa-1644-4750-8f11-aaf61e58cd9e'
);
```

Then, you have two options:

### Add Middleware to your Guzzle client

[](#add-middleware-to-your-guzzle-client)

```
use GuzzleHttp\Client;
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Middleware;
use ManoManoTech\CorrelationIdGuzzle\CorrelationIdMiddleware;

// create the middleware
$correlationIdMiddleware = new CorrelationIdMiddleware($correlationIdContainer);

$stack = HandlerStack::create();
$stack->push(Middleware::mapRequest($correlationIdMiddleware));

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

### Use the factory to create a guzzle client

[](#use-the-factory-to-create-a-guzzle-client)

```
use ManoManoTech\CorrelationIdGuzzle\GuzzleClientFactory;
use ManoManoTech\CorrelationIdGuzzle\CorrelationIdMiddleware;

// create the middleware
$correlationIdMiddleware = new CorrelationIdMiddleware($correlationIdContainer);

$factory = new GuzzleClientFactory($correlationIdMiddleware);
// return an instance of GuzzleHttp\Client
$client = $factory->create();
```

Customizing header names
------------------------

[](#customizing-header-names)

By default, request headers will look something like this:

```
GET / HTTP/1.1
Host: example.com
parent-correlation-id: 3fc044d9-90fa-4b50-b6d9-3423f567155f
root-correlation-id: 3b5263fa-1644-4750-8f11-aaf61e58cd9e
```

You can change this by providing a second argument to the constructor:

```
use GuzzleHttp\Client;
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Middleware;
use ManoManoTech\CorrelationId\CorrelationEntryName;
use ManoManoTech\CorrelationIdGuzzle\CorrelationIdMiddleware;

$correlationHeaderName = new CorrelationEntryName(
    'current-id', // not used in this context
    'parent-id',
    'root-id'
);
$correlationIdMiddleware = new CorrelationIdMiddleware(
    $correlationIdContainer,
    $correlationHeaderName
);

$stack = HandlerStack::create();
$stack->push(Middleware::mapRequest($correlationIdMiddleware));

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

will produce:

```
GET / HTTP/1.1
Host: example.com
parent-id: 3fc044d9-90fa-4b50-b6d9-3423f567155f
root-id: 3b5263fa-1644-4750-8f11-aaf61e58cd9e
```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% 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

Unknown

Total

1

Last Release

2782d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/25135828?v=4)[ManoMano Tech](/maintainers/ManoManoTech)[@ManoManoTech](https://github.com/ManoManoTech)

---

Top Contributors

[![juliendufresne](https://avatars.githubusercontent.com/u/1397529?v=4)](https://github.com/juliendufresne "juliendufresne (6 commits)")[![edouard-lopez](https://avatars.githubusercontent.com/u/1212392?v=4)](https://github.com/edouard-lopez "edouard-lopez (1 commits)")[![greg0ire](https://avatars.githubusercontent.com/u/657779?v=4)](https://github.com/greg0ire "greg0ire (1 commits)")

---

Tags

middlewarepluginGuzzletracingguzzle6correlation-idcorrelation

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/manomano-tech-correlation-ids-guzzle/health.svg)

```
[![Health](https://phpackages.com/badges/manomano-tech-correlation-ids-guzzle/health.svg)](https://phpackages.com/packages/manomano-tech-correlation-ids-guzzle)
```

###  Alternatives

[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)[caseyamcl/guzzle_retry_middleware

Guzzle v6+ retry middleware that handles 429/503 status codes and connection timeouts

21610.7M64](/packages/caseyamcl-guzzle-retry-middleware)[eljam/guzzle-jwt-middleware

A jwt authentication middleware for guzzle 6

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

Guzzle middleware to log requests and responses

842.3M17](/packages/rtheunissen-guzzle-log-middleware)[rtheunissen/guzzle-rate-limiter

Guzzle 6 middleware used to delay requests dynamically

52177.2k1](/packages/rtheunissen-guzzle-rate-limiter)[brightfish/caching-guzzle

Cache HTTP responses through Guzzle middleware

1031.5k](/packages/brightfish-caching-guzzle)

PHPackages © 2026

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