PHP code example of opencensus / opencensus-exporter-jaeger

1. Go to this page and download the library: Download opencensus/opencensus-exporter-jaeger 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/ */

    

opencensus / opencensus-exporter-jaeger example snippets


    use OpenCensus\Trace\Tracer;
    use OpenCensus\Trace\Exporter\JaegerExporter;

    Tracer::start(new JaegerExporter('my-service-name'));
    

$options = [];
$exporter = new JaegerExporter('my-service-name', $options);