PHPackages                             proemergotech/correlate-php-core - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. proemergotech/correlate-php-core

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

proemergotech/correlate-php-core
================================

Core interface package for correlate id generation for microservices writen in PHP.

07.1k1PHP

Since Oct 11Pushed 8y ago2 watchersCompare

[ Source](https://github.com/proemergotech/correlate-php-core)[ Packagist](https://packagist.org/packages/proemergotech/correlate-php-core)[ RSS](/packages/proemergotech-correlate-php-core/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (1)

correlate-php-core
==================

[](#correlate-php-core)

---

Overview
--------

[](#overview)

It's very difficult to track a request accross the system when we are working with microservices. We came out a solution for that. We generate a unique version 4 uuid for every request and every service passes this id via request header to other services. We call this **correlation ID**.

Packages
--------

[](#packages)

- [proemergotech/correlate-php-laravel](https://github.com/proemergotech/correlate-php-laravel)
    - Middleware for Laravel and Lumen frameworks.
- [proemergotech/correlate-php-psr-7](https://github.com/proemergotech/correlate-php-psr-7)
    - Middleware for any PSR-7 compatible frameworks like [Slim Framework](https://www.slimframework.com/).
- [proemergotech/correlate-php-monolog](https://github.com/proemergotech/correlate-php-monolog)
    - Monolog processor for correlate middlewares (you don't have to use this directly).
- [proemergotech/correlate-php-guzzle](https://github.com/proemergotech/correlate-php-guzzle)
    - Guzzle middleware to add correlation id to every requests.
- [proemergotech/correlate-php-core](https://github.com/proemergotech/correlate-php-core)
    - Common package for correlate id middlewares to provide consistent header naming accross projects.

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

[](#installation)

You should not use this directly.

By the way if you want to use it directly, you can install it via composer.

```
$ composer require proemergotech/correlate-php-core
```

Defaults
--------

[](#defaults)

Default header name is `X-Correlation-ID` and default parameter name is `x_correlation_id`.

Usage
-----

[](#usage)

Generate a correlation id:

```
\ProEmergotech\Correlate\Correlate\Correlate::id();
```

Other methods:

```
\ProEmergotech\Correlate\Correlate::getHeaderName();
\ProEmergotech\Correlate\Correlate::getParamName();
\ProEmergotech\Correlate\Correlate::getGeneratorFunc();

// You can override defaults...
\ProEmergotech\Correlate\Correlate::setHeaderName('X-My-Correlation-ID');
\ProEmergotech\Correlate\Correlate::setParamName('my_correlation_id');
\ProEmergotech\Correlate\Correlate::setGeneratorFunc(function(){
  return uniqid();
});
```

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

[](#contributing)

See `CONTRIBUTING.md` file.

Credits
-------

[](#credits)

This package developed by [Soma Szélpál](https://github.com/shakahl/) at [Pro Emergotech Ltd.](https://github.com/proemergotech/).

License
-------

[](#license)

This project is released under the [MIT License](http://www.opensource.org/licenses/MIT).

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/1b38838e1ee47a244616dc762a8cd39e94e2ca7cdfa14baf17b5efd98f46953a?d=identicon)[shakahl](/maintainers/shakahl)

![](https://www.gravatar.com/avatar/2217621c447f28d53f930dd3097a8dc1c472985f4226008ad7ab6c5d698eb515?d=identicon)[cherubmiki](/maintainers/cherubmiki)

![](https://www.gravatar.com/avatar/dc6b895fd9db6c6ae5dc10d612769ee644cd67e9e7bc6531398926f1c5744846?d=identicon)[dblaci](/maintainers/dblaci)

---

Top Contributors

[![shakahl](https://avatars.githubusercontent.com/u/5264395?v=4)](https://github.com/shakahl "shakahl (9 commits)")

### Embed Badge

![Health badge](/badges/proemergotech-correlate-php-core/health.svg)

```
[![Health](https://phpackages.com/badges/proemergotech-correlate-php-core/health.svg)](https://phpackages.com/packages/proemergotech-correlate-php-core)
```

###  Alternatives

[anlutro/l4-settings

Persistent settings in Laravel.

9312.4M19](/packages/anlutro-l4-settings)[godruoyi/php-snowflake

An ID Generator for PHP based on Snowflake Algorithm (Twitter announced).

8582.3M61](/packages/godruoyi-php-snowflake)[tuupola/ksuid

K-Sortable Globally Unique IDs

1081.2M4](/packages/tuupola-ksuid)[mcordingley/linearalgebra

Matrix math for PHP.

85146.3k1](/packages/mcordingley-linearalgebra)[hyva-themes/magento2-wysiwyg-svg

Allow SVGs and all tailwind classes in CMS block and page content.

17130.8k](/packages/hyva-themes-magento2-wysiwyg-svg)[syrian-open-source/laravel-youtube-iframe-generator

Laravel package allows you to generate an iframe tag with a video player depending on a youtube URL.

184.2k](/packages/syrian-open-source-laravel-youtube-iframe-generator)

PHPackages © 2026

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