提交 62eae250 编写于 作者: Z zhian song

修改文档

上级 c0f5a6b4
......@@ -11,41 +11,44 @@
### Installation
To install PHP SkyWalking Class, simply:
To install PHP SkyWalking extend, simply:
copy ini to php.ini
commands::
git clone https://github.com/SkywalkingContrib/skywalking-php-sdk.git
cd skywalking-php-sdk/sky-php7ext
phpize
.configure
make -j [number_of_processor_cores] # eg. make -j 4
make install
### Requirements
PHP Curl Class works with PHP 5.0,5.3, 5.4, 5.5, 5.6, 7.0, and HHVM.
the current phpext works with PHP 7.0-7.9.99 。
this extension references something external, use with: pphcurl、phpjson and phpstandard
### Documentation
- https://github.com/OpenSkywalking/skywalking/wiki
### Quick Start and Examples
set php.ini skywalking.auto_open = On OR skywalking.auto_open = OFF As below:
// must put these code at the beginning !!!
// that would auto register shutdown function !!!
include_once ("./SkyWalking.php");// or use composer
//LOG_PATH is skywalking's logfile path
SkyWalking::getInstance("mapi")->setLogPath(LOG_PATH)->setSamplingRate(5);
....
....
$ch = curl_init();
curl_setopt($ch);
....
....
SkyWalking::getInstance()->startSpanOfCurl("www.dangdang.com", $headers);
SkyWalking::getInstance()->startSpanOfCurl("www.api.com", $headers);
....
....
curl_setopt($ch);
$rs = curl_exec($ch);
SkyWalking::getInstance()->endSpanOfcurl($curl);
SkyWalking::getInstance()->endSpanOfcurl($ch);
....
....
\ No newline at end of file
......@@ -925,8 +925,6 @@ static void _init(const char *appCode, zval *this_ptr){
add_assoc_null(&allparts_property, SKYWALKING_ENDTIME);
SKY_ADD_ASSOC_ZVAL(&allparts_property, SKYWALKING_FATHER_NODE_DATA);
SKY_ADD_ASSOC_ZVAL(&allparts_property, SKYWALKING_SPANS_NODE_DATA);
//add_assoc_zval(&allparts_property, SKYWALKING_FATHER_NODE_DATA, &null_array);
//add_assoc_zval(&allparts_property, SKYWALKING_SPANS_NODE_DATA, &null_array);
add_assoc_null(&allparts_property, SKYWALKING_APP_CODE);
add_assoc_null(&allparts_property, SKYWALKING_DISTRIBUTED_TRACEIDS);
zend_update_property(skywalking_ce_entry, this_ptr, ZEND_STRL("_allPartsNodesStruct"), &allparts_property);
......@@ -975,7 +973,7 @@ static void _init(const char *appCode, zval *this_ptr){
zend_update_property_string(skywalking_ce_entry, this_ptr, ZEND_STRL("_appCode"), appCode);
//对节点数据进行结构初始化
//对节点数据进行结构初始化
zval *all_parts_nodes_struct, all_node_data;
all_parts_nodes_struct = zend_read_property(skywalking_ce_entry, this_ptr, ZEND_STRL("_allPartsNodesStruct"), 1, NULL);
array_init(&all_node_data);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册