This is a client-side library that can be used to instrument PHP apps for distributed trace collection, and to send those traces to Jaeger. See the OpenTracing PHP API for additional detail.
Please see CONTRIBUTING.md.
{
"require": {
"jonahgeorge/jaeger-client-php": "0.3.0"
}
}
<?php
require_once 'vendor/autoload.php';
use Jaeger\Config;
use OpenTracing\GlobalTracer;
$config = new Config(
[
'sampler' => [
'type' => 'const',
'param' => true,
],
'logging' => true,
],
'your-app-name'
);
$config->initializeTracer();
$tracer = GlobalTracer::get();
$scope = $tracer->startActiveSpan('TestSpan', []);
$scope->close();
$tracer->flush();
Tests are located in the tests
directory. See tests/README.md.