PHP code example of vladitot / opencensus-exporter-stackdriver

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

    

vladitot / opencensus-exporter-stackdriver example snippets


    use OpenCensus\Trace\Tracer;
    use OpenCensus\Trace\Exporter\StackdriverExporter;

    Tracer::start(new StackdriverExporter());
    

$options = [];
$exporter = new StackdriverExporter($options);