Stars: 217
Forks: 103
Pull Requests: 71
Issues: 41
Watchers: 11
Last Updated: 2022-12-21 09:27:18
Jaeger Bindings for PHP OpenTracing API
License: Apache License 2.0
Languages: PHP
Install via composer.
composer config minimum-stability dev
composer require jukylin/jaeger-php
$config = Config::getInstance();
$tracer = $config->initTracer('example', '0.0.0.0:6831');
$config->gen128bit();
$spanContext = $tracer->extract(Formats\TEXT_MAP, $_SERVER);
$serverSpan = $tracer->startSpan('example HTTP', ['child_of' => $spanContext]);
$serverSpan->addBaggageItem("version", "2.0.0");
$clientTrace->inject($clientSpan1->spanContext, Formats\TEXT_MAP, $_SERVER);
// tags are searchable in Jaeger UI
$span->setTag('http.status', '200');
// log record
$span->log(['error' => 'HTTP request timeout']);
$config->setDisabled(true);
no support for Distributed context propagation
$config::$propagator = \Jaeger\Constants\PROPAGATOR_ZIPKIN;
$span->finish();
$config->flush();
Transports
Sampling