Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
SkyAPM
SkyAPM-php-sdk
提交
62eae250
S
SkyAPM-php-sdk
项目概览
SkyAPM
/
SkyAPM-php-sdk
通知
14
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
SkyAPM-php-sdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
62eae250
编写于
11月 11, 2017
作者:
Z
zhian song
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改文档
上级
c0f5a6b4
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
22 addition
and
21 deletion
+22
-21
sky-php7ext/README.md
sky-php7ext/README.md
+21
-18
sky-php7ext/skywalking.c
sky-php7ext/skywalking.c
+1
-3
未找到文件。
sky-php7ext/README.md
浏览文件 @
62eae250
...
...
@@ -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($c
url
);
SkyWalking::getInstance()->endSpanOfcurl($c
h
);
....
....
\ No newline at end of file
sky-php7ext/skywalking.c
浏览文件 @
62eae250
...
...
@@ -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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录