proemergotech / correlate-php-monolog
Monolog processor for microservices to append correlation id to log messages.
Installs: 7 016
Dependents: 2
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 1
Open Issues: 0
Requires
- monolog/monolog: 1.*
- proemergotech/correlate-php-core: dev-master
Requires (Dev)
- fzaninotto/faker: ~1.4
- mockery/mockery: ~0.9
- phpunit/phpunit: ^5.0
- squizlabs/php_codesniffer: ^2.8
This package is not auto-updated.
Last update: 2024-12-22 03:31:07 UTC
README
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
- proemergotech/correlate-php-laravel
- Middleware for Laravel and Lumen frameworks.
- proemergotech/correlate-php-psr-7
- Middleware for any PSR-7 compatible frameworks like Slim Framework.
- proemergotech/correlate-php-monolog
- Monolog processor for correlate middlewares (you don't have to use this directly).
- proemergotech/correlate-php-guzzle
- Guzzle middleware to add correlation id to every requests.
- proemergotech/correlate-php-core
- Common package for correlate id middlewares to provide consistent header naming accross projects.
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-monolog
Usage
Generate a correlation id:
$processor = new \ProEmergotech\Correlate\Monolog\CorrelateProcessor('x_correlation_id', $correlationId); $monolog->pushProcessor($processor);
Contributing
See CONTRIBUTING.md
file.
Credits
This package developed by Soma Szélpál at Pro Emergotech Ltd..
License
This project is released under the MIT License.