PHP code example of uniondrug / trace
1. Go to this page and download the library: Download uniondrug/trace 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/ */
uniondrug / trace example snippets
return [
'default' => [
......
'providers' => [
......
\Uniondrug\Trace\TraceClientServiceProvider::class,
],
],
];
/**
* Trace中心的配置文件。
*
* service: HTTP方式的采集地址
* timeout: 连接超时时间,单位 秒,默认 30
*/
return [
'default' => [
'service' => 'http://ip:port',
'timeout' => 30,
],
];