proemergotech/correlate-php-monolog

Monolog processor for microservices to append correlation id to log messages.

dev-master 2017-06-15 16:37 UTC

This package is not auto-updated.

Last update: 2024-04-14 00:02:10 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

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.