PHP code example of yoopies / dd-trace-polyfill-php

1. Go to this page and download the library: Download yoopies/dd-trace-polyfill-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/ */

    

yoopies / dd-trace-polyfill-php example snippets


if (extension_loaded('ddtrace')) {
    $rootSpan = \DDTrace\root_span();
    $rootSpan->meta['usr.id'] = '123456789';
}

$span = \DDTrace\active_span();

composer