ssipos90 / correlate by ssipos90

Add correlation ID to requests to use in micro services logs aggregating.
74
2
1
Package Data
Maintainer Username: ssipos90
Maintainer Contact: sebastiansipos90@gmail.com (Sebastian Sipos)
Package Create Date: 2017-04-03
Package Last Update: 2017-05-15
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2024-11-22 03:08:20
Package Statistics
Total Downloads: 74
Monthly Downloads: 1
Daily Downloads: 0
Total Stars: 2
Total Watchers: 1
Total Forks: 0
Total Open Issues: 0

Build Status

Installation

Via composer package management:

$ composer require ssipos90/correlate

Usage

Not tested on Laravel, only Lumen.

Either

  • register the service provider:
    • Laravel: register the provider in your config/app.php file:
     Ssipos\Correlate\CorrelateServiceProvider::class,
    
    • Lumen: add this in your bootstrap/app.php file:
    $app->register(Ssipos\Correlate\CorrelateServiceProvider::class);
    
  • add the middleware to whatever routes you want or globally:
    • Laravel: add the middleware in your app/Http/Kernel.php file;
    • Lumen: add the middleware in your bootstrap/app.php file.
    Ssipos\Correlate\Correlate::class
    

TODO

  • Add guzzle support for adding the header on forwarding requests