Core interface package for correlate id generation for microservices writen in PHP.
proemergotech/correlate-php-core is a Laravel package for core interface package for correlate id generation for microservices writen in php..
It currently has 0 GitHub stars and 7.134 downloads on Packagist.
Install it with composer require proemergotech/correlate-php-core.
Discover more Laravel packages by proemergotech
or browse all Laravel packages to compare alternatives.
Last updated
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.
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
Default header name is X-Correlation-ID and default parameter name is x_correlation_id.
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();
});
See CONTRIBUTING.md file.
This package developed by Soma Szélpál at Pro Emergotech Ltd..
This project is released under the MIT License.