Repository: pinpoint-apm/pinpoint-c-agent (language: python)

Issue:
Is there a plan to support yii2?
Is there a plan to support yii2?


Discussion / hints:
@jefry86 

yii2 supports classload(composer). In other word , pinpont-php-agent  supports yii2.

While, agent does not have out-of-box plugins for yii2.

> @jefry86
> 
> yii2 supports classload(composer). In other word , pinpont-php-agent supports yii2.
> 
> While, agent does not have out-of-box plugins for yii2.

Do you have plans to develop out-of-box plugins for yii2?
OK, let me do some research !
It's done. 
Use v0.2.3

Fix patch:
diff --git a/common/src/common.cpp b/common/src/common.cpp
index 97bfba5aa..9d457b11e 100644
--- a/common/src/common.cpp
+++ b/common/src/common.cpp
@@ -163,8 +163,9 @@ NodeID pinpoint_start_trace(NodeID parentId)
 {
     try
     {
-        pp_trace("#%d pinpoint_start start",parentId);
-        return do_start_trace(parentId);
+        NodeID childId= do_start_trace(parentId);
+        pp_trace("#%d pinpoint_start child #%d",parentId,childId);
+        return childId;
     }
     catch(const std::out_of_range& ex)
     {


Test patch:
diff --git a/src/PHP/tests/add_root_trace.phpt b/src/PHP/tests/add_root_trace.phpt
index 3294f32c1..9a4eeb054 100644
--- a/src/PHP/tests/add_root_trace.phpt
+++ b/src/PHP/tests/add_root_trace.phpt
@@ -21,13 +21,13 @@ $id = pinpoint_end_trace($id);
 $id = pinpoint_end_trace($id);
 $id = pinpoint_end_trace($id);
 --EXPECTF--
-[pinpoint] [%d] [%d]#0 pinpoint_start start
+[pinpoint] [%d] [%d]#0 pinpoint_start child #128
 [pinpoint] [%d] [%d]#128 add clue key:name value:Foo
-[pinpoint] [%d] [%d]#128 pinpoint_start start
+[pinpoint] [%d] [%d]#128 pinpoint_start child #127
 [pinpoint] [%d] [%d]#127 add clues:global:global_value
 [pinpoint] [%d] [%d]#127 add clue key:global value:global_value
 [pinpoint] [%d] [%d]#127 add clues:name:Foo1
-[pinpoint] [%d] [%d]#127 pinpoint_start start
+[pinpoint] [%d] [%d]#127 pinpoint_start child #126
 [pinpoint] [%d] [%d]#126 add clue key:name value:Foo2
 [pinpoint] [%d] [%d]#126 pinpoint_end_trace Done!
 [pinpoint] [%d] [%d]#127 pinpoint_end_trace Done!
diff --git a/src/PHP/tests/drop_trace_test.phpt b/src/PHP/tests/drop_trace_test.phpt
index ea8b915ba..d89158a9c 100644
--- a/src/PHP/tests/drop_trace_test.phpt
+++ b/src/PHP/tests/drop_trace_test.phpt
@@ -15,7 +15,7 @@ pinpoint_add_clue("args",'a,$b');
 pinpoint_add_clue("ret",'a,$b');
 pinpoint_end_trace();
 --EXPECTF--
-[pinpoint] [%d] [%d]#0 pinpoint_start start
+[pinpoint] [%d] [%d]#0 pinpoint_start child #128
 [pinpoint] [%d] [%d]change current#128 status, before:2,now:4
 [pinpoint] [%d] [%d]#128 add clue key:args value:a,$b
 [pinpoint] [%d] [%d]#128 add clue key:ret value:a,$b
diff --git a/src/PHP/tests/mark_as_error.phpt b/src/PHP/tests/mark_as_error.phpt
index 88c472519..c58e28d2a 100644
--- a/src/PHP/tests/mark_as_error.phpt
+++ b/src/PHP/tests/mark_as_error.phpt
@@ -17,7 +17,7 @@ pinpoint_add_clue("ret",'a,$b');
 pinpoint_mark_as_error("message you cared","filename you cared",1023);
 echo pinpoint_end_trace()."\n";
 --EXPECTF--
-[pinpoint] [%d] [%d]#0 pinpoint_start start
+[pinpoint] [%d] [%d]#0 pinpoint_start child #128
 [pinpoint] [%d] [%d]#128 add clue key:args value:a,$b
 [pinpoint] [%d] [%d]#128 add clue key:ret value:a,$b
 [pinpoint] [%d] [%d]this span:({"E":%d,"ERR":{"file":"filename you cared","line":1023,"msg":"message you cared"},"FT":%d,"S":%d,"args":"a,$b","ret":"a,$b"})
diff --git a/src/PHP/tests/node_test.phpt b/src/PHP/tests/node_test.phpt
index fe73d9153..4cc433401 100644
--- a/src/PHP/tests/node_test.phpt
+++ b/src/PHP/tests/node_test.phpt
@@ -25,7 +25,6 @@ pinpoint_get_context('b',$unexist_node);
 pinpoint_end_trace($unexist_node);
 
 --EXPECTF--
-[pinpoint] [%d] [%d]#1024 pinpoint_start start
 [pinpoint] [%d] [%d] start_trace#1024 failed with id is not alive
 [pinpoint] [%d] [%d] pinpoint_add_clue#1024 failed. Reason: id is not alive,parameters:adf:fdfd
 [pinpoint] [%d] [%d] pinpoint_add_clue#1024 failed. Reason: id is not alive,parameters:adf:fdfd
diff --git a/src/PHP/tests/stack_fetal_error.phpt b/src/PHP/tests/stack_fetal_error.phpt
index 91d575893..09f20a63a 100644
--- a/src/PHP/tests/stack_fetal_error.phpt
+++ b/src/PHP/tests/stack_fetal_error.phpt
@@ -50,8 +50,8 @@ try{
 
 pinpoint_start_trace();
 --EXPECTF--
-[pinpoint] [%d] [%d]#0 pinpoint_start start
-[pinpoint] [%d] [%d]#128 pinpoint_start start
+[pinpoint] [%d] [%d]#0 pinpoint_start child #128
+[pinpoint] [%d] [%d]#128 pinpoint_start child #127
 [pinpoint] [%d] [%d]#127 add clue key:name value:Foo
 [pinpoint] [%d] [%d]apm_error_cb called
 
diff --git a/src/PHP/tests/trace_api_context.phpt b/src/PHP/tests/trace_api_context.phpt
index f62a61202..efd1aed35 100644
--- a/src/PHP/tests/trace_api_context.phpt
+++ b/src/PHP/tests/trace_api_context.phpt
@@ -43,7 +43,7 @@ pinpoint_end_trace($id);
 
 ?>
 --EXPECTF--
-[pinpoint] [%d] [%d]#0 pinpoint_start start
+[pinpoint] [%d] [%d]#0 pinpoint_start child #128
 string(1) "a"
 string(1) "b"
 string(1) "c"
@@ -53,8 +53,8 @@ bool(false)
 [pinpoint] [%d] [%d]agent try to connect:(unix:/unexist_file.sock)
 [pinpoint] [%d] [%d]connect:(/unexist_file.sock) failed as (No such file or directory)
 [pinpoint] [%d] [%d]#128 pinpoint_end_trace Done!
-[pinpoint] [%d] [%d]#0 pinpoint_start start
-[pinpoint] [%d] [%d]#128 pinpoint_start start
+[pinpoint] [%d] [%d]#0 pinpoint_start child #128
+[pinpoint] [%d] [%d]#128 pinpoint_start child #127
 string(1) "c"
 string(1) "b"
 string(1) "a"
diff --git a/src/PHP/tests/trace_api_context_tcp.phpt b/src/PHP/tests/trace_api_context_tcp.phpt
index f338c8ffe..feb80c929 100644
--- a/src/PHP/tests/trace_api_context_tcp.phpt
+++ b/src/PHP/tests/trace_api_context_tcp.phpt
@@ -43,7 +43,7 @@ pinpoint_end_trace($id);
 
 ?>
 --EXPECTF--
-[pinpoint] [%d] [%d]#0 pinpoint_start start
+[pinpoint] [%d] [%d]#0 pinpoint_start child #128
 string(1) "a"
 string(1) "b"
 string(1) "c"
@@ -54,8 +54,8 @@ bool(false)
 [pinpoint] [%d] [%d]_do_write_data@215 send data error:(Connection refused) fd:(%d)
 [pinpoint] [%d] [%d]reset peer:%d
 [pinpoint] [%d] [%d]#128 pinpoint_end_trace Done!
-[pinpoint] [%d] [%d]#0 pinpoint_start start
-[pinpoint] [%d] [%d]#128 pinpoint_start start
+[pinpoint] [%d] [%d]#0 pinpoint_start child #128
+[pinpoint] [%d] [%d]#128 pinpoint_start child #127
 string(1) "c"
 string(1) "b"
 string(1) "a"
diff --git a/src/PHP/tests/trace_api_test.phpt b/src/PHP/tests/trace_api_test.phpt
index 9a727068c..273837000 100644
--- a/src/PHP/tests/trace_api_test.phpt
+++ b/src/PHP/tests/trace_api_test.phpt
@@ -53,73 +53,73 @@ echo pinpoint_end_trace()."\n";
 
 ?>
 --EXPECTF--
-[pinpoint] [%d] [%d]#0 pinpoint_start start
+[pinpoint] [%d] [%d]#0 pinpoint_start child #128
 128
 [pinpoint] [%d] [%d]#128 add clue key:name value:ouput_234
-[pinpoint] [%d] [%d]#128 pinpoint_start start
+[pinpoint] [%d] [%d]#128 pinpoint_start child #127
 127
 [pinpoint] [%d] [%d]#127 add clue key:name value:Foo
 [pinpoint] [%d] [%d]#127 add clues:1:234,3432
 [pinpoint] [%d] [%d]#127 add clues:2:234
 [pinpoint] [%d] [%d]#127 pinpoint_end_trace Done!
 128
-[pinpoint] [%d] [%d]#128 pinpoint_start start
+[pinpoint] [%d] [%d]#128 pinpoint_start child #126
 126
 [pinpoint] [%d] [%d]#126 add clue key:name value:Foo
 [pinpoint] [%d] [%d]#126 add clues:1:234,3432
 [pinpoint] [%d] [%d]#126 add clues:2:234
 [pinpoint] [%d] [%d]#126 pinpoint_end_trace Done!
 128
-[pinpoint] [%d] [%d]#128 pinpoint_start start
+[pinpoint] [%d] [%d]#128 pinpoint_start child #125
 125
 [pinpoint] [%d] [%d]#125 add clue key:name value:Foo
 [pinpoint] [%d] [%d]#125 add clues:1:234,3432
 [pinpoint] [%d] [%d]#125 add clues:2:234
 [pinpoint] [%d] [%d]#125 pinpoint_end_trace Done!
 128
-[pinpoint] [%d] [%d]#128 pinpoint_start start
+[pinpoint] [%d] [%d]#128 pinpoint_start child #124
 124
 [pinpoint] [%d] [%d]#124 add clue key:name value:Foo
 [pinpoint] [%d] [%d]#124 add clues:1:234,3432
 [pinpoint] [%d] [%d]#124 add clues:2:234
 [pinpoint] [%d] [%d]#124 pinpoint_end_trace Done!
 128
-[pinpoint] [%d] [%d]#128 pinpoint_start start
+[pinpoint] [%d] [%d]#128 pinpoint_start child #123
 123
 [pinpoint] [%d] [%d]#123 add clue key:name value:Foo
 [pinpoint] [%d] [%d]#123 add clues:1:234,3432
 [pinpoint] [%d] [%d]#123 add clues:2:234
 [pinpoint] [%d] [%d]#123 pinpoint_end_trace Done!
 128
-[pinpoint] [%d] [%d]#128 pinpoint_start start
+[pinpoint] [%d] [%d]#128 pinpoint_start child #122
 122
 [pinpoint] [%d] [%d]#122 add clue key:name value:Foo
 [pinpoint] [%d] [%d]#122 add clues:1:234,3432
 [pinpoint] [%d] [%d]#122 add clues:2:234
 [pinpoint] [%d] [%d]#122 pinpoint_end_trace Done!
 128
-[pinpoint] [%d] [%d]#128 pinpoint_start start
+[pinpoint] [%d] [%d]#128 pinpoint_start child #121
 121
 [pinpoint] [%d] [%d]#121 add clue key:name value:Foo
 [pinpoint] [%d] [%d]#121 add clues:1:234,3432
 [pinpoint] [%d] [%d]#121 add clues:2:234
 [pinpoint] [%d] [%d]#121 pinpoint_end_trace Done!
 128
-[pinpoint] [%d] [%d]#128 pinpoint_start start
+[pinpoint] [%d] [%d]#128 pinpoint_start child #120
 120
 [pinpoint] [%d] [%d]#120 add clue key:name value:Foo
 [pinpoint] [%d] [%d]#120 add clues:1:234,3432
 [pinpoint] [%d] [%d]#120 add clues:2:234
 [pinpoint] [%d] [%d]#120 pinpoint_end_trace Done!
 128
-[pinpoint] [%d] [%d]#128 pinpoint_start start
+[pinpoint] [%d] [%d]#128 pinpoint_start child #119
 119
 [pinpoint] [%d] [%d]#119 add clue key:name value:Foo
 [pinpoint] [%d] [%d]#119 add clues:1:234,3432
 [pinpoint] [%d] [%d]#119 add clues:2:234
 [pinpoint] [%d] [%d]#119 pinpoint_end_trace Done!
 128
-[pinpoint] [%d] [%d]#128 pinpoint_start start
+[pinpoint] [%d] [%d]#128 pinpoint_start child #118
 118
 [pinpoint] [%d] [%d]#118 add clue key:name value:Foo
 [pinpoint] [%d] [%d]#118 add clues:1:234,3432
diff --git a/src/PHP/tests/trace_api_with_id.phpt b/src/PHP/tests/trace_api_with_id.phpt
index 7fa1389db..627cb74f2 100644
--- a/src/PHP/tests/trace_api_with_id.phpt
+++ b/src/PHP/tests/trace_api_with_id.phpt
@@ -45,14 +45,14 @@ pinpoint_add_clue("name","Foo",$id);
 $id = pinpoint_end_trace($id);
 
 --EXPECTF--
-[pinpoint] [%d] [%d]#0 pinpoint_start start
+[pinpoint] [%d] [%d]#0 pinpoint_start child #128
 [pinpoint] [%d] [%d]#128 add clue key:name value:Foo
-[pinpoint] [%d] [%d]#128 pinpoint_start start
+[pinpoint] [%d] [%d]#128 pinpoint_start child #127
 [pinpoint] [%d] [%d]#127 add clues:name:Foo1
-[pinpoint] [%d] [%d]#127 pinpoint_start start
+[pinpoint] [%d] [%d]#127 pinpoint_start child #126
 [pinpoint] [%d] [%d]#126 add clue key:name value:Foo2
 [pinpoint] [%d] [%d]#126 pinpoint_end_trace Done!
-[pinpoint] [%d] [%d]#127 pinpoint_start start
+[pinpoint] [%d] [%d]#127 pinpoint_start child #125
 [pinpoint] [%d] [%d]#125 add clues:name:Foo3
 [pinpoint] [%d] [%d]#125 add clue key:name value:Foo4
 [pinpoint] [%d] [%d]#125 pinpoint_end_trace Done!
diff --git a/src/PHP/tests/trace_limit_test-i448.phpt b/src/PHP/tests/trace_limit_test-i448.phpt
index 7bf8ed48d..bbfa50d02 100644
--- a/src/PHP/tests/trace_limit_test-i448.phpt
+++ b/src/PHP/tests/trace_limit_test-i448.phpt
@@ -34,8 +34,8 @@ if(pinpoint_tracelimit())
 pinpoint_end_trace($id);
 
 --EXPECTF--
-[pinpoint] [%d] [%d]#0 pinpoint_start start
-[pinpoint] [%d] [%d]#128 pinpoint_start start
+[pinpoint] [%d] [%d]#0 pinpoint_start child #128
+[pinpoint] [%d] [%d]#128 pinpoint_start child #127
 string(1) "c"
 string(1) "b"
 string(1) "a"
diff --git a/src/PHP/tests5/add_root_trace.phpt b/src/PHP/tests5/add_root_trace.phpt
index 3294f32c1..9a4eeb054 100644
--- a/src/PHP/tests5/add_root_trace.phpt
+++ b/src/PHP/tests5/add_root_trace.phpt
@@ -21,13 +21,13 @@ $id = pinpoint_end_trace($id);
 $id = pinpoint_end_trace($id);
 $id = pinpoint_end_trace($id);
 --EXPECTF--
-[pinpoint] [%d] [%d]#0 pinpoint_start start
+[pinpoint] [%d] [%d]#0 pinpoint_start child #128
 [pinpoint] [%d] [%d]#128 add clue key:name value:Foo
-[pinpoint] [%d] [%d]#128 pinpoint_start start
+[pinpoint] [%d] [%d]#128 pinpoint_start child #127
 [pinpoint] [%d] [%d]#127 add clues:global:global_value
 [pinpoint] [%d] [%d]#127 add clue key:global value:global_value
 [pinpoint] [%d] [%d]#127 add clues:name:Foo1
-[pinpoint] [%d] [%d]#127 pinpoint_start start
+[pinpoint] [%d] [%d]#127 pinpoint_start child #126
 [pinpoint] [%d] [%d]#126 add clue key:name value:Foo2
 [pinpoint] [%d] [%d]#126 pinpoint_end_trace Done!
 [pinpoint] [%d] [%d]#127 pinpoint_end_trace Done!
diff --git a/src/PHP/tests5/aop_helper_api.phpt b/src/PHP/tests5/aop_helper_api.phpt
index 9b4138d48..8190660c6 100644
--- a/src/PHP/tests5/aop_helper_api.phpt
+++ b/src/PHP/tests5/aop_helper_api.phpt
@@ -112,6 +112,8 @@ array(4) {
   int(4)
 }
 string(12) "hello php!!!"
+[pinpoint] [%d] [%d] catch_error#0 failed with id should not be 0
+[pinpoint] [%d] [%d]apm_error_cb called
 
 Warning: pinpoint_get_func_ref_args():  Called from the global scope - no function context in %s on line 18
 bool(false)
diff --git a/src/PHP/tests5/drop_trace_test.phpt b/src/PHP/tests5/drop_trace_test.phpt
index ea8b915ba..d89158a9c 100644
--- a/src/PHP/tests5/drop_trace_test.phpt
+++ b/src/PHP/tests5/drop_trace_test.phpt
@@ -15,7 +15,7 @@ pinpoint_add_clue("args",'a,$b');
 pinpoint_add_clue("ret",'a,$b');
 pinpoint_end_trace();
 --EXPECTF--
-[pinpoint] [%d] [%d]#0 pinpoint_start start
+[pinpoint] [%d] [%d]#0 pinpoint_start child #128
 [pinpoint] [%d] [%d]change current#128 status, before:2,now:4
 [pinpoint] [%d] [%d]#128 add clue key:args value:a,$b
 [pinpoint] [%d] [%d]#128 add clue key:ret value:a,$b
diff --git a/src/PHP/tests5/mark_as_error.phpt b/src/PHP/tests5/mark_as_error.phpt
new file mode 100644
index 000000000..c58e28d2a
--- /dev/null
+++ b/src/PHP/tests5/mark_as_error.phpt
@@ -0,0 +1,27 @@
+--TEST--
+pinpioint_php internal test case [pinpoint_test_main]
+--SKIPIF--
+<?php if (!extension_loaded("pinpoint_php")) print "skip"; ?>
+--INI--
+pinpoint_php.CollectorHost=unix:/unexist_file.sock
+pinpoint_php.SendSpanTimeOutMs=0
+pinpoint_php.UnitTest=true
+;pinpoint_php._limit for internal use. User do not use it
+pinpoint_php._limit=yes
+pinpoint_php.DebugReport=true
+--FILE--
+<?php 
+pinpoint_start_trace();
+pinpoint_add_clue("args",'a,$b');
+pinpoint_add_clue("ret",'a,$b');
+pinpoint_mark_as_error("message you cared","filename you cared",1023);
+echo pinpoint_end_trace()."\n";
+--EXPECTF--
+[pinpoint] [%d] [%d]#0 pinpoint_start child #128
+[pinpoint] [%d] [%d]#128 add clue key:args value:a,$b
+[pinpoint] [%d] [%d]#128 add clue key:ret value:a,$b
+[pinpoint] [%d] [%d]this span:({"E":%d,"ERR":{"file":"filename you cared","line":1023,"msg":"message you cared"},"FT":%d,"S":%d,"args":"a,$b","ret":"a,$b"})
+[pinpoint] [%d] [%d]agent try to connect:(unix:/unexist_file.sock)
+[pinpoint] [%d] [%d]connect:(/unexist_file.sock) failed as (No such file or directory)
+[pinpoint] [%d] [%d]#128 pinpoint_end_trace Done!
+0
\ No newline at end of file
diff --git a/src/PHP/tests5/node_test.phpt b/src/PHP/tests5/node_test.phpt
index fe73d9153..4cc433401 100644
--- a/src/PHP/tests5/node_test.phpt
+++ b/src/PHP/tests5/node_test.phpt
@@ -25,7 +25,6 @@ pinpoint_get_context('b',$unexist_node);
 pinpoint_end_trace($unexist_node);
 
 --EXPECTF--
-[pinpoint] [%d] [%d]#1024 pinpoint_start start
 [pinpoint] [%d] [%d] start_trace#1024 failed with id is not alive
 [pinpoint] [%d] [%d] pinpoint_add_clue#1024 failed. Reason: id is not alive,parameters:adf:fdfd
 [pinpoint] [%d] [%d] pinpoint_add_clue#1024 failed. Reason: id is not alive,parameters:adf:fdfd
diff --git a/src/PHP/tests5/stack_fetal_error.phpt b/src/PHP/tests5/stack_fetal_error.phpt
index c1d348b1a..34d5cf92e 100644
--- a/src/PHP/tests5/stack_fetal_error.phpt
+++ b/src/PHP/tests5/stack_fetal_error.phpt
@@ -50,8 +50,8 @@ try{
 
 pinpoint_start_trace();
 --EXPECTF--
-[pinpoint] [%d] [%d]#0 pinpoint_start start
-[pinpoint] [%d] [%d]#128 pinpoint_start start
+[pinpoint] [%d] [%d]#0 pinpoint_start child #128
+[pinpoint] [%d] [%d]#128 pinpoint_start child #127
 [pinpoint] [%d] [%d]#127 add clue key:name value:Foo
 [pinpoint] [%d] [%d]apm_error_cb called
 
@@ -61,7 +61,7 @@ Stack trace:
 #1 {main}
   thrown in %s on line 27
 [pinpoint] [%d] [%d]#127 pinpoint_end_trace Done!
-[pinpoint] [%d] [%d]this span:({"E":%d,"ERR":{"file":"%s","line":27,"msg":"Uncaught exception 'Exception' with message 'I am testting' in %s:27\nStack trace:\n#0 %s(34): Test()\n#1 {main}\n  thrown"},"FT":1500,"S":%d,"calls":[{"E":%d,"S":%d,"name":"Foo"}]})
+[pinpoint] [%d] [%d]this span:({"E":0,"ERR":{"file":"%s","line":27,"msg":"Uncaught exception 'Exception' with message 'I am testting' in %s:27\nStack trace:\n#0 %s(34): Test()\n#1 {main}\n  thrown"},"FT":1500,"S":%d,"calls":[{"E":0,"S":0,"name":"Foo"}]})
 [pinpoint] [%d] [%d]agent try to connect:(unix:/unexist_file.sock)
 [pinpoint] [%d] [%d]connect:(/unexist_file.sock) failed as (No such file or directory)
 [pinpoint] [%d] [%d]#128 pinpoint_end_trace Done!
\ No newline at end of file
diff --git a/src/PHP/tests5/trace_api_context.phpt b/src/PHP/tests5/trace_api_context.phpt
index f62a61202..efd1aed35 100644
--- a/src/PHP/tests5/trace_api_context.phpt
+++ b/src/PHP/tests5/trace_api_context.phpt
@@ -43,7 +43,7 @@ pinpoint_end_trace($id);
 
 ?>
 --EXPECTF--
-[pinpoint] [%d] [%d]#0 pinpoint_start start
+[pinpoint] [%d] [%d]#0 pinpoint_start child #128
 string(1) "a"
 string(1) "b"
 string(1) "c"
@@ -53,8 +53,8 @@ bool(false)
 [pinpoint] [%d] [%d]agent try to connect:(unix:/unexist_file.sock)
 [pinpoint] [%d] [%d]connect:(/unexist_file.sock) failed as (No such file or directory)
 [pinpoint] [%d] [%d]#128 pinpoint_end_trace Done!
-[pinpoint] [%d] [%d]#0 pinpoint_start start
-[pinpoint] [%d] [%d]#128 pinpoint_start start
+[pinpoint] [%d] [%d]#0 pinpoint_start child #128
+[pinpoint] [%d] [%d]#128 pinpoint_start child #127
 string(1) "c"
 string(1) "b"
 string(1) "a"
diff --git a/src/PHP/tests5/trace_api_context_tcp.phpt b/src/PHP/tests5/trace_api_context_tcp.phpt
index f62a61202..abb3c4e15 100644
--- a/src/PHP/tests5/trace_api_context_tcp.phpt
+++ b/src/PHP/tests5/trace_api_context_tcp.phpt
@@ -3,7 +3,7 @@ Check  call statck
 --SKIPIF--
 <?php if (!extension_loaded("pinpoint_php")) print "skip"; ?>
 --INI--
-pinpoint_php.CollectorHost=unix:/unexist_file.sock
+pinpoint_php.CollectorHost=tcp:127.0.0.1:9999
 pinpoint_php.SendSpanTimeOutMs=200
 pinpoint_php.UnitTest=true
 ;pinpoint_php._limit for internal use. User do not use it
@@ -43,18 +43,17 @@ pinpoint_end_trace($id);
 
 ?>
 --EXPECTF--
-[pinpoint] [%d] [%d]#0 pinpoint_start start
+[pinpoint] [%d] [%d]#0 pinpoint_start child #128
 string(1) "a"
 string(1) "b"
 string(1) "c"
 [pinpoint] [%d] [%d] pinpoint_get_context_key#128 failed with map::at, parameters:not exist
 bool(false)
 [pinpoint] [%d] [%d]this span:({"E":%d,"FT":1500,"S":%d})
-[pinpoint] [%d] [%d]agent try to connect:(unix:/unexist_file.sock)
-[pinpoint] [%d] [%d]connect:(/unexist_file.sock) failed as (No such file or directory)
+[pinpoint] [%d] [%d]agent try to connect:(tcp:127.0.0.1:9999)
 [pinpoint] [%d] [%d]#128 pinpoint_end_trace Done!
-[pinpoint] [%d] [%d]#0 pinpoint_start start
-[pinpoint] [%d] [%d]#128 pinpoint_start start
+[pinpoint] [%d] [%d]#0 pinpoint_start child #128
+[pinpoint] [%d] [%d]#128 pinpoint_start child #127
 string(1) "c"
 string(1) "b"
 string(1) "a"
@@ -62,5 +61,4 @@ string(1) "a"
 bool(false)
 [pinpoint] [%d] [%d]#127 pinpoint_end_trace Done!
 [pinpoint] [%d] [%d]this span:({"E":%d,"FT":1500,"S":%d,"calls":[{"E":%d,"S":%d}]})
-[pinpoint] [%d] [%d]agent try to connect:(unix:/unexist_file.sock)
 [pinpoint] [%d] [%d]#128 pinpoint_end_trace Done!
\ No newline at end of file
diff --git a/src/PHP/tests5/trace_api_test.phpt b/src/PHP/tests5/trace_api_test.phpt
index 9a727068c..273837000 100644
--- a/src/PHP/tests5/trace_api_test.phpt
+++ b/src/PHP/tests5/trace_api_test.phpt
@@ -53,73 +53,73 @@ echo pinpoint_end_trace()."\n";
 
 ?>
 --EXPECTF--
-[pinpoint] [%d] [%d]#0 pinpoint_start start
+[pinpoint] [%d] [%d]#0 pinpoint_start child #128
 128
 [pinpoint] [%d] [%d]#128 add clue key:name value:ouput_234
-[pinpoint] [%d] [%d]#128 pinpoint_start start
+[pinpoint] [%d] [%d]#128 pinpoint_start child #127
 127
 [pinpoint] [%d] [%d]#127 add clue key:name value:Foo
 [pinpoint] [%d] [%d]#127 add clues:1:234,3432
 [pinpoint] [%d] [%d]#127 add clues:2:234
 [pinpoint] [%d] [%d]#127 pinpoint_end_trace Done!
 128
-[pinpoint] [%d] [%d]#128 pinpoint_start start
+[pinpoint] [%d] [%d]#128 pinpoint_start child #126
 126
 [pinpoint] [%d] [%d]#126 add clue key:name value:Foo
 [pinpoint] [%d] [%d]#126 add clues:1:234,3432
 [pinpoint] [%d] [%d]#126 add clues:2:234
 [pinpoint] [%d] [%d]#126 pinpoint_end_trace Done!
 128
-[pinpoint] [%d] [%d]#128 pinpoint_start start
+[pinpoint] [%d] [%d]#128 pinpoint_start child #125
 125
 [pinpoint] [%d] [%d]#125 add clue key:name value:Foo
 [pinpoint] [%d] [%d]#125 add clues:1:234,3432
 [pinpoint] [%d] [%d]#125 add clues:2:234
 [pinpoint] [%d] [%d]#125 pinpoint_end_trace Done!
 128
-[pinpoint] [%d] [%d]#128 pinpoint_start start
+[pinpoint] [%d] [%d]#128 pinpoint_start child #124
 124
 [pinpoint] [%d] [%d]#124 add clue key:name value:Foo
 [pinpoint] [%d] [%d]#124 add clues:1:234,3432
 [pinpoint] [%d] [%d]#124 add clues:2:234
 [pinpoint] [%d] [%d]#124 pinpoint_end_trace Done!
 128
-[pinpoint] [%d] [%d]#128 pinpoint_start start
+[pinpoint] [%d] [%d]#128 pinpoint_start child #123
 123
 [pinpoint] [%d] [%d]#123 add clue key:name value:Foo
 [pinpoint] [%d] [%d]#123 add clues:1:234,3432
 [pinpoint] [%d] [%d]#123 add clues:2:234
 [pinpoint] [%d] [%d]#123 pinpoint_end_trace Done!
 128
-[pinpoint] [%d] [%d]#128 pinpoint_start start
+[pinpoint] [%d] [%d]#128 pinpoint_start child #122
 122
 [pinpoint] [%d] [%d]#122 add clue key:name value:Foo
 [pinpoint] [%d] [%d]#122 add clues:1:234,3432
 [pinpoint] [%d] [%d]#122 add clues:2:234
 [pinpoint] [%d] [%d]#122 pinpoint_end_trace Done!
 128
-[pinpoint] [%d] [%d]#128 pinpoint_start start
+[pinpoint] [%d] [%d]#128 pinpoint_start child #121
 121
 [pinpoint] [%d] [%d]#121 add clue key:name value:Foo
 [pinpoint] [%d] [%d]#121 add clues:1:234,3432
 [pinpoint] [%d] [%d]#121 add clues:2:234
 [pinpoint] [%d] [%d]#121 pinpoint_end_trace Done!
 128
-[pinpoint] [%d] [%d]#128 pinpoint_start start
+[pinpoint] [%d] [%d]#128 pinpoint_start child #120
 120
 [pinpoint] [%d] [%d]#120 add clue key:name value:Foo
 [pinpoint] [%d] [%d]#120 add clues:1:234,3432
 [pinpoint] [%d] [%d]#120 add clues:2:234
 [pinpoint] [%d] [%d]#120 pinpoint_end_trace Done!
 128
-[pinpoint] [%d] [%d]#128 pinpoint_start start
+[pinpoint] [%d] [%d]#128 pinpoint_start child #119
 119
 [pinpoint] [%d] [%d]#119 add clue key:name value:Foo
 [pinpoint] [%d] [%d]#119 add clues:1:234,3432
 [pinpoint] [%d] [%d]#119 add clues:2:234
 [pinpoint] [%d] [%d]#119 pinpoint_end_trace Done!
 128
-[pinpoint] [%d] [%d]#128 pinpoint_start start
+[pinpoint] [%d] [%d]#128 pinpoint_start child #118
 118
 [pinpoint] [%d] [%d]#118 add clue key:name value:Foo
 [pinpoint] [%d] [%d]#118 add clues:1:234,3432
diff --git a/src/PHP/tests5/trace_api_with_id.phpt b/src/PHP/tests5/trace_api_with_id.phpt
index 7fa1389db..627cb74f2 100644
--- a/src/PHP/tests5/trace_api_with_id.phpt
+++ b/src/PHP/tests5/trace_api_with_id.phpt
@@ -45,14 +45,14 @@ pinpoint_add_clue("name","Foo",$id);
 $id = pinpoint_end_trace($id);
 
 --EXPECTF--
-[pinpoint] [%d] [%d]#0 pinpoint_start start
+[pinpoint] [%d] [%d]#0 pinpoint_start child #128
 [pinpoint] [%d] [%d]#128 add clue key:name value:Foo
-[pinpoint] [%d] [%d]#128 pinpoint_start start
+[pinpoint] [%d] [%d]#128 pinpoint_start child #127
 [pinpoint] [%d] [%d]#127 add clues:name:Foo1
-[pinpoint] [%d] [%d]#127 pinpoint_start start
+[pinpoint] [%d] [%d]#127 pinpoint_start child #126
 [pinpoint] [%d] [%d]#126 add clue key:name value:Foo2
 [pinpoint] [%d] [%d]#126 pinpoint_end_trace Done!
-[pinpoint] [%d] [%d]#127 pinpoint_start start
+[pinpoint] [%d] [%d]#127 pinpoint_start child #125
 [pinpoint] [%d] [%d]#125 add clues:name:Foo3
 [pinpoint] [%d] [%d]#125 add clue key:name value:Foo4
 [pinpoint] [%d] [%d]#125 pinpoint_end_trace Done!
diff --git a/src/PHP/tests5/trace_limit_test-i448.phpt b/src/PHP/tests5/trace_limit_test-i448.phpt
index 7bf8ed48d..60b5d334a 100644
--- a/src/PHP/tests5/trace_limit_test-i448.phpt
+++ b/src/PHP/tests5/trace_limit_test-i448.phpt
@@ -34,15 +34,15 @@ if(pinpoint_tracelimit())
 pinpoint_end_trace($id);
 
 --EXPECTF--
-[pinpoint] [%d] [%d]#0 pinpoint_start start
-[pinpoint] [%d] [%d]#128 pinpoint_start start
+[pinpoint] [%d] [%d]#0 pinpoint_start child #128
+[pinpoint] [%d] [%d]#128 pinpoint_start child #127
 string(1) "c"
 string(1) "b"
 string(1) "a"
 [pinpoint] [%d] [%d] pinpoint_get_context_key#127 failed with map::at, parameters:not exist
 bool(false)
 [pinpoint] [%d] [%d]#127 pinpoint_end_trace Done!
-[pinpoint] [%d] [%d]This span dropped. max_trace_limit:0 current_tick:0 onLine:1
+[pinpoint] [%d] [%d]This span dropped. max_trace_limit:0 current_tick:2 onLine:1
 [pinpoint] [%d] [%d]change current#128 status, before:2,now:4
 [pinpoint] [%d] [%d]current#128 span dropped,due to TRACE_BLOCK
 [pinpoint] [%d] [%d]#128 pinpoint_end_trace Done!
\ No newline at end of file