From 76f625b563aa69d3de2813f2ce3319af65fb85b8 Mon Sep 17 00:00:00 2001 From: svensp Date: Thu, 7 Nov 2019 17:27:43 +0100 Subject: [PATCH] readme --- README.md | 27 ++++++++++++++++++++++++++- config/jaeger.php | 7 +++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index dddc079..d91cf9b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,31 @@ # laravel-jaeger -Write basic laravel request informations to jaeger tracing +This package uses `code-tool/jaeger-client-php` to log requests to jaeger. +## Install + + composer install ipunkt/laravel-jaeger:^1.0 + +Add the Middleware `Ipunkt\LaravelJaeger\Middleware\Jaeger` to the routes you want to track, or as generall midleware if +you wish to track all requests + +## Configuration +The default configuration should work for most micro services or small scale apps. It assumes a jaeger agent is running +on localhost and service on port 6831 + +The default sampler is the constant sampler, set to `true`. This means all requests will be logged. + +### Rancherize +If you use rancherize you can get the jaeger agent running as a sidekick in your containers network by adding the +`ipunkt/rancherize-jaeger` plugin and setting `"jaeger": { "host":"jaeger.domain.ex:port" }` + +Note however that the jaeger agent running in a sidekick will react badly to the main service restarting or crashing. +Consider using a keepalive service which does nothing running as main service and both the jaeger agent and your actual +app joining this keepalive services' network + +## Child spans +One thign + +# Thanks Thanks to https://mauri870.github.io/blog/posts/opentracing-jaeger-laravel/ for the idea and implementation this package is and will be built uppon \ No newline at end of file diff --git a/config/jaeger.php b/config/jaeger.php index 355ea69..f6ada05 100644 --- a/config/jaeger.php +++ b/config/jaeger.php @@ -13,6 +13,13 @@ /** * possible values: + * - probabilistic + * - param is the chance in percent that a request will be logged + * - rate-limiting + * - adaptive + * - + * - const + * - ignores param, all requests will be logged */ 'sampler' => env('JAEGER_SAMPLER', 'const'),