PHPackages                             m6web/xrequestuid-bundle - 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. m6web/xrequestuid-bundle

AbandonedArchivedSymfony-bundle[HTTP &amp; Networking](/categories/http)

m6web/xrequestuid-bundle
========================

bundle sf2 allowing setting ids in headers propagated via guzzle

v3.0.1(6y ago)390.9k2PHPPHP ^7.0

Since Apr 6Pushed 4y ago22 watchersCompare

[ Source](https://github.com/M6Web/XRequestUidBundle)[ Packagist](https://packagist.org/packages/m6web/xrequestuid-bundle)[ RSS](/packages/m6web-xrequestuid-bundle/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (9)Dependencies (5)Versions (13)Used By (0)

XRequestUidBundle
=================

[](#xrequestuidbundle)

For implementation into a Symfony 3 or Symfony 4 application, please use the release `v3.0.0` at least.

Why ?
-----

[](#why-)

*"The cool thing in microservices is that you can generate 15 http calls in your infrastructure just with on client http call"*

[![](doc/without-xrequest.jpg)](doc/without-xrequest.jpg)

This situation leads to many difficulties to trace calls betweens APIs systems, especially when an internal call fails. This bundle provide a solution to generate ids for new requests and configure your guzzle services accordingly to uses those ids in sub http requests made by them.

The bundle will generate and/or forward those two headers : X-Request-Uid and X-Request-Parent-Uid.

How ?
-----

[](#how-)

When a request arrive, if a X-Request-Id exists, it is copied into the X-Request-Parent-Id. If it's dont exist we generate it throught the uniqId\_service.

All your guzzle services are decorated with a proxy who will add the two headers in all the call made.

At the end both headers are added to the response for debugging purpose.

[![](doc/with-xrequest.jpg)](doc/with-xrequest.jpg)

You can now add thoses two headers in your logs file and follow the calls.

Configuration
-------------

[](#configuration)

```
m6_web_x_request_uid:
    request_uid_header_name: X-Request-toto    # optionnal, X-Request-Uid by default
    request_parent_uid_header_name: X-Parent   # optionnal, X-Request-Parent-Uid by default
    uniqId_service: myservice                  # optionnal, a service implementing UniqIdInterface
    services:                                  # list of guzzle services to decorate
        - test.guzzle1

services:
    test.guzzle1:
        class: 'GuzzleHttp\Client'
```

If you have other bundles creating guzzle services, be sure to add the bundle after them in your `AppKernel` file.

You can define you own uniqId service or juste use the one provided in the bundle (wich do a basic php `uniqid`).

Related
-------

[](#related)

- Use The [GuzzleHttp Bundle](https://github.com/M6Web/GuzzleHttpBundle) to instanciate your guzzle services.
- Use the [LogBridge Bundle](https://github.com/M6Web/LogBridgeBundle) to see responses when a problem occurs.

Todo
----

[](#todo)

- add more tests
- add more docs

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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 ~174 days

Recently: every ~348 days

Total

9

Last Release

2335d ago

Major Versions

v1.2.2 → v2.0.02017-01-09

v2.0.1 → v3.0.02019-11-18

PHP version history (3 changes)v1.0.0PHP ^5.6|^7.0

v1.2.0PHP ^5.5|^7.0

v2.0.1PHP ^7.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2069361?v=4)[Patrick](/maintainers/Bedrock)[@Bedrock](https://github.com/Bedrock)

---

Top Contributors

[![omansour](https://avatars.githubusercontent.com/u/1131098?v=4)](https://github.com/omansour "omansour (5 commits)")[![lnahiro](https://avatars.githubusercontent.com/u/14995154?v=4)](https://github.com/lnahiro "lnahiro (3 commits)")[![jubianchi](https://avatars.githubusercontent.com/u/327237?v=4)](https://github.com/jubianchi "jubianchi (1 commits)")[![titoko](https://avatars.githubusercontent.com/u/1798254?v=4)](https://github.com/titoko "titoko (1 commits)")

### Embed Badge

![Health badge](/badges/m6web-xrequestuid-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/m6web-xrequestuid-bundle/health.svg)](https://phpackages.com/packages/m6web-xrequestuid-bundle)
```

###  Alternatives

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25025.5M80](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.2M6.5k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k20.0k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

87930.4k113](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.3M84](/packages/mezzio-mezzio-router)[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69122.6k](/packages/serpapi-google-search-results-php)

PHPackages © 2026

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