drefined/php-zipkin
Zipkin's PHP tracer library
4,279
21
Larablocks Analysis
drefined/php-zipkin has no release yet to check Laravel compatibility against.
Recommendation checks
Use with careUse with care: meets 0 of 3 checks.
- No dated releases
- 0 downloads a month (needs 10,000)
- 21 GitHub stars (needs 100)
Data from Packagist and GitHub, checked by Larablocks on Nov 30, 2026.
| Install | |
|---|---|
composer require drefined/php-zipkin:dev-master |
|
| PHP: | ^7.0 |
| License: | MIT |
| Last Updated: | Feb 22, 2017 |
| Links: | GitHub · Packagist |
Maintainer: drefined
PHP-Zipkin
This is an unofficial PHP library for OpenZipkin.
Status
Incomplete, only has one transport with zero integrations. This library contains a very minimal implementation for just sending spans to zipkin.
Getting started
The recommended way to install PHP-Zipkin is through Composer
composer require drefined/php-zipkin
Example usage
<?php
$client = new \GuzzleHttp\Client();
$logger = new \Drefined\Zipkin\Transport\HTTPLogger($client);
$tracer = new \Drefined\Zipkin\Tracer($logger, 1.0, true);
$endpoint = new \Drefined\Zipkin\Core\Endpoint('127.0.0.1', 8080, 'test-trace');
$trace = new \Drefined\Zipkin\Core\Trace($tracer, $endpoint);
$trace->createNewSpan('test-server-trace');
$trace->record(
[Annotation::generateServerRecv()],
[BinaryAnnotation::generateString('server.request.uri', '/server')]
);
$trace->record(
[Annotation::generateServerSend()],
[BinaryAnnotation::generateString('server.response', 200)]
);
Laravel integration (simple)
Add middleware and service provider in proper locations.
<?php // laravel-project/app/Http/Kernel.php
namespace App\Http;
use ...
use Drefined\Zipkin\Instrumentation\Laravel\Middleware\EnableZipkinTracing;
class Kernel extends HttpKernel
{
...
protected $middleware = [
...
EnableZipkinTracing::class,
];
...
}
<?php // laravel-project/config/app.php
use Drefined\Zipkin\Instrumentation\Laravel\Providers\ZipkinTracingServiceProvider;
return [
...
'providers' => [
...
ZipkinTracingServiceProvider::class,
],
...
];
Todo
- Add Complete Laravel integration (currently supports a simple implementation without app environment configuration)
- Add Symfony integration
- Add Redis wrapper
- Add HTTP wrapper
- Add PDO wrapper
- Add Scribe transport
- Add Kafka transport
Inspired By
Reference
Generating PHP thrift classes
- ls thrift/ | xargs -I {} thrift --gen php thrift/{}
License
Contributors
- David Phruksukarn
Related Packages
valorin/random
Random is a simple helper package designed to make it easy to generate a range o...
479,812
234