Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
SkyAPM
SkyAPM-php-sdk
提交
d0927d4f
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 搜索 >>
提交
d0927d4f
编写于
12月 06, 2018
作者:
H
heyanlong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
report
上级
c6a85ad3
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
15 addition
and
4 deletion
+15
-4
sky-php7ext/skywalking.c
sky-php7ext/skywalking.c
+8
-1
sky-php7ext/src/report/report_client.cpp
sky-php7ext/src/report/report_client.cpp
+7
-3
未找到文件。
sky-php7ext/skywalking.c
浏览文件 @
d0927d4f
...
...
@@ -455,7 +455,7 @@ static void request_init() {
efree
(
l_millisecond
);
add_assoc_long
(
&
temp
,
"startTime"
,
millisecond
);
add_assoc_string
(
&
temp
,
"operationName"
,
get_page_request_uri
());
// add_assoc_string(&sky_entry_span, "peer", "127.0.0.1
");
add_assoc_string
(
&
temp
,
"peer"
,
"
"
);
add_assoc_long
(
&
temp
,
"spanType"
,
0
);
add_assoc_long
(
&
temp
,
"spanLayer"
,
3
);
add_assoc_long
(
&
temp
,
"componentId"
,
COMPONENT_HTTPCLIENT
);
...
...
@@ -517,6 +517,10 @@ static void module_init() {
do
{
application_id
=
applicationCodeRegister
(
SKYWALKING_G
(
grpc
),
SKYWALKING_G
(
app_code
));
if
(
application_id
==
-
100000
)
{
sleep
(
1
);
}
i
++
;
}
while
(
application_id
==
-
100000
&&
i
<=
3
);
...
...
@@ -546,6 +550,9 @@ static void module_init() {
application_instance
=
registerInstance
(
SKYWALKING_G
(
grpc
),
application_id
,
millisecond
,
uuid
,
SKY_OS_NAME
,
hostname
,
getpid
(),
ipv4s
);
if
(
application_instance
==
-
100000
)
{
sleep
(
1
);
}
i
++
;
}
while
(
application_instance
==
-
100000
&&
i
<=
3
);
...
...
sky-php7ext/src/report/report_client.cpp
浏览文件 @
d0927d4f
...
...
@@ -185,11 +185,15 @@ int main(int argc, char **argv) {
for
(
int
i
=
0
;
i
<
spans
.
size
();
i
++
)
{
SpanObject
*
spanObject
=
traceSegmentObject
.
add_spans
();
spanObject
->
set_spanid
(
spans
[
i
][
"spanId"
]);
spanObject
->
set_parentspanid
(
spans
[
i
][
"parentSpanId"
]);
spanObject
->
set_spanid
(
spans
[
i
][
"spanId"
]
.
get
<
int
>
()
);
spanObject
->
set_parentspanid
(
spans
[
i
][
"parentSpanId"
]
.
get
<
int
>
()
);
spanObject
->
set_starttime
(
spans
[
i
][
"startTime"
]);
spanObject
->
set_endtime
(
spans
[
i
][
"endTime"
]);
spanObject
->
set_operationname
(
spans
[
i
][
"operationName"
]);
std
::
string
peer
(
spans
[
i
][
"peer"
].
get
<
std
::
string
>
());
if
(
!
peer
.
empty
())
{
spanObject
->
set_peer
(
peer
);
}
int
spanType
=
spans
[
i
][
"spanType"
].
get
<
int
>
();
if
(
spanType
==
0
)
{
...
...
@@ -205,7 +209,7 @@ int main(int argc, char **argv) {
spanObject
->
set_spanlayer
(
SpanLayer
::
Http
);
}
spanObject
->
set_componentid
(
spans
[
i
][
"componentId"
]);
spanObject
->
set_componentid
(
spans
[
i
][
"componentId"
]
.
get
<
int
>
()
);
spanObject
->
set_iserror
(
spans
[
i
][
"isError"
].
get
<
int
>
());
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录