PHP code example of code-tool / jaeger-client-php
1. Go to this page and download the library: Download code-tool/jaeger-client-php library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
code-tool / jaeger-client-php example snippets
use Jaeger\Tag\StringTag;
use Jaeger\Tracer\TracerInterface;
/** @var TracerInterface $tracer */
$span = $tracer->start('Parent Operation Name', [new StringTag('test.tag', 'Hello world in parent')]);
$childSpan = $tracer->start('Child Operation Name', [new StringTag('test.tag', 'Hello world in child')]);
$tracer->finish($childSpan);
$tracer->finish($span);