Download the PHP package dipenduroy/lumenzipkin without Composer
On this page you can find all versions of the php package dipenduroy/lumenzipkin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dipenduroy/lumenzipkin
More information about dipenduroy/lumenzipkin
Files in dipenduroy/lumenzipkin
Package lumenzipkin
Short Description Distributed tracing for lumen using Zipkin
License MIT
Homepage https://github.com/dipenduroy/lumen-zipkin
Informations about the package lumenzipkin
Distributed Tracing using Zipkin in Lumen framework
Distributed Tracing of Guzzle HTTP Client (Micro Services internal calls) and dynamic profiling in Lumen
Contents
- Distributed Tracing using Zipkin in Lumen framework
- Prerequisites
- Install
- Register LumenZipkinServiceProvider
- Register ZipkinTraceMiddleware
- Start Zipkin Server
- Usage
- Configuration
- Running with a custom zipkin location
- References
Prerequisites
Install
Register LumenZipkinServiceProvider
To enable Lumen Zipkin library, add below in bootstrap/app.php
Register ZipkinTraceMiddleware
To automatically flush all the traces to zipkin server while script ends. This is required to push trace info to zipkin server.
Add DipenduRoy\LumenZipkin\ZipkinTraceMiddleware::class in middleware's list of bootstrap/app.php, If no middleware
Start Zipkin Server
Use Docker to start Zipkin Server
Usage
Below example traces all guzzle calls between microservices. Similarly refer zipkin-php for more customized tracing
Configuration
Set below environment variable as required
APP_NAME Environment variable is used for root trace name
LUMEN_ZIPKIN_ENABLE_SERVER_ADDRESS Environment variable is used to enable server address if available
Running with a custom zipkin location
If you need to pass the zipkin endpoint, just pass the reporter
url as HTTP_REPORTER_URL
env variable. Default zipkin location is - http://localhost:9411/api/v2/spans
References
Thanks to the below contributors
- This library uses Zipkin PHP Library, refer for more details
- Know Zipkin in detail
- Zipkin PHP Example
All versions of lumenzipkin with dependencies
openzipkin/zipkin Version ^1.3.6|^2.0