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

Issue:
Style py import
update pinpointPy version


Discussion / hints:

Fix patch:
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 7cebaee68..bf57a38e6 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -40,12 +40,46 @@ jobs:
           ./configure
           make
           make test TESTS=src/PHP/tests5/
-        
-  PHP78:
+  
+  PHP7:
     runs-on: ubuntu-18.04
     strategy:
       matrix:
-        php-versions: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0','8.1']
+        php-versions: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0']
+    steps:
+      - uses: actions/checkout@v2
+      - name: set mysql
+        run: |
+          sudo service mysql start
+          sudo mysql --host='127.0.0.1' --user='root' --password='root' < '/home/runner/work/pinpoint-c-agent/pinpoint-c-agent/testapps/PHP/tests/script.sql'
+      - name: set redis
+        run: |
+          sudo apt-get install redis-server
+      - uses: shivammathur/setup-php@v2
+        with:
+          php-version: ${{ matrix.php-versions }}
+          extensions: redis-phpredis/phpredis@5.3.4
+      - name: testapp
+        run: |
+          phpize
+          ./configure
+          make
+          make test TESTS=src/PHP/tests/
+          sudo make install
+          sudo echo "extension=pinpoint_php.so" >> /etc/php/${{ matrix.php-versions }}/cli/php.ini
+          sudo echo "error_log = /home/runner/work/pinpoint-c-agent/pinpoint-c-agent/testapps/PHP/tests/php_error.log" >> /etc/php/${{ matrix.php-versions }}/cli/php.ini
+          sudo echo "pinpoint_php.DebugReport=true" >> /etc/php/${{ matrix.php-versions }}/cli/php.ini
+          cd testapps/PHP
+          composer install
+          cp tests/think .
+          cat think
+          php think unit -v
+          
+  PHP8:
+    runs-on: ubuntu-18.04
+    strategy:
+      matrix:
+        php-versions: ['8.1']
     steps:
       - uses: actions/checkout@v2
       - uses: shivammathur/setup-php@v2
@@ -75,6 +109,7 @@ jobs:
           pip install -r requirements.txt 
           python setup.py install
           nosetests src/PY/test --ignore-files="TestCoroutines.*"
+          
   Collector-agent:
       strategy:
         matrix:
@@ -93,4 +128,3 @@ jobs:
             go mod download
             go build
             go test ./... -v
-            
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 4ca85ca7a..20587417b 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -2,7 +2,7 @@ name: publish
 
 on: 
   release:
-    types: [published]
+    types: [workflow_dispatch]
   workflow_dispatch:
 
 jobs:
@@ -73,6 +73,8 @@ jobs:
           pip install twine
       - name: package
         run: |
+          rm setup.py
+          ln -s setup_pypi.py setup.py
           python setup.py sdist
           twine check dist/*
       - name: Publish package pypi
diff --git a/.gitignore b/.gitignore
index 01e34ba5d..7120b1cca 100644
--- a/.gitignore
+++ b/.gitignore
@@ -34,3 +34,38 @@ temp
 vendor
 Example/*/Cache/*
 CollectorAgentDocker/env.list
+autom4te.cache/
+env2/
+pinpointPy.egg-info/
+acinclude.m4
+CHANGELOG.md
+collector.agent.log
+config.guess
+config.h
+config.h.in
+config.h.in~
+config.log
+config.nice
+config.status
+config.sub
+configure
+configure.ac
+configure.in
+install-sh
+libtool
+ltmain.sh
+Makefile
+Makefile.fragments
+Makefile.global
+Makefile.objects
+MANIFEST
+missing
+mkinstalldirs
+run-tests.php
+test.php
+.libs/
+.libs/
+aclocal.m4
+src/PHP/pinpoint_php.dep
+testapps/PHP/composer.phar
+collector-agent/collector-agent
diff --git a/DOC/API/PY/help(pinpointPy).txt b/DOC/API/PY/help(pinpointPy).txt
index a3b861c89..ccaa99ae8 100644
--- a/DOC/API/PY/help(pinpointPy).txt
+++ b/DOC/API/PY/help(pinpointPy).txt
@@ -1,52 +1,50 @@
-Help on module pinpointPy:
+Help on package pinpointPy:
 
 NAME
-    pinpointPy - python agent for pinpoint platform
+    pinpointPy
 
-FILE
-    /home/test/apps/pinpoint-c-agent/env2/lib/python2.7/site-packages/pinpointPy.so
+DESCRIPTION
+    # ******************************************************************************
+    #   Copyright  2020. NAVER Corp.
+    #
+    #   Licensed under the Apache License, Version 2.0 (the "License");
+    #   you may not use this file except in compliance with the License.
+    #   You may obtain a copy of the License at
+    #
+    #       http://www.apache.org/licenses/LICENSE-2.0
+    #
+    #   Unless required by applicable law or agreed to in writing, software
+    #   distributed under the License is distributed on an "AS IS" BASIS,
+    #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    #   See the License for the specific language governing permissions and
+    #   limitations under the License.
+    # ******************************************************************************
+
+PACKAGE CONTENTS
+    Bottle (package)
+    Common
+    CommonPlugin
+    Defines
+    Django (package)
+    Fastapi (package)
+    Flask (package)
+    Helper
+    Interceptor
+    RequestPlugins
+    WSGIPlugin
+    libs (package)
+    pinpoint
+    pyramid (package)
+    pyweb (package)
+    pyweb2 (package)
 
 FUNCTIONS
-    add_clue(...)
-        def add_clue(string key,string value,int id=-1,int loc=0)
-    
-    add_clues(...)
-        def add_clues(string key,string value,int id=-1,int loc=0)
-    
-    check_tracelimit(...)
-        def check_tracelimit(long timestamp=-1): #check trace whether is limit
-    
-    drop_trace(...)
-        def drop_trace(int id=-1):# drop this trace
-    
-    enable_debug(...)
-        def enable_debug(callback):#enable logging output(callback )
-    
-    end_trace(...)
-        def end_trace(int id=-1):# end currently matched trace
-    
-    force_flush_trace(...)
-        def force_flush_trace(int id=-1): #force flush span during timeout
+    monkey_patch_for_pinpoint(pymongo=True, PyMysql=True, pyRedis=True, requests=True, urllib=True, sqlalchemy=True, MySQLdb=True, DjangoRest=True, MysqlConnector=True)
     
-    get_context_key(...)
-        def get_context_key(key,int id=-1)->string
-    
-    mark_as_error(...)
-        def mark_as_error(string msg,string file_name,uint line_no,int id=-1): #This trace found an error
-    
-    set_agent(...)
-        def set_agent(collector_host="unix:/tmp/collector-agent.sock or tcp:host:port",trace_limit=-1): # set pinpint collector information
-    
-    set_context_key(...)
-        def set_context_key(string key,string value,int id=-1): # create a key-value pair that bases on current trace chain
-    
-    start_time(...)
-        def start_time()->long
-    
-    start_trace(...)
-        def start_trace(int id=-1):# create a new trace and insert into trace chain
-    
-    unique_id(...)
-        def unique_id()-> long
+    set_agent(app_id_str: str, app_name_str: str, collect_agent_host: str, trace_limit: int = -1, debug_callback=True)
+
+DATA
+    __all__ = ['monkey_patch_for_pinpoint', 'set_agent']
 
-(END)
+VERSION
+    0.1.0
\ No newline at end of file
diff --git a/DOC/PHP/Readme-CN.md b/DOC/PHP/Readme-CN.md
index bd7ce3a41..561cc9345 100644
--- a/DOC/PHP/Readme-CN.md
+++ b/DOC/PHP/Readme-CN.md
@@ -5,51 +5,23 @@
 
 ### 要求
 
-依赖|版本
----|----
-PHP| php `7+` ,`5+`
-GCC| GCC `4.7+`
-cmake| cmake `3.8+`
-*inux|
-GO |
-pinpoint| `1.8.0+`, `2.0+`
-**Composer**| 
+依赖|版本|附加
+---|----|----
+PHP| php `7+`|
+GO | | 
+GCC| GCC `4.7+`| C++11 
+cmake| cmake `3.2+`|
+*inux|| `windows is on the way`
+pinpoint| `2.0+`|
+composer| | class can be automatic pinpoint-cut
+collector-agent| [installed ?](../collector-agent/readme.md)
 
 ### 安装
 
 #### 步骤
 1. 执行命令：git clone https://github.com/pinpoint-apm/pinpoint-c-agent.git
 
-2. 在 collector-agent(`pinpoint-c-agent/collector-agent`) 目录下安装 `Collector-Agent`
-       
-    `Collector-Agent` 负责接收并格式化 `PHP/Python/C/CPP-Agent` 的span然后转发给 `Pinpoint-Collector`。由于 `Collector-Agent` 使用[golang](https://golang.google.cn/) 语言编写， 请先安装golang。[Install GO](https://golang.google.cn/doc/install)
-
-      1. 执行命令 `go build`
-      2. 添加环境变量:
-         ```
-           export PP_COLLECTOR_AGENT_SPAN_IP=dev-pinpoint
-           export PP_COLLECTOR_AGENT_SPAN_PORT=9993
-           export PP_COLLECTOR_AGENT_AGENT_IP=dev-pinpoint
-           export PP_COLLECTOR_AGENT_AGENT_PORT=9991
-           export PP_COLLECTOR_AGENT_STAT_IP=dev-pinpoint
-           export PP_COLLECTOR_AGENT_STAT_PORT=9992
-           export PP_COLLECTOR_AGENT_ISDOCKER=false
-           export PP_LOG_DIR=/tmp/
-           export PP_Log_Level=INFO
-           export PP_ADDRESS=0.0.0.0@9999
-         ```
-         1. `PP_COLLECTOR_AGENT_SPAN_IP`, `PP_COLLECTOR_AGENT_AGENT_IP`, `PP_COLLECTOR_AGENT_STAT_IP`: 设置为 `pinpoint-collector` 的IP.
-         2. `PP_COLLECTOR_AGENT_SPAN_PORT`, `PP_COLLECTOR_AGENT_AGENT_PORT`, `PP_COLLECTOR_AGENT_STAT_PORT`: 设置为 `pinpoint-collector`(grpc) 的端口(默认9993，9992， 9991).
-         3. `PP_LOG_DIR`: 设置 `Collector-Agent` 日志存放路径.
-         4. `PP_Log_Level`: 设置日志的级别（DEBUG, INFO, WARN, ERROR）.
-         5. `PP_ADDRESS`: 设置 `Collector-Agent` 的地址合端口，`PHP/Python-Agent` 将会通过这个地址连接 `pinpoint-collctor`。
-      3. 运行 `Collector-Agent`，执行命令：`./CollectorAgent`
-         
-   `Collector-Agent` 数据的说明：
-   [Json string map to Pinpoint item](../API/collector-agent/Readme.md)
-   
-
-3. 安装 pinpoint-php-module， 在pinpoint-c-agent安装包的根目录下，执行以下命令：
+2. 安装 pinpoint-php-module， 在pinpoint-c-agent安装包的根目录下，执行以下命令：
    1. phpize        
    2. ./configure
    3. make 
@@ -72,30 +44,18 @@ pinpoint| `1.8.0+`, `2.0+`
         ;error_log = /tmp/php_fpm_error.log
         ```
         
-     > 试试 aop example
-4. 在您的项目中使用Pinpoint PHP Agent，请执行以下步骤：
+3. 在您的项目中使用Pinpoint PHP-Agent，请执行以下步骤：
 
    我们假设您已经安装composer，并了解怎么使用composer[如何使用 Composer?](https://getcomposer.org/doc/00-intro.md)
 
-   1. 拷贝[Plugins](../../plugins/PHP/Plugins)到您的项目根路径下，并在```composer.josn```中自动加载```Plugins```. 
-
-      > composer.josn
-      ```
-      "autoload": {
-               "psr-4": {
-                  ......
-                  "Plugins\\": path to the Plugins
-               }
-         },
-      ```
-   2. 安装 ```pinpoint-apm/pinpoint-php-aop```, 在```composer.josn```的```require```中添加```"pinpoint-apm/pinpoint-php-aop": "v2.0.1"```:
+   1. 安装 ```pinpoint-apm/pinpoint-php-aop```, 在```composer.josn```的```require```中添加```"pinpoint-apm/pinpoint-php-aop": "v2.0.1"```:
         ```
         "require": {
             ...
             "pinpoint-apm/pinpoint-php-aop": "v2.0.1"
         }
         ```
-   3. 在项目的入口文件中添加下面的常量：
+   2. 在项目的入口文件中添加下面的常量：
         ```
         #################################################
         define('APPLICATION_NAME','APP-2');
@@ -116,7 +76,13 @@ pinpoint| `1.8.0+`, `2.0+`
         6. ```PP_REQ_PLUGINS```: ```PerRequestPlugins```的路径(```PerRequestPlugins```是基本的请求拦截器, 不同的PHP框架的拦截器不同，我们已经为您准备了一些框架的```PerRequestPlugins```，[请到这里获取](../../plugins/PHP/Plugins/Framework)，（例如:[swoole's PerRequestPlugins](../../plugins/PHP/Plugins/Framework/Swoole/Http/PerReqPlugin.php)）。欢迎PR其他框架哟~
         7. ```require_once __DIR__. path to 'vendor/pinpoint-apm/pinpoint-php-aop/auto_pinpointed.php';```: 导入pinpoint的auto_pinpointed.php。**请在```require_once __DIR__."/../vendor/autoload.php";```之后添加，这很重要**
 
-      另外，我们还准备了一些例子以供参考：[plugins/PHP](../../plugins/PHP)。
+   3. 拷贝[Plugins](../../plugins/PHP/Plugins)到您的项目根路径下，并在```composer.josn```中自动加载```Plugins```. 
+         Frameworks:
+            [ThinkPHP5](../../plugins/PHP/Framework/ThinkPHP5)
+            [Yii2](../../plugins/PHP/Framework/Yii2)
+            [laravel](../../plugins/PHP/Framework/laravel)
+    
+      另外，我们还准备了一些例子以供参考：[testapps](../../testapps/PHP)。
 
 
 ##  变化
diff --git a/DOC/PHP/Readme.md b/DOC/PHP/Readme.md
index a3db714b8..028eeabf0 100644
--- a/DOC/PHP/Readme.md
+++ b/DOC/PHP/Readme.md
@@ -7,47 +7,21 @@ What we have supported and what will support: [support plan](SupportPlan.md)
 
 Dependency|Version| More
 ---|----|----
-PHP| php `7+` ,`5+`|
+PHP| php `7+`|
 GO | | 
 GCC| GCC `4.7+`| C++11 
 cmake| cmake `3.2+`|
 *inux|| `windows is on the way`
 pinpoint| `2.0+`|
 composer| | class can be automatic pinpoint-cut
+collector-agent| [installed ?](../collector-agent/readme.md)
 
 ### Installation
 
 #### Steps
 1. git clone https://github.com/pinpoint-apm/pinpoint-c-agent.git
-   
-2. Goto collector-agent(`pinpoint-c-agent/collector-agent`) and build `Collector-Agent`
-
-    `Collector-Agent`, who formats the span from PHP/Python/C/CPP-Agent and send to `Pinpoint-Collector`, is an agent written by [golang](https://golang.google.cn/).Please install golang before the following steps.[Install GO](https://golang.google.cn/doc/install)
-   1. Execute command `go build`
-   2. Add environment variables:
-      ```
-        export PP_COLLECTOR_AGENT_SPAN_IP=dev-pinpoint
-        export PP_COLLECTOR_AGENT_SPAN_PORT=9993
-        export PP_COLLECTOR_AGENT_AGENT_IP=dev-pinpoint
-        export PP_COLLECTOR_AGENT_AGENT_PORT=9991
-        export PP_COLLECTOR_AGENT_STAT_IP=dev-pinpoint
-        export PP_COLLECTOR_AGENT_STAT_PORT=9992
-        export PP_COLLECTOR_AGENT_ISDOCKER=false
-        export PP_LOG_DIR=/tmp/
-        export PP_Log_Level=INFO
-        export PP_ADDRESS=0.0.0.0@9999
-      ```
-      1. `PP_COLLECTOR_AGENT_SPAN_IP`, `PP_COLLECTOR_AGENT_AGENT_IP`, `PP_COLLECTOR_AGENT_STAT_IP`: Set the IP of pinpoint-collector.
-      2. `PP_COLLECTOR_AGENT_SPAN_PORT`, `PP_COLLECTOR_AGENT_AGENT_PORT`, `PP_COLLECTOR_AGENT_STAT_PORT`: Set the port of pinpoint-collector(grpc).
-      3. `PP_LOG_DIR`: Set the path of Collector-Agent's log file.
-      4. `PP_Log_Level`: Set the log level.
-      5. `PP_ADDRESS`: Set the address of `Collector-Agent`, then `PHP/Python-Agent` will connect Collector-Agent through this address.
-   3. Run `Collector-Agent` by executing command `./CollectorAgent`
-   
-   Collector Agent Span Specification
-   [Json string map to Pinpoint item](../API/collector-agent/Readme.md)
-   
-3. Build pinpoint-php-module, goto the root directory of pinpoint-c-agent installation package, and do following steps:
+      
+2. Build pinpoint_php module, goto the root directory of pinpoint-c-agent installation package, and do following steps:
    1. phpize        
    2. ./configure
    3. make 
@@ -72,29 +46,22 @@ composer| | class can be automatic pinpoint-cut
         ;error_log = /tmp/php_fpm_error.log
         ```
 
-4. Use Pinpoint PHP Agent in your project, and follow the steps below: 
+3. Use Pinpoint PHP-Agent in your project, and follow the steps below: 
     
     We assume that you have installed composer and known how to use it. [How to Use Composer?](https://getcomposer.org/doc/00-intro.md)
 
-   1. Download [ `pinpoint-php-plugins.tar.gz`](https://github.com/pinpoint-apm/pinpoint-c-agent/releases/download/V2020.12.17/pinpoint-php-plugins-v0.0.1.tar.gz)  and autoload ```Plugins``` in ```composer.json```.
-   
-        > composer.json
-        ```
-        "autoload": {
-                "psr-4": {
-                    ......
-                    "Plugins\\": path to the Plugins
-                }
-            },
-        ```
-   2. Add ```pinpoint-apm/pinpoint-php-aop``` into composer.json and update.
+   1. Add ```pinpoint-apm/pinpoint-php-aop``` into composer.json and update.
         ```
         "require": {
             ...
-            "pinpoint-apm/pinpoint-php-aop": "v2.0.1"
+            "pinpoint-apm/pinpoint-php-aop": "dev-master"
         }
         ```
-   3. Add the following constants in the index file of your project:
+        or
+        ```
+        composer require pinpoint-apm/pinpoint-php-aop
+        ```
+   2. Add the following constants in the index file of your project:
    
         ```
         #################################################
@@ -103,8 +70,6 @@ composer| | class can be automatic pinpoint-cut
         define('AOP_CACHE_DIR',__DIR__.'./Cache/');
         define('PLUGINS_DIR',__DIR__.'./Plugins/');
         define('PINPOINT_USE_CACHE','YES');
-        define('PP_REQ_PLUGINS', '\Plugins\PerRequestPlugins');
-        #define('USER_DEFINED_CLASS_MAP_IMPLEMENT',"\Plugins\Framework\app\ClassMapInFile");
         require_once __DIR__. path to 'vendor/pinpoint-apm/pinpoint-php-aop/auto_pinpointed.php';
         #################################################
         ```
@@ -113,10 +78,15 @@ composer| | class can be automatic pinpoint-cut
         3. ```AOP_CACHE_DIR```: Where to generate ```Cache```.
         4. ```PLUGINS_DIR```: Path to ```Plugins```.
         5. ```PINPOINT_USE_CACHE```: 'YES' will not update ```Cache``` when request coming; 'No' will update ```Cache``` when every request coming.(You can also update ```Cache``` by just deleting it.) Considering the performance, we recommend 'YES'. Further more, if you modify the plugins, you should update the ```Cache``` to take effect.
-        6. ```PP_REQ_PLUGINS```: path to ```PerRequestPlugins```(```PerRequestPlugins``` is the base interceptor, different framework should use different ```PerRequestPlugins```) Where is PerRequestPlugins? ```Swoole``` for example: [swoole's PerRequestPlugins](../../plugins/PHP/Plugins/Framework/Swoole/Http/PerReqPlugin.php). We have prepared some framework's ```PerRequestPlugins``` for you [Here](../../plugins/PHP/Plugins/Framework), and welcome to pull request other frameworks.
-        7. ```require_once __DIR__. path to 'vendor/pinpoint-apm/pinpoint-php-aop/auto_pinpointed.php';```: Require pinpoint's ```auto_pinpointed.php```.**Please add after ```require_once __DIR__."/../vendor/autoload.php";```, this is very important!**
-
-    We have prepared some examples for you, please goto [testapps](../../testapps/PHP).
+        6. ```require_once __DIR__. path to 'vendor/pinpoint-apm/pinpoint-php-aop/auto_pinpointed.php';```: Require pinpoint's ```auto_pinpointed.php```.**Please add after ```require_once __DIR__."/../vendor/autoload.php";```, this is very important!**
+
+    1. Choose you framework and copy the directory as `Plugins` to the root of your application, autoload ```Plugins``` in ```composer.json```.
+        Details for frameworks:
+        1. [ThinkPHP5](../../plugins/PHP/Framework/ThinkPHP5)
+        2. [Yii2](../../plugins/PHP/Framework/Yii2)
+        3. [laravel](../../plugins/PHP/Framework/laravel)
+        
+>We have prepared some examples for you, please goto [testapps](../../testapps/PHP).
 
 
 ## Changes 
diff --git a/DOC/PHP/User Manual-CN.md b/DOC/PHP/User Manual-CN.md
index eb5911ef1..ddc5f9080 100644
--- a/DOC/PHP/User Manual-CN.md
+++ b/DOC/PHP/User Manual-CN.md
@@ -83,7 +83,7 @@ class Foo{
     }
     ...
 ```
-[ [跳转到 GeneratorPlugin ☚] ](../../plugins/PHP/Plugins/AutoGen/app/GeneratorPlugin.php)
+[ [跳转到 GeneratorPlugin ☚] ](../../testapps/PHP/Plugins/AutoGen/app/GeneratorPlugin.php)
 
 #### 2.2.2 PDO::prepare方法返回了一个PDOStatement类
 
@@ -102,4 +102,4 @@ $yellow = $sth->fetchAll();
 
 ```
 
-用[Plugins\PDOStatement](../../plugins/PHP/Plugins/Sys/PDO/ProfilerPDOStatement.php)替换$dbh->prepare方法的返回值
+用[ProfilerPDOStatement](https://github.com/pinpoint-apm/pinpoint-php-aop/tree/master/lib/Pinpoint/Plugins/Sys/PDO/ProfilerPDOStatement.php)替换$dbh->prepare方法的返回值
diff --git a/DOC/PHP/User Manual.md b/DOC/PHP/User Manual.md
index a6b5dc792..63ba6511e 100644
--- a/DOC/PHP/User Manual.md
+++ b/DOC/PHP/User Manual.md
@@ -83,7 +83,7 @@ Replace the return object with a decorated object in onEnd(). There are some [ma
     }
     ...
 ```
-[ [Goto GeneratorPlugin ☚] ](../../plugins/PHP/Plugins/AutoGen/app/GeneratorPlugin.php)
+[ [Goto GeneratorPlugin ☚] ](../../testapps/PHP/Plugins/AutoGen/app/GeneratorPlugin.php)
 
 #### 2.2.2 PDO::prepare return a PDOStatement
 
@@ -102,5 +102,5 @@ $yellow = $sth->fetchAll();
 
 ```
 
-Replace $dbh->prepare return value with [ProfilerPDOStatement](../../plugins/PHP/Plugins/Sys/PDO/ProfilerPDOStatement.php).
+Replace $dbh->prepare return value with [ProfilerPDOStatement](https://github.com/pinpoint-apm/pinpoint-php-aop/tree/master/lib/Pinpoint/Plugins/Sys/PDO/ProfilerPDOStatement.php).
 
diff --git a/DOC/PY/Readme-CN.md b/DOC/PY/Readme-CN.md
index a5d77ef6f..4eea1bcd0 100644
--- a/DOC/PY/Readme-CN.md
+++ b/DOC/PY/Readme-CN.md
@@ -1,5 +1,4 @@
-## 支持计划
-我们已经支持以及将要支持的计划详情: [支持计划](SupportPlan.md)
+# pinpoint-py agent 使用说明
 
 ## 入门指南
 
@@ -14,50 +13,94 @@ gcc|gcc 4.7+
 cmake| 3.0+
 *inux| 
 pinpoint| 2.0+(GRPC)
+collector-agent| [installed ?](../collector-agent/readme.md)
 
 ### 安装步骤
 
 #### 搭建 pinpointPy 模块
 
-1. 安装python虚拟环境，请参考
-https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/
-
-2. 安装 pinpointPy（建议在Python虚拟环境下执行）
 ```shell
 $ pip install pinpointPy
 ```
-#### 安装 Collector Agent
-`Collector-Agent` 负责接收并格式化 `PHP/Python/C/CPP-Agent` 的span然后转发给 `Pinpoint-Collector`。由于 `Collector-Agent` 使用[golang](https://golang.google.cn/) 语言编写， 请先安装golang。[Install GO](https://golang.google.cn/doc/install)
-
-  1. 执行命令 `go build`
-  2. 添加环境变量:
-     ```
-       export PP_COLLECTOR_AGENT_SPAN_IP=dev-pinpoint
-       export PP_COLLECTOR_AGENT_SPAN_PORT=9993
-       export PP_COLLECTOR_AGENT_AGENT_IP=dev-pinpoint
-       export PP_COLLECTOR_AGENT_AGENT_PORT=9991
-       export PP_COLLECTOR_AGENT_STAT_IP=dev-pinpoint
-       export PP_COLLECTOR_AGENT_STAT_PORT=9992
-       export PP_COLLECTOR_AGENT_ISDOCKER=false
-       export PP_LOG_DIR=/tmp/
-       export PP_Log_Level=INFO
-       export PP_ADDRESS=0.0.0.0@9999
-     ```
-     1. `PP_COLLECTOR_AGENT_SPAN_IP`, `PP_COLLECTOR_AGENT_AGENT_IP`, `PP_COLLECTOR_AGENT_STAT_IP`: 设置为 `pinpoint-collector` 的IP.
-     2. `PP_COLLECTOR_AGENT_SPAN_PORT`, `PP_COLLECTOR_AGENT_AGENT_PORT`, `PP_COLLECTOR_AGENT_STAT_PORT`: 设置为 `pinpoint-collector`(grpc) 的端口(默认9993，9992， 9991).
-     3. `PP_LOG_DIR`: 设置 `Collector-Agent` 日志存放路径.
-     4. `PP_Log_Level`: 设置日志的级别（DEBUG, INFO, WARN, ERROR）.
-     5. `PP_ADDRESS`: 设置 `Collector-Agent` 的地址合端口，`PHP/Python-Agent` 将会通过这个地址连接 `pinpoint-collctor`。
-  3. 运行 `Collector-Agent`，执行命令：`./CollectorAgent`
-         
-   `Collector-Agent` 数据的说明：
-   [Json string map to Pinpoint item](../API/collector-agent/Readme.md)
-   
-
-
-### [如何使用]
-[请点击 ☚](../../plugins/PY/Readme.md)
 
+### 框架集成
+
+
+#### 1.1 Flask
+
+> include middleware
+
+```
+app = Flask(__name__)
+app.wsgi_app = PinPointMiddleWare(app,app.wsgi_app)
+```
+
+#### 1.2 Django
+
+> append into django middleware
+
+
+settings.py
+
+```python
+
+MIDDLEWARE = [
+    'pinpointPy.Django.DjangoMiddleWare',
+    ...
+    ]
+
+```
+
+#### 1.3 Tornado
+
+Todo....
+
+#### 1.4 pyramid
+
+> Add pinpoint_tween middleware
+
+```python
+
+    config = Configurator(settings=settings, root_factory="conduit.auth.RootFactory")
+    config.add_tween('pinpoint.pyramid.tween.pinpoint_tween')
+
+```
+
+Example [pinpoint-in-pyramid](https://github.com/eeliu/pinpoint-in-pyramid)
+
+#### 1.5 bottle
+
+> Loading pinpint.Bottle before application run
+
+Example [pinpoint-in-bottle](https://github.com/eeliu/pinpoint-in-bottle)
+
+#### 1.6 aiohttp
+
+Todo....
+
+#### 1.7 web.py
+
+> Add pinpoint middleware
+
+> Example [py-web](https://github.com/eeliu/pinpoint-in-pyweb)
+
+
+#### 1.8 web2.py (synchronize)
+
+> Add pinpoint middleware
+
+> Example [py-web2](https://github.com/eeliu/pinpoint-in-pyweb2)
+
+### 2. 配置
+
+```py
+
+# enable auto-interceptor plugins
+monkey_patch_for_pinpoint()
+# set pinpoint related environment
+set_agent("flask-agent","FLASK-AGENT",'tcp:dev-collector:9999',-1)
+
+```
 
 ## 性能测试结果
 
diff --git a/DOC/PY/Readme.md b/DOC/PY/Readme.md
index d212259e4..f759a3991 100644
--- a/DOC/PY/Readme.md
+++ b/DOC/PY/Readme.md
@@ -1,60 +1,104 @@
-﻿## Support Plan
-What we have supported and what we are going to support: [support plan](SupportPlan.md)
+﻿# Tutorial for pinpoint-py agent
 
 ## Getting Started
 
-### Requirement
+> Requirement
 
 Dependency| Version| More
 ---|----|---
 python |2.7,3+ | (async must 3.7.1+)
 GO | | 
 gcc|gcc 4.7+| c++11
-cmake| 3.1+| ✔
+cmake| 3.1+| 
 *inux|  | `windows` is on the way
 pinpoint| 2.0+(GRPC)|
+collector-agent| [installed ?](../collector-agent/readme.md)
 
 ### Installation
 
-#### pinpointPy 
-
 ```shell
 $ pip install pinpointPy
 ```
-### Download pinpoint-python-plugins
-
-[pinpoint-python-plugins.tar.gz](https://github.com/pinpoint-apm/pinpoint-c-agent/releases/download/V2020.12.17/pinpoint-python-plugins.tar.gz)
-
-#### Install Collector Agent
-`Collector-Agent`, who formats the span from PHP/Python/C/CPP-Agent and send to `Pinpoint-Collector`, is an agent written by [golang](https://golang.google.cn/).Please install golang before the following steps.[Install GO](https://golang.google.cn/doc/install)
-
-1. Goto collector-agent(`pinpoint-c-agent/collector-agent`)
-2. Execute command `go build`
-3. Add environment variables:
-    ```
-    export PP_COLLECTOR_AGENT_SPAN_IP=dev-pinpoint
-    export PP_COLLECTOR_AGENT_SPAN_PORT=9993
-    export PP_COLLECTOR_AGENT_AGENT_IP=dev-pinpoint
-    export PP_COLLECTOR_AGENT_AGENT_PORT=9991
-    export PP_COLLECTOR_AGENT_STAT_IP=dev-pinpoint
-    export PP_COLLECTOR_AGENT_STAT_PORT=9992
-    export PP_COLLECTOR_AGENT_ISDOCKER=false
-    export PP_LOG_DIR=/tmp/
-    export PP_Log_Level=INFO
-    export PP_ADDRESS=0.0.0.0@9999
-    ```
-    1. `PP_COLLECTOR_AGENT_SPAN_IP`, `PP_COLLECTOR_AGENT_AGENT_IP`, `PP_COLLECTOR_AGENT_STAT_IP`: Set the IP of pinpoint-collector.
-    2. `PP_COLLECTOR_AGENT_SPAN_PORT`, `PP_COLLECTOR_AGENT_AGENT_PORT`, `PP_COLLECTOR_AGENT_STAT_PORT`: Set the port of pinpoint-collector(grpc).
-    3. `PP_LOG_DIR`: Set the path of Collector-Agent's log file.
-    4. `PP_Log_Level`: Set the log level.
-    5. `PP_ADDRESS`: Set the address of `Collector-Agent`, then `PHP/Python-Agent` will connect Collector-Agent through this address.
-4. Run `Collector-Agent` by executing command `./CollectorAgent`
-   
-  Collector Agent Span Specification
-  [Json string map to Pinpoint item](../API/collector-agent/Readme.md)
-
-### [How to Use]
-[Click me ☚](../../plugins/PY/Readme.md)
+
+### How to Use
+
+
+#### 1.1 Flask
+
+> include middleware
+
+```
+app = Flask(__name__)
+app.wsgi_app = PinPointMiddleWare(app,app.wsgi_app)
+```
+
+#### 1.2 Django
+
+> append into django middleware
+
+
+settings.py
+
+```python
+
+MIDDLEWARE = [
+    'pinpointPy.Django.DjangoMiddleWare',
+    ...
+    ]
+
+```
+#### 1.3 Tornado
+
+Todo....
+
+#### 1.4 pyramid
+
+> Add pinpoint_tween middleware
+
+```python
+
+    config = Configurator(settings=settings, root_factory="conduit.auth.RootFactory")
+    config.add_tween('pinpoint.pyramid.tween.pinpoint_tween')
+
+```
+
+Example [pinpoint-in-pyramid](https://github.com/eeliu/pinpoint-in-pyramid)
+
+#### 1.5 bottle
+
+> Loading pinpint.Bottle before application run
+
+Example [pinpoint-in-bottle](https://github.com/eeliu/pinpoint-in-bottle)
+
+#### 1.6 aiohttp
+
+Todo....
+
+#### 1.7 web.py
+
+> Add pinpoint middleware
+
+> Example [py-web](https://github.com/eeliu/pinpoint-in-pyweb)
+
+
+#### 1.8 web2.py (synchronize)
+
+> Add pinpoint middleware
+
+> Example [py-web2](https://github.com/eeliu/pinpoint-in-pyweb2)
+
+
+### 2. Configuration
+
+
+```py
+
+# enable auto-interceptor plugins
+monkey_patch_for_pinpoint()
+# set pinpoint related environment
+set_agent("flask-agent","FLASK-AGENT",'tcp:dev-collector:9999',-1)
+
+```
 
 
 ## Performance Test Result
@@ -63,7 +107,7 @@ $ pip install pinpointPy
 
 -|TPR(ms)|RPS(#/sec)
 ----|-----|----
-pinpoint-py|4.487|445.73|
+pinpointPy|4.487|445.73|
 -|4.498 |444.69
 -|4.526 |441.88
 pure|4.440|450.44
diff --git a/DOC/PY/SupportPlan.md b/DOC/PY/SupportPlan.md
deleted file mode 100644
index e9e7d9fc0..000000000
--- a/DOC/PY/SupportPlan.md
+++ /dev/null
@@ -1,25 +0,0 @@
-# Support Plan
-## PYTHON Framework
-
-Framework| status | detail
-:---:|:---:|:---:
-django | ✔ | https://github.com/django/django/<br>star:50.8k
-flask | ✔ | https://github.com/pallets/flask<br>star:51.3k
-tornado| ✔ | https://github.com/tornadoweb/tornado<br>star:19.3k
-aiohttp| todo |https://github.com/aio-libs/aiohttp<br>star:10k
-bottle| ✔ | https://github.com/bottlepy/bottle<br>star:6.9k
-webpy| ✔ |https://github.com/webpy/webpy<br>star:5.4k
-Pyramid| ✔ | https://github.com/Pylons/pyramid<br>star:3407
-web2py| ✔ |https://github.com/web2py/web2py<br>star:1.9k
-
-## PYTHON Library
-
-library | status | detail
-:---:|:---:|:---:
-Requests| ✔ | -
-PyMySQL| ✔ | -
-Redis| ✔ | -
-PyMongo| ✔ | -
-UrlLib| ✔ | -
-SQLAlchemy| ✔ | -
-Kafka| ✔ | -
diff --git a/NOTICE b/NOTICE
index 947492cc7..00cda9715 100644
--- a/NOTICE
+++ b/NOTICE
@@ -364,4 +364,39 @@ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
 ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=======================================================================
+testapp/PHP from https://github.com/top-think/think
+=======================================================================
+ThinkPHP遵循Apache2开源协议发布，并提供免费使用。
+版权所有Copyright © 2006-2017 by ThinkPHP (http://thinkphp.cn)
+All rights reserved。
+ThinkPHP® 商标和著作权所有者为上海顶想信息科技有限公司。
+
+Apache Licence是著名的非盈利开源组织Apache采用的协议。
+该协议和BSD类似，鼓励代码共享和尊重原作者的著作权，
+允许代码修改，再作为开源或商业软件发布。需要满足
+的条件： 
+1． 需要给代码的用户一份Apache Licence ；
+2． 如果你修改了代码，需要在被修改的文件中说明；
+3． 在延伸的代码中（修改和有源代码衍生的代码中）需要
+带有原来代码中的协议，商标，专利声明和其他原来作者规
+定需要包含的说明；
+4． 如果再发布的产品中包含一个Notice文件，则在Notice文
+件中需要带有本协议内容。你可以在Notice中增加自己的
+许可，但不可以表现为对Apache Licence构成更改。 
+具体的协议参考：http://www.apache.org/licenses/LICENSE-2.0
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
diff --git a/README.md b/README.md
index 099772437..34bc95ead 100644
--- a/README.md
+++ b/README.md
@@ -13,25 +13,18 @@ The current stable version is [the Latest](https://github.com/pinpoint-apm/pinpo
 
 It is an agent written by C++, PHP and Python languages. And we hope to support other languages by this agent. Until now, it supports **_PHP_**, **_C/CPP_** and **_PYTHON_**.
 
-## PHP tutorial
-
-[ I use PHP !!! ☚](DOC/PHP/Readme.md)
-
-## PYTHON tutorial
-
-[I use PYTHON ☚](DOC/PY/Readme.md)
-
-## C/CPP tutorial
-
-[Use c/cpp application ☚](DOC/C-CPP/Readme.md)
-
-## GoLang tutorial
-
-[go-aop-agent ☚](https://github.com/pinpoint-apm/go-aop-agent)
-
+## Support Lists
+
+language| tutorial
+---|----
+php|[English](DOC/PHP/Readme.md) [中文](DOC/PHP/Readme-CN.md) 
+python3|[English](DOC/PY/Readme.md) [中文](DOC/PHP/Readme-CN.md) 
+c/cpp|[English](DOC/C-CPP/Readme.md)
+golang|[go-aop-agent](https://github.com/pinpoint-apm/go-aop-agent) 
 ## Overview Pinpoint Common Agent
 
-### Pinpoint-c-agent 
+### How does it work
+
 ![How does it work](images/pinpoint_v0.5.x.png)
 
 ### Distributed Tracking system
diff --git a/collector-agent/Dockerfile b/collector-agent/Dockerfile
index 8704548f6..8d3e9153c 100644
--- a/collector-agent/Dockerfile
+++ b/collector-agent/Dockerfile
@@ -1,7 +1,7 @@
 FROM golang:1.16.5-alpine3.13 as builder
 WORKDIR /apps
 COPY  . /apps/collector-agent
-RUN  cd /apps/collector-agent && go build
+RUN  cd /apps/collector-agent && go build  -o  CollectorAgent server.go
 
 FROM alpine:3.14
 COPY --from=builder /apps/collector-agent/CollectorAgent /usr/local/bin
diff --git a/collector-agent/agent/AgentRouter.go b/collector-agent/agent/AgentRouter.go
index e4fd7e581..3c7e70b10 100644
--- a/collector-agent/agent/AgentRouter.go
+++ b/collector-agent/agent/AgentRouter.go
@@ -1,7 +1,6 @@
 package agent
 
 import (
-	"CollectorAgent/common"
 	"encoding/json"
 	"errors"
 	"fmt"
@@ -10,6 +9,8 @@ import (
 	"sync"
 	"time"
 
+	"github.com/pinpoint-apm/pinpoint-c-agent/collector-agent/common"
+
 	log "github.com/sirupsen/logrus"
 )
 
diff --git a/collector-agent/agent/GrpcAgent.go b/collector-agent/agent/GrpcAgent.go
index d42768ac3..b669cc3f7 100644
--- a/collector-agent/agent/GrpcAgent.go
+++ b/collector-agent/agent/GrpcAgent.go
@@ -1,8 +1,6 @@
 package agent
 
 import (
-	"CollectorAgent/common"
-	v1 "CollectorAgent/protocol"
 	"context"
 	"errors"
 	"fmt"
@@ -10,6 +8,9 @@ import (
 	"sync"
 	"time"
 
+	"github.com/pinpoint-apm/pinpoint-c-agent/collector-agent/common"
+	v1 "github.com/pinpoint-apm/pinpoint-c-agent/collector-agent/protocol"
+
 	log "github.com/sirupsen/logrus"
 	"google.golang.org/grpc"
 	"google.golang.org/grpc/metadata"
@@ -427,7 +428,7 @@ func (agent *GrpcAgent) consumeJsonSpan() {
 			return
 		}
 		for i := range agent.spanFilter {
-			if agent.spanFilter[i].Interceptor(span) == false {
+			if !agent.spanFilter[i].Interceptor(span) {
 				break
 			}
 		}
diff --git a/collector-agent/agent/MetaData.go b/collector-agent/agent/MetaData.go
index f5e7c1243..a98fc69b2 100644
--- a/collector-agent/agent/MetaData.go
+++ b/collector-agent/agent/MetaData.go
@@ -1,11 +1,15 @@
 package agent
 
+import "time"
+
 type PARAMS_TYPE map[string]int32
 
 var _id int32 = 1
 
+const retryInterval = time.Second * 5
+
 type I_SendMeta interface {
-	SenderGrpcMetaData(name string, id int32, Type int32, params PARAMS_TYPE)
+	SenderGrpcMetaData(name string, id int32, Type int32, params PARAMS_TYPE) error
 }
 
 type MetaData struct {
@@ -32,5 +36,13 @@ func (meta *MetaData) GetId(name string, params PARAMS_TYPE) int32 {
 }
 
 func (meta *MetaData) registerSelf(name string, id, Type int32, params PARAMS_TYPE, sender I_SendMeta) {
-	go sender.SenderGrpcMetaData(name, id, Type, params)
+	go func() {
+		for {
+			if err := sender.SenderGrpcMetaData(name, id, Type, params); err == nil {
+				return
+			}
+			timer := time.NewTimer(retryInterval)
+			<-timer.C
+		}
+	}()
 }
diff --git a/collector-agent/agent/RequestCounter.go b/collector-agent/agent/RequestCounter.go
index 05b8770fb..2065e0377 100644
--- a/collector-agent/agent/RequestCounter.go
+++ b/collector-agent/agent/RequestCounter.go
@@ -1,10 +1,11 @@
 package agent
 
 import (
-	"CollectorAgent/common"
 	"math"
 	"time"
 
+	"github.com/pinpoint-apm/pinpoint-c-agent/collector-agent/common"
+
 	log "github.com/sirupsen/logrus"
 )
 
diff --git a/collector-agent/agent/SpanSender.go b/collector-agent/agent/SpanSender.go
index d77f48583..167e186fa 100644
--- a/collector-agent/agent/SpanSender.go
+++ b/collector-agent/agent/SpanSender.go
@@ -1,8 +1,6 @@
 package agent
 
 import (
-	"CollectorAgent/common"
-	v1 "CollectorAgent/protocol"
 	"context"
 	"errors"
 	"strconv"
@@ -10,6 +8,9 @@ import (
 	"sync"
 	"time"
 
+	"github.com/pinpoint-apm/pinpoint-c-agent/collector-agent/common"
+	v1 "github.com/pinpoint-apm/pinpoint-c-agent/collector-agent/protocol"
+
 	log "github.com/sirupsen/logrus"
 	"google.golang.org/grpc/metadata"
 	"google.golang.org/protobuf/types/known/wrapperspb"
@@ -464,13 +465,12 @@ func (spanSender *SpanSender) Interceptor(span map[string]interface{}) bool {
 	return true
 }
 
-func (spanSender *SpanSender) SenderGrpcMetaData(name string, id int32, Type int32,
-	params PARAMS_TYPE) {
+func (spanSender *SpanSender) SenderGrpcMetaData(name string, id int32, Type int32, params PARAMS_TYPE) error {
 	config := common.GetConfig()
 	conn, err := common.CreateGrpcConnection(config.AgentAddress)
 	if err != nil {
 		log.Warnf("connect:%s failed. %s", config.AgentAddress, err)
-		return
+		return errors.New("SenderGrpcMetaData: connect failed")
 	}
 
 	defer conn.Close()
@@ -498,9 +498,9 @@ func (spanSender *SpanSender) SenderGrpcMetaData(name string, id int32, Type int
 
 			if _, err = client.RequestApiMetaData(ctx, &apiMeta); err != nil {
 				log.Warnf("agentOnline api meta failed %s", err)
+				return errors.New("SenderGrpcMetaData: RequestApiMetaData failed")
 			}
 		}
-		break
 	case common.META_STRING:
 		{
 			metaMeta := v1.PStringMetaData{
@@ -510,9 +510,9 @@ func (spanSender *SpanSender) SenderGrpcMetaData(name string, id int32, Type int
 
 			if _, err = client.RequestStringMetaData(ctx, &metaMeta); err != nil {
 				log.Warnf("agentOnline api meta failed %s", err)
+				return errors.New("SenderGrpcMetaData: RequestStringMetaData failed")
 			}
 		}
-		break
 	case common.META_SQL:
 		{
 			sqlMeta := v1.PSqlMetaData{
@@ -522,12 +522,13 @@ func (spanSender *SpanSender) SenderGrpcMetaData(name string, id int32, Type int
 
 			if _, err = client.RequestSqlMetaData(ctx, &sqlMeta); err != nil {
 				log.Warnf("agentOnline api meta failed %s", err)
+				return errors.New("SenderGrpcMetaData: RequestSqlMetaData failed")
 			}
 		}
-		break
 	default:
 		log.Warnf("SenderGrpcMetaData: No such Type:%d", Type)
 	}
 
 	log.Debugf("send metaData:type:%d,Id:%d,value:%s para:%v", Type, id, name, params)
+	return nil
 }
diff --git a/collector-agent/agent/Stat.go b/collector-agent/agent/Stat.go
index 72d19c5d8..9da10b404 100644
--- a/collector-agent/agent/Stat.go
+++ b/collector-agent/agent/Stat.go
@@ -1,10 +1,11 @@
 package agent
 
 import (
-	"CollectorAgent/common"
-	"CollectorAgent/protocol"
 	"time"
 
+	"github.com/pinpoint-apm/pinpoint-c-agent/collector-agent/common"
+	v1 "github.com/pinpoint-apm/pinpoint-c-agent/collector-agent/protocol"
+
 	"github.com/shirou/gopsutil/cpu"
 	"github.com/shirou/gopsutil/v3/mem"
 )
diff --git a/collector-agent/common/config.go b/collector-agent/common/config.go
index a43eee397..26a8383df 100644
--- a/collector-agent/common/config.go
+++ b/collector-agent/common/config.go
@@ -1,12 +1,13 @@
 package common
 
 import (
-	"CollectorAgent/protocol"
 	"fmt"
 	"net"
 	"os"
 	"time"
 
+	v1 "github.com/pinpoint-apm/pinpoint-c-agent/collector-agent/protocol"
+
 	"google.golang.org/grpc"
 )
 
diff --git a/collector-agent/go.mod b/collector-agent/go.mod
index 230a14c8a..39e24cdd2 100644
--- a/collector-agent/go.mod
+++ b/collector-agent/go.mod
@@ -1,4 +1,4 @@
-module CollectorAgent
+module github.com/pinpoint-apm/pinpoint-c-agent/collector-agent
 
 go 1.15
 
diff --git a/collector-agent/server.go b/collector-agent/server.go
index 20340a3ef..d463c3914 100644
--- a/collector-agent/server.go
+++ b/collector-agent/server.go
@@ -1,8 +1,9 @@
 package main
 
 import (
-	"CollectorAgent/server"
-	_ "net/http/pprof"
+	// _ "net/http/pprof"
+
+	"github.com/pinpoint-apm/pinpoint-c-agent/collector-agent/server"
 
 	log "github.com/sirupsen/logrus"
 )
diff --git a/collector-agent/server/ServerEnv.go b/collector-agent/server/ServerEnv.go
index 251fc744a..7bcad64d6 100644
--- a/collector-agent/server/ServerEnv.go
+++ b/collector-agent/server/ServerEnv.go
@@ -1,13 +1,14 @@
 package server
 
 import (
-	"CollectorAgent/common"
 	"fmt"
 	"os"
 	"path"
 	"strconv"
 	"strings"
 
+	"github.com/pinpoint-apm/pinpoint-c-agent/collector-agent/common"
+
 	log "github.com/sirupsen/logrus"
 	prefixed "github.com/x-cray/logrus-prefixed-formatter"
 	"gopkg.in/natefinch/lumberjack.v2"
diff --git a/collector-agent/server/SpanServer.go b/collector-agent/server/SpanServer.go
index 57b3c6fbc..2d91f23d0 100644
--- a/collector-agent/server/SpanServer.go
+++ b/collector-agent/server/SpanServer.go
@@ -1,8 +1,6 @@
 package server
 
 import (
-	"CollectorAgent/agent"
-	"CollectorAgent/common"
 	"encoding/binary"
 	"encoding/json"
 	"errors"
@@ -15,6 +13,9 @@ import (
 	"syscall"
 	"time"
 
+	"github.com/pinpoint-apm/pinpoint-c-agent/collector-agent/agent"
+	"github.com/pinpoint-apm/pinpoint-c-agent/collector-agent/common"
+
 	log "github.com/sirupsen/logrus"
 )
 
diff --git a/common/include/common.h b/common/include/common.h
index 31b51cff8..f42229fc3 100644
--- a/common/include/common.h
+++ b/common/include/common.h
@@ -134,13 +134,14 @@ NodeID pinpoint_get_per_thread_id(void);
 void pinpoint_update_per_thread_id(NodeID id);
 
 /**
- * start a trace (span). if current span is empty, create a span or else create a spanevent
- * @return
+ * start a trace (span) from parentId. if current span is empty, create a span or else create a spanevent
+ * @param parentId 
+ * @return 
  */
-NodeID pinpoint_start_trace(NodeID);
+NodeID pinpoint_start_trace(NodeID parentId);
 /**
  * the same as pinpoint_start_trace. BUT, end a span or a spanevent
- * @return
+ * @return NodeID is parent node id
  */
 NodeID pinpoint_end_trace(NodeID);
 
diff --git a/common/jsoncpp/include/json/allocator.h b/common/jsoncpp/include/json/allocator.h
index b6d30f6b8..c8a1357ee 100644
--- a/common/jsoncpp/include/json/allocator.h
+++ b/common/jsoncpp/include/json/allocator.h
@@ -11,7 +11,7 @@
 
 #pragma pack(push, 8)
 
-namespace Json {
+namespace AliasJson { 
 template <typename T> class SecureAllocator {
 public:
   // Type definitions
@@ -81,7 +81,7 @@ bool operator!=(const SecureAllocator<T>&, const SecureAllocator<U>&) {
   return false;
 }
 
-} // namespace Json
+} // namespace AliasJson
 
 #pragma pack(pop)
 
diff --git a/common/jsoncpp/include/json/assertions.h b/common/jsoncpp/include/json/assertions.h
index 450b24c4c..f4e025c9d 100644
--- a/common/jsoncpp/include/json/assertions.h
+++ b/common/jsoncpp/include/json/assertions.h
@@ -23,7 +23,7 @@
 #define JSON_ASSERT(condition)                                                 \
   do {                                                                         \
     if (!(condition)) {                                                        \
-      Json::throwLogicError("assert json failed");                             \
+      AliasJson::throwLogicError("assert json failed");                             \
     }                                                                          \
   } while (0)
 
@@ -31,7 +31,7 @@
   do {                                                                         \
     OStringStream oss;                                                         \
     oss << message;                                                            \
-    Json::throwLogicError(oss.str());                                          \
+    AliasJson::throwLogicError(oss.str());                                          \
     abort();                                                                   \
   } while (0)
 
diff --git a/common/jsoncpp/include/json/config.h b/common/jsoncpp/include/json/config.h
index 14fc1a27d..d41718abf 100644
--- a/common/jsoncpp/include/json/config.h
+++ b/common/jsoncpp/include/json/config.h
@@ -104,7 +104,7 @@ extern JSON_API int msvc_pre1900_c99_snprintf(char* outBuf, size_t size,
 
 #endif // if !defined(JSON_IS_AMALGAMATION)
 
-namespace Json {
+namespace AliasJson { 
 using Int = int;
 using UInt = unsigned int;
 #if defined(JSON_NO_INT64)
@@ -138,13 +138,13 @@ using OStringStream =
                              String::allocator_type>;
 using IStream = std::istream;
 using OStream = std::ostream;
-} // namespace Json
+} // namespace AliasJson
 
 // Legacy names (formerly macros).
-using JSONCPP_STRING = Json::String;
-using JSONCPP_ISTRINGSTREAM = Json::IStringStream;
-using JSONCPP_OSTRINGSTREAM = Json::OStringStream;
-using JSONCPP_ISTREAM = Json::IStream;
-using JSONCPP_OSTREAM = Json::OStream;
+using JSONCPP_STRING = AliasJson::String;
+using JSONCPP_ISTRINGSTREAM = AliasJson::IStringStream;
+using JSONCPP_OSTRINGSTREAM = AliasJson::OStringStream;
+using JSONCPP_ISTREAM = AliasJson::IStream;
+using JSONCPP_OSTREAM = AliasJson::OStream;
 
 #endif // JSON_CONFIG_H_INCLUDED
diff --git a/common/jsoncpp/include/json/forwards.h b/common/jsoncpp/include/json/forwards.h
index 26bfa9296..59f13abd9 100644
--- a/common/jsoncpp/include/json/forwards.h
+++ b/common/jsoncpp/include/json/forwards.h
@@ -10,7 +10,7 @@
 #include "config.h"
 #endif // if !defined(JSON_IS_AMALGAMATION)
 
-namespace Json {
+namespace AliasJson { 
 
 // writer.h
 class StreamWriter;
@@ -38,6 +38,6 @@ class ValueIteratorBase;
 class ValueIterator;
 class ValueConstIterator;
 
-} // namespace Json
+} // namespace AliasJson
 
 #endif // JSON_FORWARDS_H_INCLUDED
diff --git a/common/jsoncpp/include/json/json_features.h b/common/jsoncpp/include/json/json_features.h
index e48a777d2..58b15af00 100644
--- a/common/jsoncpp/include/json/json_features.h
+++ b/common/jsoncpp/include/json/json_features.h
@@ -12,7 +12,7 @@
 
 #pragma pack(push, 8)
 
-namespace Json {
+namespace AliasJson { 
 
 /** \brief Configuration passed to reader and writer.
  * This configuration object can be used to force the Reader or Writer
@@ -54,7 +54,7 @@ class JSON_API Features {
   bool allowNumericKeys_{false};
 };
 
-} // namespace Json
+} // namespace AliasJson
 
 #pragma pack(pop)
 
diff --git a/common/jsoncpp/include/json/reader.h b/common/jsoncpp/include/json/reader.h
index 702ed39a3..da4dd3720 100644
--- a/common/jsoncpp/include/json/reader.h
+++ b/common/jsoncpp/include/json/reader.h
@@ -25,7 +25,7 @@
 
 #pragma pack(push, 8)
 
-namespace Json {
+namespace AliasJson { 
 
 /** \brief Unserialize a <a HREF="http://www.json.org">JSON</a> document into a
  * Value.
@@ -97,7 +97,7 @@ class JSONCPP_DEPRECATED(
              bool collectComments = true);
 
   /// \brief Parse from input stream.
-  /// \see Json::operator>>(std::istream&, Json::Value&).
+  /// \see AliasJson::operator>>(std::istream&, AliasJson::Value&).
   bool parse(IStream& is, Value& root, bool collectComments = true);
 
   /** \brief Returns a user friendly string that list errors in the parsed
@@ -288,7 +288,7 @@ class JSON_API CharReader {
  */
 class JSON_API CharReaderBuilder : public CharReader::Factory {
 public:
-  // Note: We use a Json::Value so that we can add data-members to this class
+  // Note: We use a AliasJson::Value so that we can add data-members to this class
   // without a major version bump.
   /** Configuration of this builder.
    * These are case-sensitive.
@@ -329,7 +329,7 @@ class JSON_API CharReaderBuilder : public CharReader::Factory {
    * write and read them just like any JSON Value.
    * \sa setDefaults()
    */
-  Json::Value settings_;
+  AliasJson::Value settings_;
 
   CharReaderBuilder();
   ~CharReaderBuilder() override;
@@ -339,24 +339,24 @@ class JSON_API CharReaderBuilder : public CharReader::Factory {
   /** \return true if 'settings' are legal and consistent;
    *   otherwise, indicate bad settings via 'invalid'.
    */
-  bool validate(Json::Value* invalid) const;
+  bool validate(AliasJson::Value* invalid) const;
 
   /** A simple way to update a specific setting.
    */
   Value& operator[](const String& key);
 
   /** Called by ctor, but you can use this to reset settings_.
-   * \pre 'settings' != NULL (but Json::null is fine)
+   * \pre 'settings' != NULL (but AliasJson::null is fine)
    * \remark Defaults:
    * \snippet src/lib_json/json_reader.cpp CharReaderBuilderDefaults
    */
-  static void setDefaults(Json::Value* settings);
+  static void setDefaults(AliasJson::Value* settings);
   /** Same as old Features::strictMode().
-   * \pre 'settings' != NULL (but Json::null is fine)
+   * \pre 'settings' != NULL (but AliasJson::null is fine)
    * \remark Defaults:
    * \snippet src/lib_json/json_reader.cpp CharReaderBuilderStrictMode
    */
-  static void strictMode(Json::Value* settings);
+  static void strictMode(AliasJson::Value* settings);
 };
 
 /** Consume entire stream and use its begin/end.
@@ -373,7 +373,7 @@ bool JSON_API parseFromStream(CharReader::Factory const&, IStream&, Value* root,
  * This can be used to read a file into a particular sub-object.
  * For example:
  *   \code
- *   Json::Value root;
+ *   AliasJson::Value root;
  *   cin >> root["dir"]["file"];
  *   cout << root;
  *   \endcode
@@ -388,11 +388,11 @@ bool JSON_API parseFromStream(CharReader::Factory const&, IStream&, Value* root,
  * }
  * \endverbatim
  * \throw std::exception on parse error.
- * \see Json::operator<<()
+ * \see AliasJson::operator<<()
  */
 JSON_API IStream& operator>>(IStream&, Value&);
 
-} // namespace Json
+} // namespace AliasJson
 
 #pragma pack(pop)
 
diff --git a/common/jsoncpp/include/json/value.h b/common/jsoncpp/include/json/value.h
index 14133b13f..df3a82157 100644
--- a/common/jsoncpp/include/json/value.h
+++ b/common/jsoncpp/include/json/value.h
@@ -57,7 +57,7 @@
 
 /** \brief JSON (JavaScript Object Notation).
  */
-namespace Json {
+namespace AliasJson { 
 
 #if JSON_USE_EXCEPTION
 /** Base class for all exceptions we throw.
@@ -78,7 +78,7 @@ class JSON_API Exception : public std::exception {
  *
  * E.g. out-of-memory (when we use malloc), stack-overflow, malicious input
  *
- * \remark derived from Json::Exception
+ * \remark derived from AliasJson::Exception
  */
 class JSON_API RuntimeError : public Exception {
 public:
@@ -89,7 +89,7 @@ class JSON_API RuntimeError : public Exception {
  *
  * These are precondition-violations (user bugs) and internal errors (our bugs).
  *
- * \remark derived from Json::Exception
+ * \remark derived from AliasJson::Exception
  */
 class JSON_API LogicError : public Exception {
 public:
@@ -138,8 +138,8 @@ enum PrecisionType {
  *
  * Example of usage:
  * \code
- * Json::Value aValue( StaticString("some text") );
- * Json::Value object;
+ * AliasJson::Value aValue( StaticString("some text") );
+ * AliasJson::Value object;
  * static const StaticString code("code");
  * object[code] = 1234;
  * \endcode
@@ -197,15 +197,15 @@ class JSON_API Value {
   using Members = std::vector<String>;
   using iterator = ValueIterator;
   using const_iterator = ValueConstIterator;
-  using UInt = Json::UInt;
-  using Int = Json::Int;
+  using UInt = AliasJson::UInt;
+  using Int = AliasJson::Int;
 #if defined(JSON_HAS_INT64)
-  using UInt64 = Json::UInt64;
-  using Int64 = Json::Int64;
+  using UInt64 = AliasJson::UInt64;
+  using Int64 = AliasJson::Int64;
 #endif // defined(JSON_HAS_INT64)
-  using LargestInt = Json::LargestInt;
-  using LargestUInt = Json::LargestUInt;
-  using ArrayIndex = Json::ArrayIndex;
+  using LargestInt = AliasJson::LargestInt;
+  using LargestUInt = AliasJson::LargestUInt;
+  using ArrayIndex = AliasJson::ArrayIndex;
 
   // Required for boost integration, e. g. BOOST_TEST
   using value_type = std::string;
@@ -219,27 +219,27 @@ class JSON_API Value {
   // null and nullRef are deprecated, use this instead.
   static Value const& nullSingleton();
 
-  /// Minimum signed integer value that can be stored in a Json::Value.
+  /// Minimum signed integer value that can be stored in a AliasJson::Value.
   static constexpr LargestInt minLargestInt =
       LargestInt(~(LargestUInt(-1) / 2));
-  /// Maximum signed integer value that can be stored in a Json::Value.
+  /// Maximum signed integer value that can be stored in a AliasJson::Value.
   static constexpr LargestInt maxLargestInt = LargestInt(LargestUInt(-1) / 2);
-  /// Maximum unsigned integer value that can be stored in a Json::Value.
+  /// Maximum unsigned integer value that can be stored in a AliasJson::Value.
   static constexpr LargestUInt maxLargestUInt = LargestUInt(-1);
 
-  /// Minimum signed int value that can be stored in a Json::Value.
+  /// Minimum signed int value that can be stored in a AliasJson::Value.
   static constexpr Int minInt = Int(~(UInt(-1) / 2));
-  /// Maximum signed int value that can be stored in a Json::Value.
+  /// Maximum signed int value that can be stored in a AliasJson::Value.
   static constexpr Int maxInt = Int(UInt(-1) / 2);
-  /// Maximum unsigned int value that can be stored in a Json::Value.
+  /// Maximum unsigned int value that can be stored in a AliasJson::Value.
   static constexpr UInt maxUInt = UInt(-1);
 
 #if defined(JSON_HAS_INT64)
-  /// Minimum signed 64 bits int value that can be stored in a Json::Value.
+  /// Minimum signed 64 bits int value that can be stored in a AliasJson::Value.
   static constexpr Int64 minInt64 = Int64(~(UInt64(-1) / 2));
-  /// Maximum signed 64 bits int value that can be stored in a Json::Value.
+  /// Maximum signed 64 bits int value that can be stored in a AliasJson::Value.
   static constexpr Int64 maxInt64 = Int64(UInt64(-1) / 2);
-  /// Maximum unsigned 64 bits int value that can be stored in a Json::Value.
+  /// Maximum unsigned 64 bits int value that can be stored in a AliasJson::Value.
   static constexpr UInt64 maxUInt64 = UInt64(-1);
 #endif // defined(JSON_HAS_INT64)
   /// Default precision for real value for string representation.
@@ -307,9 +307,9 @@ class JSON_API Value {
    *
    * Examples:
    *   \code
-   *   Json::Value null_value; // null
-   *   Json::Value arr_value(Json::arrayValue); // []
-   *   Json::Value obj_value(Json::objectValue); // {}
+   *   AliasJson::Value null_value; // null
+   *   AliasJson::Value arr_value(AliasJson::arrayValue); // []
+   *   AliasJson::Value obj_value(AliasJson::objectValue); // {}
    *   \endcode
    */
   Value(ValueType type = nullValue);
@@ -336,7 +336,7 @@ class JSON_API Value {
    * Example of usage:
    *   \code
    *   static StaticString foo("some text");
-   *   Json::Value aValue(foo);
+   *   AliasJson::Value aValue(foo);
    *   \endcode
    */
   Value(const StaticString& value);
@@ -490,7 +490,7 @@ class JSON_API Value {
    * store the new entry is not duplicated.
    * Example of use:
    *   \code
-   *   Json::Value object;
+   *   AliasJson::Value object;
    *   static const StaticString code("code");
    *   object[code] = 1234;
    *   \endcode
@@ -924,7 +924,7 @@ class JSON_API ValueIterator : public ValueIteratorBase {
 
 inline void swap(Value& a, Value& b) { a.swap(b); }
 
-} // namespace Json
+} // namespace AliasJson
 
 #pragma pack(pop)
 
diff --git a/common/jsoncpp/include/json/writer.h b/common/jsoncpp/include/json/writer.h
index 7ef159df7..d4c8f07a6 100644
--- a/common/jsoncpp/include/json/writer.h
+++ b/common/jsoncpp/include/json/writer.h
@@ -22,7 +22,7 @@
 
 #pragma pack(push, 8)
 
-namespace Json {
+namespace AliasJson { 
 
 class Value;
 
@@ -80,7 +80,7 @@ String JSON_API writeString(StreamWriter::Factory const& factory,
 *   StreamWriterBuilder builder;
 *   builder["commentStyle"] = "None";
 *   builder["indentation"] = "   ";  // or whatever you like
-*   std::unique_ptr<Json::StreamWriter> writer(
+*   std::unique_ptr<AliasJson::StreamWriter> writer(
 *      builder.newStreamWriter());
 *   writer->write(value, &std::cout);
 *   std::cout << std::endl;  // add lf and flush
@@ -88,7 +88,7 @@ String JSON_API writeString(StreamWriter::Factory const& factory,
 */
 class JSON_API StreamWriterBuilder : public StreamWriter::Factory {
 public:
-  // Note: We use a Json::Value so that we can add data-members to this class
+  // Note: We use a AliasJson::Value so that we can add data-members to this class
   // without a major version bump.
   /** Configuration of this builder.
    *  Available settings (case-sensitive):
@@ -116,7 +116,7 @@ class JSON_API StreamWriterBuilder : public StreamWriter::Factory {
    *  JSON Value.
    *  \sa setDefaults()
    */
-  Json::Value settings_;
+  AliasJson::Value settings_;
 
   StreamWriterBuilder();
   ~StreamWriterBuilder() override;
@@ -129,17 +129,17 @@ class JSON_API StreamWriterBuilder : public StreamWriter::Factory {
   /** \return true if 'settings' are legal and consistent;
    *   otherwise, indicate bad settings via 'invalid'.
    */
-  bool validate(Json::Value* invalid) const;
+  bool validate(AliasJson::Value* invalid) const;
   /** A simple way to update a specific setting.
    */
   Value& operator[](const String& key);
 
   /** Called by ctor, but you can use this to reset settings_.
-   * \pre 'settings' != NULL (but Json::null is fine)
+   * \pre 'settings' != NULL (but AliasJson::null is fine)
    * \remark Defaults:
    * \snippet src/lib_json/json_writer.cpp StreamWriterBuilderDefaults
    */
-  static void setDefaults(Json::Value* settings);
+  static void setDefaults(AliasJson::Value* settings);
 };
 
 /** \brief Abstract class for writers.
@@ -353,10 +353,10 @@ String JSON_API valueToString(bool value);
 String JSON_API valueToQuotedString(const char* value);
 
 /// \brief Output using the StyledStreamWriter.
-/// \see Json::operator>>()
+/// \see AliasJson::operator>>()
 JSON_API OStream& operator<<(OStream&, const Value& root);
 
-} // namespace Json
+} // namespace AliasJson
 
 #pragma pack(pop)
 
diff --git a/common/jsoncpp/lib_json/json_reader.cpp b/common/jsoncpp/lib_json/json_reader.cpp
index 9e978fc84..a95a60c33 100644
--- a/common/jsoncpp/lib_json/json_reader.cpp
+++ b/common/jsoncpp/lib_json/json_reader.cpp
@@ -50,7 +50,7 @@
 static size_t const stackLimit_g =
     JSONCPP_DEPRECATED_STACK_LIMIT; // see readValue()
 
-namespace Json {
+namespace AliasJson { 
 
 #if __cplusplus >= 201103L || (defined(_CPPLIB_VER) && _CPPLIB_VER >= 520)
 using CharReaderPtr = std::unique_ptr<CharReader>;
@@ -1901,7 +1901,7 @@ CharReader* CharReaderBuilder::newCharReader() const {
   return new OurCharReader(collectComments, features);
 }
 
-bool CharReaderBuilder::validate(Json::Value* invalid) const {
+bool CharReaderBuilder::validate(AliasJson::Value* invalid) const {
   static const auto& valid_keys = *new std::set<String>{
       "collectComments",
       "allowComments",
@@ -1932,7 +1932,7 @@ Value& CharReaderBuilder::operator[](const String& key) {
   return settings_[key];
 }
 // static
-void CharReaderBuilder::strictMode(Json::Value* settings) {
+void CharReaderBuilder::strictMode(AliasJson::Value* settings) {
   //! [CharReaderBuilderStrictMode]
   (*settings)["allowComments"] = false;
   (*settings)["allowTrailingCommas"] = false;
@@ -1948,7 +1948,7 @@ void CharReaderBuilder::strictMode(Json::Value* settings) {
   //! [CharReaderBuilderStrictMode]
 }
 // static
-void CharReaderBuilder::setDefaults(Json::Value* settings) {
+void CharReaderBuilder::setDefaults(AliasJson::Value* settings) {
   //! [CharReaderBuilderDefaults]
   (*settings)["collectComments"] = true;
   (*settings)["allowComments"] = true;
@@ -1990,4 +1990,4 @@ IStream& operator>>(IStream& sin, Value& root) {
   return sin;
 }
 
-} // namespace Json
+} // namespace AliasJson
diff --git a/common/jsoncpp/lib_json/json_tool.h b/common/jsoncpp/lib_json/json_tool.h
index 6ff37516a..546198765 100644
--- a/common/jsoncpp/lib_json/json_tool.h
+++ b/common/jsoncpp/lib_json/json_tool.h
@@ -25,7 +25,7 @@
  * It is an internal header that must not be exposed.
  */
 
-namespace Json {
+namespace AliasJson { 
 static inline char getDecimalPoint() {
 #ifdef JSONCPP_NO_LOCALE_SUPPORT
   return '\0';
@@ -129,6 +129,6 @@ template <typename Iter> Iter fixZerosInTheEnd(Iter begin, Iter end) {
   return end;
 }
 
-} // namespace Json
+} // namespace AliasJson
 
 #endif // LIB_JSONCPP_JSON_TOOL_H_INCLUDED
diff --git a/common/jsoncpp/lib_json/json_value.cpp b/common/jsoncpp/lib_json/json_value.cpp
index d4938a45e..1c0ccf0d4 100644
--- a/common/jsoncpp/lib_json/json_value.cpp
+++ b/common/jsoncpp/lib_json/json_value.cpp
@@ -47,7 +47,7 @@ int JSON_API msvc_pre1900_c99_snprintf(char* outBuf, size_t size,
 
 #define JSON_ASSERT_UNREACHABLE assert(false)
 
-namespace Json {
+namespace AliasJson { 
 template <typename T>
 static std::unique_ptr<T> cloneUnique(const std::unique_ptr<T>& p) {
   std::unique_ptr<T> r;
@@ -90,7 +90,7 @@ static inline bool InRange(double d, T min, U max) {
   return d >= static_cast<double>(min) && d <= static_cast<double>(max);
 }
 #else  // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION)
-static inline double integerToDouble(Json::UInt64 value) {
+static inline double integerToDouble(AliasJson::UInt64 value) {
   return static_cast<double>(Int64(value / 2)) * 2.0 +
          static_cast<double>(Int64(value & 1));
 }
@@ -120,7 +120,7 @@ static inline char* duplicateStringValue(const char* value, size_t length) {
 
   auto newString = static_cast<char*>(malloc(length + 1));
   if (newString == nullptr) {
-    throwRuntimeError("in Json::Value::duplicateStringValue(): "
+    throwRuntimeError("in AliasJson::Value::duplicateStringValue(): "
                       "Failed to allocate string value buffer");
   }
   memcpy(newString, value, length);
@@ -136,12 +136,12 @@ static inline char* duplicateAndPrefixStringValue(const char* value,
   // to a sane value.
   JSON_ASSERT_MESSAGE(length <= static_cast<unsigned>(Value::maxInt) -
                                     sizeof(unsigned) - 1U,
-                      "in Json::Value::duplicateAndPrefixStringValue(): "
+                      "in AliasJson::Value::duplicateAndPrefixStringValue(): "
                       "length too big for prefixing");
   size_t actualLength = sizeof(length) + length + 1;
   auto newString = static_cast<char*>(malloc(actualLength));
   if (newString == nullptr) {
-    throwRuntimeError("in Json::Value::duplicateAndPrefixStringValue(): "
+    throwRuntimeError("in AliasJson::Value::duplicateAndPrefixStringValue(): "
                       "Failed to allocate string value buffer");
   }
   *reinterpret_cast<unsigned*>(newString) = length;
@@ -183,7 +183,7 @@ static inline void releasePrefixedStringValue(char* value) { free(value); }
 static inline void releaseStringValue(char* value, unsigned) { free(value); }
 #endif // JSONCPP_USING_SECURE_MEMORY
 
-} // namespace Json
+} // namespace AliasJson
 
 // //////////////////////////////////////////////////////////////////
 // //////////////////////////////////////////////////////////////////
@@ -197,7 +197,7 @@ static inline void releaseStringValue(char* value, unsigned) { free(value); }
 #include "json_valueiterator.inl"
 #endif // if !defined(JSON_IS_AMALGAMATION)
 
-namespace Json {
+namespace AliasJson { 
 
 #if JSON_USE_EXCEPTION
 Exception::Exception(String msg) : msg_(std::move(msg)) {}
@@ -589,7 +589,7 @@ bool Value::operator!=(const Value& other) const { return !(*this == other); }
 
 const char* Value::asCString() const {
   JSON_ASSERT_MESSAGE(type() == stringValue,
-                      "in Json::Value::asCString(): requires stringValue");
+                      "in AliasJson::Value::asCString(): requires stringValue");
   if (value_.string_ == nullptr)
     return nullptr;
   unsigned this_len;
@@ -602,7 +602,7 @@ const char* Value::asCString() const {
 #if JSONCPP_USING_SECURE_MEMORY
 unsigned Value::getCStringLength() const {
   JSON_ASSERT_MESSAGE(type() == stringValue,
-                      "in Json::Value::asCString(): requires stringValue");
+                      "in AliasJson::Value::asCString(): requires stringValue");
   if (value_.string_ == 0)
     return 0;
   unsigned this_len;
@@ -890,7 +890,7 @@ Value::operator bool() const { return !isNull(); }
 void Value::clear() {
   JSON_ASSERT_MESSAGE(type() == nullValue || type() == arrayValue ||
                           type() == objectValue,
-                      "in Json::Value::clear(): requires complex value");
+                      "in AliasJson::Value::clear(): requires complex value");
   start_ = 0;
   limit_ = 0;
   switch (type()) {
@@ -905,7 +905,7 @@ void Value::clear() {
 
 void Value::resize(ArrayIndex newSize) {
   JSON_ASSERT_MESSAGE(type() == nullValue || type() == arrayValue,
-                      "in Json::Value::resize(): requires arrayValue");
+                      "in AliasJson::Value::resize(): requires arrayValue");
   if (type() == nullValue)
     *this = Value(arrayValue);
   ArrayIndex oldSize = size();
@@ -924,7 +924,7 @@ void Value::resize(ArrayIndex newSize) {
 Value& Value::operator[](ArrayIndex index) {
   JSON_ASSERT_MESSAGE(
       type() == nullValue || type() == arrayValue,
-      "in Json::Value::operator[](ArrayIndex): requires arrayValue");
+      "in AliasJson::Value::operator[](ArrayIndex): requires arrayValue");
   if (type() == nullValue)
     *this = Value(arrayValue);
   CZString key(index);
@@ -940,14 +940,14 @@ Value& Value::operator[](ArrayIndex index) {
 Value& Value::operator[](int index) {
   JSON_ASSERT_MESSAGE(
       index >= 0,
-      "in Json::Value::operator[](int index): index cannot be negative");
+      "in AliasJson::Value::operator[](int index): index cannot be negative");
   return (*this)[ArrayIndex(index)];
 }
 
 const Value& Value::operator[](ArrayIndex index) const {
   JSON_ASSERT_MESSAGE(
       type() == nullValue || type() == arrayValue,
-      "in Json::Value::operator[](ArrayIndex)const: requires arrayValue");
+      "in AliasJson::Value::operator[](ArrayIndex)const: requires arrayValue");
   if (type() == nullValue)
     return nullSingleton();
   CZString key(index);
@@ -960,7 +960,7 @@ const Value& Value::operator[](ArrayIndex index) const {
 const Value& Value::operator[](int index) const {
   JSON_ASSERT_MESSAGE(
       index >= 0,
-      "in Json::Value::operator[](int index) const: index cannot be negative");
+      "in AliasJson::Value::operator[](int index) const: index cannot be negative");
   return (*this)[ArrayIndex(index)];
 }
 
@@ -1037,7 +1037,7 @@ void Value::dupMeta(const Value& other) {
 Value& Value::resolveReference(const char* key) {
   JSON_ASSERT_MESSAGE(
       type() == nullValue || type() == objectValue,
-      "in Json::Value::resolveReference(): requires objectValue");
+      "in AliasJson::Value::resolveReference(): requires objectValue");
   if (type() == nullValue)
     *this = Value(objectValue);
   CZString actualKey(key, static_cast<unsigned>(strlen(key)),
@@ -1056,7 +1056,7 @@ Value& Value::resolveReference(const char* key) {
 Value& Value::resolveReference(char const* key, char const* end) {
   JSON_ASSERT_MESSAGE(
       type() == nullValue || type() == objectValue,
-      "in Json::Value::resolveReference(key, end): requires objectValue");
+      "in AliasJson::Value::resolveReference(key, end): requires objectValue");
   if (type() == nullValue)
     *this = Value(objectValue);
   CZString actualKey(key, static_cast<unsigned>(end - key),
@@ -1080,7 +1080,7 @@ bool Value::isValidIndex(ArrayIndex index) const { return index < size(); }
 
 Value const* Value::find(char const* begin, char const* end) const {
   JSON_ASSERT_MESSAGE(type() == nullValue || type() == objectValue,
-                      "in Json::Value::find(begin, end): requires "
+                      "in AliasJson::Value::find(begin, end): requires "
                       "objectValue or nullValue");
   if (type() == nullValue)
     return nullptr;
@@ -1093,7 +1093,7 @@ Value const* Value::find(char const* begin, char const* end) const {
 }
 Value* Value::demand(char const* begin, char const* end) {
   JSON_ASSERT_MESSAGE(type() == nullValue || type() == objectValue,
-                      "in Json::Value::demand(begin, end): requires "
+                      "in AliasJson::Value::demand(begin, end): requires "
                       "objectValue or nullValue");
   return &resolveReference(begin, end);
 }
@@ -1126,7 +1126,7 @@ Value& Value::append(const Value& value) { return append(Value(value)); }
 
 Value& Value::append(Value&& value) {
   JSON_ASSERT_MESSAGE(type() == nullValue || type() == arrayValue,
-                      "in Json::Value::append: requires arrayValue");
+                      "in AliasJson::Value::append: requires arrayValue");
   if (type() == nullValue) {
     *this = Value(arrayValue);
   }
@@ -1139,7 +1139,7 @@ bool Value::insert(ArrayIndex index, const Value& newValue) {
 
 bool Value::insert(ArrayIndex index, Value&& newValue) {
   JSON_ASSERT_MESSAGE(type() == nullValue || type() == arrayValue,
-                      "in Json::Value::insert: requires arrayValue");
+                      "in AliasJson::Value::insert: requires arrayValue");
   ArrayIndex length = size();
   if (index > length) {
     return false;
@@ -1185,7 +1185,7 @@ bool Value::removeMember(String const& key, Value* removed) {
 }
 void Value::removeMember(const char* key) {
   JSON_ASSERT_MESSAGE(type() == nullValue || type() == objectValue,
-                      "in Json::Value::removeMember(): requires objectValue");
+                      "in AliasJson::Value::removeMember(): requires objectValue");
   if (type() == nullValue)
     return;
 
@@ -1232,7 +1232,7 @@ bool Value::isMember(String const& key) const {
 Value::Members Value::getMemberNames() const {
   JSON_ASSERT_MESSAGE(
       type() == nullValue || type() == objectValue,
-      "in Json::Value::getMemberNames(), value must be objectValue");
+      "in AliasJson::Value::getMemberNames(), value must be objectValue");
   if (type() == nullValue)
     return Value::Members();
   Members members;
@@ -1414,7 +1414,7 @@ void Value::setComment(String comment, CommentPlacement placement) {
   JSON_ASSERT(!comment.empty());
   JSON_ASSERT_MESSAGE(
       comment[0] == '\0' || comment[0] == '/',
-      "in Json::Value::setComment(): Comments must start with /");
+      "in AliasJson::Value::setComment(): Comments must start with /");
   comments_.set(placement, std::move(comment));
 }
 
@@ -1438,7 +1438,7 @@ String Value::toStyledString() const {
   StreamWriterBuilder builder;
 
   String out = this->hasComment(commentBefore) ? "\n" : "";
-  out += Json::writeString(builder, *this);
+  out += AliasJson::writeString(builder, *this);
   out += '\n';
 
   return out;
@@ -1632,4 +1632,4 @@ Value& Path::make(Value& root) const {
   return *node;
 }
 
-} // namespace Json
+} // namespace AliasJson
diff --git a/common/jsoncpp/lib_json/json_valueiterator.inl b/common/jsoncpp/lib_json/json_valueiterator.inl
index 5c0889883..cdbffc03d 100644
--- a/common/jsoncpp/lib_json/json_valueiterator.inl
+++ b/common/jsoncpp/lib_json/json_valueiterator.inl
@@ -5,7 +5,7 @@
 
 // included by json_value.cpp
 
-namespace Json {
+namespace AliasJson { 
 
 // //////////////////////////////////////////////////////////////////
 // //////////////////////////////////////////////////////////////////
@@ -153,4 +153,4 @@ ValueIterator& ValueIterator::operator=(const SelfType& other) {
   return *this;
 }
 
-} // namespace Json
+} // namespace AliasJson
diff --git a/common/jsoncpp/lib_json/json_writer.cpp b/common/jsoncpp/lib_json/json_writer.cpp
index 666c13295..6534c2b46 100644
--- a/common/jsoncpp/lib_json/json_writer.cpp
+++ b/common/jsoncpp/lib_json/json_writer.cpp
@@ -83,7 +83,7 @@
 #pragma warning(disable : 4996)
 #endif
 
-namespace Json {
+namespace AliasJson { 
 
 #if __cplusplus >= 201103L || (defined(_CPPLIB_VER) && _CPPLIB_VER >= 520)
 using StreamWriterPtr = std::unique_ptr<StreamWriter>;
@@ -1201,7 +1201,7 @@ StreamWriter* StreamWriterBuilder::newStreamWriter() const {
                                      precisionType);
 }
 
-bool StreamWriterBuilder::validate(Json::Value* invalid) const {
+bool StreamWriterBuilder::validate(AliasJson::Value* invalid) const {
   static const auto& valid_keys = *new std::set<String>{
       "indentation",
       "commentStyle",
@@ -1228,7 +1228,7 @@ Value& StreamWriterBuilder::operator[](const String& key) {
   return settings_[key];
 }
 // static
-void StreamWriterBuilder::setDefaults(Json::Value* settings) {
+void StreamWriterBuilder::setDefaults(AliasJson::Value* settings) {
   //! [StreamWriterBuilderDefaults]
   (*settings)["commentStyle"] = "All";
   (*settings)["indentation"] = "\t";
@@ -1255,4 +1255,4 @@ OStream& operator<<(OStream& sout, Value const& root) {
   return sout;
 }
 
-} // namespace Json
+} // namespace AliasJson
diff --git a/common/src/Cache/NodeTreeWriter.h b/common/src/Cache/NodeTreeWriter.h
index 802b4742c..295d42acf 100644
--- a/common/src/Cache/NodeTreeWriter.h
+++ b/common/src/Cache/NodeTreeWriter.h
@@ -25,8 +25,9 @@
 #include "json/json.h"
 #include <iostream>
 #include <sstream> 
-namespace Cache {
 
+namespace Cache {
+namespace Json = AliasJson;
 /*
  * @author eeliu
  * Sep 21, 2020 2:05:59 PM
diff --git a/common/src/ConnectionPool/SpanConnectionPool.cpp b/common/src/ConnectionPool/SpanConnectionPool.cpp
index 32240f98e..3ec367fa8 100644
--- a/common/src/ConnectionPool/SpanConnectionPool.cpp
+++ b/common/src/ConnectionPool/SpanConnectionPool.cpp
@@ -26,7 +26,7 @@
 
 namespace ConnectionPool {
 using Cache::SafeSharedState;
-
+namespace Json = AliasJson;
 SpanConnectionPool::SpanConnectionPool(const char* co_host):
         co_host(co_host),
         con_counter(0)
diff --git a/common/src/NodePool/TraceNode.cpp b/common/src/NodePool/TraceNode.cpp
index 023b870e8..359822f23 100644
--- a/common/src/NodePool/TraceNode.cpp
+++ b/common/src/NodePool/TraceNode.cpp
@@ -55,6 +55,8 @@ void TraceNode::initId(NodeID& id)
 
 void TraceNode::addChild(TraceNode& child)
 {
+    std::lock_guard<std::mutex> _safe(this->_lock);
+    
     if(this->p_child_head)  child.p_brother_node = this->p_child_head;
 
     this->p_child_head = &child;
diff --git a/common/src/NodePool/TraceNode.h b/common/src/NodePool/TraceNode.h
index 18de4e071..2333229a2 100644
--- a/common/src/NodePool/TraceNode.h
+++ b/common/src/NodePool/TraceNode.h
@@ -28,6 +28,7 @@
 #include <atomic>
 #include <map>
 #include <iostream>
+#include <mutex>
 
 namespace NodePool{
 
@@ -90,7 +91,7 @@ namespace NodePool{
 //    uint32_t _id;
 //};
 //
-
+namespace Json = AliasJson;
 using Context::ContextType;
 using Context::StringContextType;
 using Context::LongContextType;
@@ -149,11 +150,13 @@ class TraceNode
 
     PContextType& getContextByKey(const char* key)
     {
+         std::lock_guard<std::mutex> _safe(this->_lock);
         return this->_context.at(key);
     }
 
     void setStrContext(const char* key,const char* buf)
     {
+        std::lock_guard<std::mutex> _safe(this->_lock);
         PContextType context(std::make_shared<StringContextType>(buf));
         this->_context[key] = context;
         // std::string& value =  this->_context[key]->asStringValue();
@@ -180,6 +183,7 @@ class TraceNode
 
     Json::Value& operator[](const std::string key)
     {
+        std::lock_guard<std::mutex> _safe(this->_lock);
         return this->_value[key];
     }
 
@@ -209,6 +213,7 @@ class TraceNode
     Json::Value _value;
 
     std::map<std::string,PContextType>  _context;
+    std::mutex _lock;
 };
 }
 #endif /* COMMON_SRC_TRACENODE_H_ */
diff --git a/common/src/Util/Helper.cpp b/common/src/Util/Helper.cpp
index c4211519b..9dc955c90 100644
--- a/common/src/Util/Helper.cpp
+++ b/common/src/Util/Helper.cpp
@@ -25,6 +25,7 @@
 #include "Helper.h"
 
 namespace Helper{
+namespace Json = AliasJson;
 using Cache::NodeTreeWriter;
 static NodeTreeWriter _writer;
 static ConnectionPool::SpanConnectionPool _con_pool;
diff --git a/common/src/Util/Helper.h b/common/src/Util/Helper.h
index 98f9774ff..f8cfaf89e 100644
--- a/common/src/Util/Helper.h
+++ b/common/src/Util/Helper.h
@@ -39,7 +39,7 @@
 #include "ConnectionPool/SpanConnectionPool.h"
 
 namespace Helper{
-
+namespace Json = AliasJson;
 using std::chrono::steady_clock;
 using std::chrono::duration;
 using std::chrono::duration_cast;
diff --git a/common/src/common.cpp b/common/src/common.cpp
index 26cf9243e..0300be64f 100644
--- a/common/src/common.cpp
+++ b/common/src/common.cpp
@@ -31,6 +31,7 @@
 #include "Util/Helper.h"
 #include "ConnectionPool/SpanConnectionPool.h"
 
+namespace Json = AliasJson;
 using NodePool::TraceNode;
 using NodePool::PoolManager;
 using NodePool::PContextType;
@@ -78,8 +79,6 @@ static NodeID do_start_trace(NodeID& _id)
     }
 }
 
-// root must be the trace root
-// if not, your nodes must be leaked !!!
 static void free_nodes_tree(TraceNode* root)
 {
     if(root == nullptr) return ;
@@ -155,23 +154,23 @@ NodeID do_end_trace(NodeID& _id)
     return do_end_trace(node);
 }
 
-NodeID pinpoint_start_trace(NodeID _id)
+NodeID pinpoint_start_trace(NodeID parentId)
 {
     try
     {
-        pp_trace("#%d pinpoint_start start",_id);
-        return do_start_trace(_id);
+        pp_trace("#%d pinpoint_start start",parentId);
+        return do_start_trace(parentId);
     }
     catch(const std::out_of_range& ex)
     {
-        pp_trace(" start_trace#%d failed with %s",_id,ex.what());
+        pp_trace(" start_trace#%d failed with %s",parentId,ex.what());
     }
     catch(const std::runtime_error& ex)
     {
-        pp_trace(" start_trace#%d failed with %s",_id,ex.what());
+        pp_trace(" start_trace#%d failed with %s",parentId,ex.what());
     }catch(...)
     {
-        pp_trace(" start_trace#%d failed with unkonw reason",_id);
+        pp_trace(" start_trace#%d failed with unkonw reason",parentId);
     }
     return 0;
 }
diff --git a/plugins/PHP/Framework/Readme.md b/plugins/PHP/Framework/Readme.md
new file mode 100644
index 000000000..c465b3fbd
--- /dev/null
+++ b/plugins/PHP/Framework/Readme.md
@@ -0,0 +1,5 @@
+# welcome to use pinpoint-php
+
+
+
+# 欢迎使用pinpoint-php 监控的你PHP应用
\ No newline at end of file
diff --git a/plugins/PHP/Framework/ThinkPHP/Readme.md b/plugins/PHP/Framework/ThinkPHP/Readme.md
new file mode 100644
index 000000000..2991502a9
--- /dev/null
+++ b/plugins/PHP/Framework/ThinkPHP/Readme.md
@@ -0,0 +1,51 @@
+## How to Use in ThinkPHP5.0x
+
+### Limitation
+
+| -                  | version | checked |
+| ------------------ | ------- | ------- |
+| PHP                | 7+      | ✔      |
+| topthink/framework | 6.*   | ✔      |
+
+### Steps
+
+1. Import pinpoint entry header into `thinkphp/start.php` as below
+
+```php
+## start.php
+
+<?php
+
+namespace think;
+
+// ThinkPHP 引导文件
+// 1. 加载基础文件
+require __DIR__ . '/base.php';
+
+###################################################################
+define('AOP_CACHE_DIR', __DIR__ . '/../Cache/');
+define('PLUGINS_DIR', __DIR__ . '/../Plugins/');
+define('APPLICATION_NAME','app-thinkphp'); // your application name
+define('APPLICATION_ID','app-thinkphp');  // your application id
+define('PINPOINT_USE_CACHE','YES');
+require_once __DIR__ . '/../vendor/pinpoint-apm/pinpoint-php-aop/auto_pinpointed.php';
+###################################################################
+// 2. 执行应用
+App::run()->send();
+
+```
+
+2. require `pinpoint-php-aop` into your composer.json
+
+```json
+    "require": {
+        "php": ">=5.4.0",
+        "topthink/framework": "5.0.*",
+        "pinpoint-apm/pinpoint-php-aop": "dev-master"  <-- import pinpoint-php-aop
+    },
+```
+
+3. composer install #( composer update)
+4. copy [setting.ini](./setting.ini) into your `PLUGINS_DIR` folder.
+
+> ps Tell pinpoint-php-aop your framework is Thinkph>p5.0.x !
diff --git a/plugins/PHP/Plugins/Framework/ThinkPHP/setting.ini b/plugins/PHP/Framework/ThinkPHP/setting.ini
similarity index 100%
rename from plugins/PHP/Plugins/Framework/ThinkPHP/setting.ini
rename to plugins/PHP/Framework/ThinkPHP/setting.ini
diff --git a/plugins/PHP/Framework/ThinkPHP5/Readme.md b/plugins/PHP/Framework/ThinkPHP5/Readme.md
new file mode 100644
index 000000000..560b50c6b
--- /dev/null
+++ b/plugins/PHP/Framework/ThinkPHP5/Readme.md
@@ -0,0 +1,108 @@
+# How to Use in ThinkPHP5.0x
+
+## Limitation
+
+-|version|checked
+---|----|---
+PHP|7+|✔
+topthink/framework| 5.0.*| ✔
+
+
+## Steps
+
+
+1. Import pinpoint entry header into `thinkphp/start.php` as below
+
+
+```php
+## start.php
+
+<?php
+
+namespace think;
+
+// ThinkPHP 引导文件
+// 1. 加载基础文件
+require __DIR__ . '/base.php';
+
+###################################################################
+define('AOP_CACHE_DIR', __DIR__ . '/../Cache/');
+define('PLUGINS_DIR', __DIR__ . '/../Plugins/');
+define('APPLICATION_NAME','app-thinkphp'); // your application name
+define('APPLICATION_ID','app-thinkphp');  // your application id
+define('PINPOINT_USE_CACHE','YES');
+require_once __DIR__ . '/../vendor/pinpoint-apm/pinpoint-php-aop/auto_pinpointed.php';
+###################################################################
+// 2. 执行应用
+App::run()->send();
+
+```
+
+2. require `pinpoint-php-aop` into your composer.json
+
+
+``` json
+    "require": {
+        "php": ">=5.4.0",
+        "topthink/framework": "5.0.*",
+        "pinpoint-apm/pinpoint-php-aop": "dev-master"  <-- import pinpoint-php-aop
+    },
+```
+
+3. composer install #( composer update)
+4. copy [setting.ini](./setting.ini) into your `PLUGINS_DIR` folder.
+>ps Tell pinpoint-php-aop your framework is Thinkph>p5.0.x !
+
+# 怎样监控ThinkPHP5.0x 框架
+
+## 版本限制
+
+-|version|checked
+---|----|---
+PHP|7+|✔
+topthink/framework| 5.0.*| ✔
+
+## 步骤
+
+
+1. 在`thinkphp/start.php`插入pinpoint 入口代码
+
+
+```php
+## start.php
+
+<?php
+
+namespace think;
+
+// ThinkPHP 引导文件
+// 1. 加载基础文件
+require __DIR__ . '/base.php';
+
+###################################################################
+define('AOP_CACHE_DIR', __DIR__ . '/../Cache/');
+define('PLUGINS_DIR', __DIR__ . '/../Plugins/');
+define('APPLICATION_NAME','app-thinkphp'); // your application name
+define('APPLICATION_ID','app-thinkphp');  // your application id
+define('PINPOINT_USE_CACHE','YES');
+require_once __DIR__ . '/../vendor/pinpoint-apm/pinpoint-php-aop/auto_pinpointed.php';
+###################################################################
+// 2. 执行应用
+App::run()->send();
+
+```
+
+2. 包含 `pinpoint-php-aop` 在你的composer.json
+
+
+``` json
+    "require": {
+        "php": ">=5.4.0",
+        "topthink/framework": "5.0.*",
+        "pinpoint-apm/pinpoint-php-aop": "dev-master"  <-- import pinpoint-php-aop
+    },
+```
+
+3. composer install #( composer update)
+4. 拷贝 [setting.ini](./setting.ini) 到你的插件 `PLUGINS_DIR` 目录下.
+> 用了告诉pinpoint-php-aop当前框架的配置文件
diff --git a/plugins/PHP/Plugins/Framework/symfony/setting.ini b/plugins/PHP/Framework/ThinkPHP5/setting.ini
similarity index 51%
rename from plugins/PHP/Plugins/Framework/symfony/setting.ini
rename to plugins/PHP/Framework/ThinkPHP5/setting.ini
index 65e27e9c0..2f2e7a889 100644
--- a/plugins/PHP/Plugins/Framework/symfony/setting.ini
+++ b/plugins/PHP/Framework/ThinkPHP5/setting.ini
@@ -1,8 +1,7 @@
 [nm_class]
 ;rename below class
-PDO=Plugins\Sys\PDO\PDO
-
-;Swoole\Http\Server=Plugins\Framework\Swoole\Http\Server
+PDO=Pinpoint\Plugins\Sys\PDO\PDO
+Redis=Pinpoint\Plugins\Sys\phpredis\PRedis
 
 [nm_func]
 ;rename below system function
@@ -10,6 +9,7 @@ PDO=Plugins\Sys\PDO\PDO
 ; I am not lazy, does user real need this?
 [nm_add_class]
 ;expand above setting into below class
-class_name[]=Doctrine\DBAL\Driver\PDOConnection
+class_name[]=think\db\Connection
+class_name[]=think\cache\driver\Redis
 [nm_ignore_class]
-;ho ho, do not change in below class
\ No newline at end of file
+;ho ho, do not change in below class
diff --git a/plugins/PHP/Framework/Yii2/Readme.md b/plugins/PHP/Framework/Yii2/Readme.md
new file mode 100644
index 000000000..3f002ee6f
--- /dev/null
+++ b/plugins/PHP/Framework/Yii2/Readme.md
@@ -0,0 +1,60 @@
+# How to Use in Yii2
+
+## Limitation
+
+-|version|checked
+---|----|---
+PHP|7+|✔
+
+
+## Steps
+
+
+1. Import pinpoint entry header into `web/index.php` as below
+
+
+```php
+## index.php
+
+<?php
+
+// comment out the following two lines when deployed to production
+defined('YII_DEBUG') or define('YII_DEBUG', true);
+defined('YII_ENV') or define('YII_ENV', 'dev');
+
+require __DIR__ . '/../vendor/autoload.php';
+require __DIR__ . '/../vendor/yiisoft/yii2/Yii.php';
+
+
+###################################################################
+define('AOP_CACHE_DIR', __DIR__ . '/../Cache/');
+define('PLUGINS_DIR', __DIR__ . '/../Plugins/');
+define('APPLICATION_NAME','app-yii2'); // your application name
+define('APPLICATION_ID','app-yii2');  // your application id
+define('PINPOINT_USE_CACHE','YES');
+define('PP_REQ_PLUGINS','\Pinpoint\Plugins\Yii2PerRequestPlugins');
+require_once __DIR__ . '/../vendor/pinpoint-apm/pinpoint-php-aop/auto_pinpointed.php';
+###################################################################
+
+
+$config = require __DIR__ . '/../config/web.php';
+
+(new yii\web\Application($config))->run();
+
+
+```
+
+2. require `pinpoint-php-aop` into your composer.json
+
+
+``` json
+    "require": {
+        ...
+        "pinpoint-apm/pinpoint-php-aop": "dev-master"  <-- import pinpoint-php-aop
+    },
+```
+
+3. composer install #( composer update)
+4. copy [setting.ini](./setting.ini) into your `PLUGINS_DIR` folder.
+
+>ps Tell pinpoint-php-aop your framework is yii2
diff --git a/plugins/PHP/Framework/Yii2/setting.ini b/plugins/PHP/Framework/Yii2/setting.ini
new file mode 100644
index 000000000..59d3e5d56
--- /dev/null
+++ b/plugins/PHP/Framework/Yii2/setting.ini
@@ -0,0 +1,26 @@
+[nm_class]
+;rename below class
+PDO=Pinpoint\Plugins\Sys\PDO\PDO
+
+;Swoole\Http\Server=Plugins\Framework\Swoole\Http\Server
+
+[nm_func]
+;rename below system function
+curl_init=Pinpoint\Plugins\Sys\curl\curl_init
+curl_setopt=Pinpoint\Plugins\Sys\curl\curl_setopt
+curl_exec=Pinpoint\Plugins\Sys\curl\curl_exec
+curl_close=Pinpoint\Plugins\Sys\curl\curl_close
+curl_setopt_array=Pinpoint\Plugins\Sys\curl\curl_setopt_array
+
+[nm_string]
+; I am not lazy, does user real need this?
+[nm_add_class]
+;expand above setting into below class
+;class_name[]=Spiral\Database\Driver\Driver
+class_name[]=linslin\yii2\curl\Curl
+class_name[]=yii\httpclient\CurlTransport
+class_name[]=yii\db\mssql\PDO
+class_name[]=yii\db\mssql\DBLibPDO
+class_name[]=yii\db\mssql\SqlsrvPDO
+[nm_ignore_class]
+;ho ho, do not change in below class
diff --git a/plugins/PHP/Framework/laravel/Readme.md b/plugins/PHP/Framework/laravel/Readme.md
new file mode 100644
index 000000000..ec3e2383a
--- /dev/null
+++ b/plugins/PHP/Framework/laravel/Readme.md
@@ -0,0 +1,48 @@
+## How to Use in ThinkPHP5.0x
+
+### Limitation
+
+| -                  | version | checked |
+| ------------------ | ------- | ------- |
+| PHP                | 7+      | ✔      |
+| laravel/framework | ^8.65   | ✔      |
+
+### Steps
+
+1. Import pinpoint entry header into `public/index.php` as below
+
+```php
+## index.php
+
+<?php
+
+.....
+require __DIR__.'/../vendor/autoload.php'; // <------- below this line ✨
+
+###################################################################
+define('AOP_CACHE_DIR', __DIR__ . '/../Cache/');
+define('PLUGINS_DIR', __DIR__ . '/../Plugins/');
+define('APPLICATION_NAME','app-thinkphp'); // your application name
+define('APPLICATION_ID','app-thinkphp');  // your application id
+define('PINPOINT_USE_CACHE','YES');
+require_once __DIR__ . '/../vendor/pinpoint-apm/pinpoint-php-aop/auto_pinpointed.php';
+###################################################################
+
+```
+
+2. require `pinpoint-php-aop` into your composer.json
+
+```json
+    "require": {
+        "php": "^7.3|^8.0",
+        "fruitcake/laravel-cors": "^2.0",
+        "guzzlehttp/guzzle": "^7.0.1",
+        "laravel/framework": "^8.65",
+        "laravel/tinker": "^2.5",
+        "tymon/jwt-auth": "^1.0",
+        "pinpoint-apm/pinpoint-php-aop": "dev-master" <---- require pinpoint-apm
+    },
+```
+
+3. composer install #( composer update)
+4. copy [setting.ini](./setting.ini) into your `PLUGINS_DIR` folder.
diff --git a/plugins/PHP/Plugins/Framework/Laravel/setting.ini b/plugins/PHP/Framework/laravel/setting.ini
similarity index 69%
rename from plugins/PHP/Plugins/Framework/Laravel/setting.ini
rename to plugins/PHP/Framework/laravel/setting.ini
index 29a383e46..62a652c08 100644
--- a/plugins/PHP/Plugins/Framework/Laravel/setting.ini
+++ b/plugins/PHP/Framework/laravel/setting.ini
@@ -1,8 +1,8 @@
 [nm_class]
 ;rename below class
-PDO=Plugins\Sys\PDO\PDO
+PDO=Pinpoint\Plugins\Sys\PDO\PDO
+; Redis=Pinpoint\Plugins\Sys\phpredis\PRedis
 
-;Swoole\Http\Server=Plugins\Framework\Swoole\Http\Server
 
 [nm_func]
 ;rename below system function
@@ -11,6 +11,5 @@ PDO=Plugins\Sys\PDO\PDO
 [nm_add_class]
 ;expand above setting into below class
 class_name[]=Illuminate\Database\Connectors\Connector
-class_name[]=Doctrine\DBAL\Driver\PDOConnection
 [nm_ignore_class]
 ;ho ho, do not change in below class
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/.gitignore b/plugins/PHP/Plugins/.gitignore
deleted file mode 100644
index 141b88857..000000000
--- a/plugins/PHP/Plugins/.gitignore
+++ /dev/null
@@ -1,1 +0,0 @@
-/settting.ini
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/AutoGen/CakePHP/.gitignore b/plugins/PHP/Plugins/AutoGen/CakePHP/.gitignore
deleted file mode 100644
index e69de29bb..000000000
diff --git a/plugins/PHP/Plugins/AutoGen/EasySwoole/MysqliGetPlugin.php b/plugins/PHP/Plugins/AutoGen/EasySwoole/MysqliGetPlugin.php
deleted file mode 100644
index 07b3fceb8..000000000
--- a/plugins/PHP/Plugins/AutoGen/EasySwoole/MysqliGetPlugin.php
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-/******************************************************************************
- * Copyright 2020 NAVER Corp.                                                 *
- *                                                                            *
- * Licensed under the Apache License, Version 2.0 (the "License");            *
- * you may not use this file except in compliance with the License.           *
- * You may obtain a copy of the License at                                    *
- *                                                                            *
- *     http://www.apache.org/licenses/LICENSE-2.0                             *
- *                                                                            *
- * Unless required by applicable law or agreed to in writing, software        *
- * distributed under the License is distributed on an "AS IS" BASIS,          *
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
- * See the License for the specific language governing permissions and        *
- * limitations under the License.                                             *
- ******************************************************************************/
-namespace Plugins\AutoGen\EasySwoole;
-use Plugins\Framework\Swoole\Candy;
-
-/**
- * Class MysqliSelectDbPlugin
- * @hook: EasySwoole\Mysqli\Mysqli::get
- * @hook: EasySwoole\Mysqli\Mysqli::insert
- * @hook: EasySwoole\Mysqli\Mysqli::update
- */
-class MysqliGetPlugin extends Candy
-{
-    function onBefore()
-    {
-        $ins_mysqli = $this->who;
-        $config = $ins_mysqli->getConfig();
-        $host = $config->getHost();
-        $port = $config->getPort();
-        pinpoint_add_clue(PP_SERVER_TYPE,PP_MYSQL,$this->id);
-        pinpoint_add_clue(PP_DESTINATION,"$host,$port",$this->id);
-
-    }
-
-    function onEnd(&$ret)
-    {
-        pinpoint_add_clue(PP_SQL_FORMAT,$this->who->getLastQuery(),$this->id);
-    }
-
-    function onException($e)
-    {
-
-    }
-}
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/AutoGen/EasySwoole/MysqliSelectDbPlugin.php b/plugins/PHP/Plugins/AutoGen/EasySwoole/MysqliSelectDbPlugin.php
deleted file mode 100644
index f31f006b8..000000000
--- a/plugins/PHP/Plugins/AutoGen/EasySwoole/MysqliSelectDbPlugin.php
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-/******************************************************************************
- * Copyright 2020 NAVER Corp.                                                 *
- *                                                                            *
- * Licensed under the Apache License, Version 2.0 (the "License");            *
- * you may not use this file except in compliance with the License.           *
- * You may obtain a copy of the License at                                    *
- *                                                                            *
- *     http://www.apache.org/licenses/LICENSE-2.0                             *
- *                                                                            *
- * Unless required by applicable law or agreed to in writing, software        *
- * distributed under the License is distributed on an "AS IS" BASIS,          *
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
- * See the License for the specific language governing permissions and        *
- * limitations under the License.                                             *
- ******************************************************************************/
-namespace Plugins\AutoGen\EasySwoole;
-use Plugins\Framework\Swoole\Candy;
-
-/**
- * Class MysqliSelectDbPlugin
- * @hook: EasySwoole\Mysqli\Mysqli::selectDb
- */
-class MysqliSelectDbPlugin extends Candy
-{
-
-    function onBefore()
-    {
-        pinpoint_add_clues(PP_PHP_ARGS,$this->args[0],$this->id);
-    }
-
-    function onEnd(&$ret)
-    {
-
-    }
-
-    function onException($e)
-    {
-
-    }
-}
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/AutoGen/EasySwoole/ResponsePlugin.php b/plugins/PHP/Plugins/AutoGen/EasySwoole/ResponsePlugin.php
deleted file mode 100644
index ae7b09eba..000000000
--- a/plugins/PHP/Plugins/AutoGen/EasySwoole/ResponsePlugin.php
+++ /dev/null
@@ -1,49 +0,0 @@
-<?php
-/******************************************************************************
- * Copyright 2020 NAVER Corp.                                                 *
- *                                                                            *
- * Licensed under the Apache License, Version 2.0 (the "License");            *
- * you may not use this file except in compliance with the License.           *
- * You may obtain a copy of the License at                                    *
- *                                                                            *
- *     http://www.apache.org/licenses/LICENSE-2.0                             *
- *                                                                            *
- * Unless required by applicable law or agreed to in writing, software        *
- * distributed under the License is distributed on an "AS IS" BASIS,          *
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
- * See the License for the specific language governing permissions and        *
- * limitations under the License.                                             *
- ******************************************************************************/
-namespace Plugins\AutoGen\EasySwoole;
-
-use Plugins\Framework\Swoole\IDContext;
-
-/**
- * @hook: EasySwoole\Http\Message\Response::withStatus
- */
-class ResponsePlugin
-{
-    public function __construct($apId,$who,&...$args)
-    {
-        $id = IDContext::get();
-        $code = $args[0];
-        pinpoint_set_context((string)PP_HTTP_STATUS_CODE,(string)$code,$id);
-        if($code !== 200){
-            pinpoint_add_clue(PP_ADD_EXCEPTION,"http response not 200. status=[$code]",$id,PP_ROOT_LOC);
-        }
-    }
-
-    function onBefore()
-    {
-    }
-
-    function onEnd(&$ret)
-    {
-
-    }
-
-    function onException($e)
-    {
-
-    }
-}
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/AutoGen/GuzzleHttp/GuzzlePlugin.php b/plugins/PHP/Plugins/AutoGen/GuzzleHttp/GuzzlePlugin.php
deleted file mode 100644
index f016d28cd..000000000
--- a/plugins/PHP/Plugins/AutoGen/GuzzleHttp/GuzzlePlugin.php
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-/******************************************************************************
- * Copyright 2020 NAVER Corp.                                                 *
- *                                                                            *
- * Licensed under the Apache License, Version 2.0 (the "License");            *
- * you may not use this file except in compliance with the License.           *
- * You may obtain a copy of the License at                                    *
- *                                                                            *
- *     http://www.apache.org/licenses/LICENSE-2.0                             *
- *                                                                            *
- * Unless required by applicable law or agreed to in writing, software        *
- * distributed under the License is distributed on an "AS IS" BASIS,          *
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
- * See the License for the specific language governing permissions and        *
- * limitations under the License.                                             *
- ******************************************************************************/
-namespace Plugins\AutoGen\GuzzleHttp;
-
-use Plugins\Common\Candy;
-use Plugins\Sys\curl\CurlUtil;
-
-///@hook:GuzzleHttp\Client::request
-class GuzzlePlugin extends Candy
-{
-    ///@hook:GuzzleHttp\Psr7\Request::__construct
-    function onBefore()
-    {
-//        echo 'GuzzleHttp\Psr7\Request';
-        if(strpos($this->apId, "Request::__construct") !== false){
-            pinpoint_add_clue(PP_DESTINATION,CurlUtil::getHostFromURL($this->args[1]->getHost()));
-            pinpoint_add_clues(PP_HTTP_URL,$this->args[1]);
-            pinpoint_add_clue(PP_SERVER_TYPE,PP_PHP_REMOTE);
-
-            $n_headers =[] ;
-            if( is_array($this->args[2]) && array_key_exists('headers',$this->args[2]))
-            {
-                $n_headers = $this->args[2];
-            }
-            $n_headers = array_merge($n_headers,CurlUtil::getPPHeader($this->args[1]));
-            $this->args[2] = $n_headers;
-        }
-    }
-
-    function onEnd(&$ret)
-    {
-        pinpoint_add_clue(PP_NEXT_SPAN_ID,pinpoint_get_context(PP_NEXT_SPAN_ID));
-        pinpoint_add_clues(PP_HTTP_STATUS_CODE,(string)($ret->getStatusCode()));
-    }
-
-    function onException($e)
-    {
-        pinpoint_add_clue(PP_ADD_EXCEPTION,$e->getMessage());
-    }
-}
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/AutoGen/MongoPlugin/MongoPlugin.php b/plugins/PHP/Plugins/AutoGen/MongoPlugin/MongoPlugin.php
deleted file mode 100644
index 961a9f8ac..000000000
--- a/plugins/PHP/Plugins/AutoGen/MongoPlugin/MongoPlugin.php
+++ /dev/null
@@ -1,53 +0,0 @@
-<?php
-#-------------------------------------------------------------------------------
-# Copyright 2020 NAVER Corp
-#
-# Licensed under the Apache License, Version 2.0 (the "License"); you may not
-# use this file except in compliance with the License.  You may obtain a copy
-# of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
-# License for the specific language governing permissions and limitations under
-# the License.
-#-------------------------------------------------------------------------------
-
-
-namespace Plugins;
-use Plugins\Candy;
-
-class MongoPlugin extends Candy
-{
-
-    /**
-     * @hook:MongoDB\Client::__construct
-     * @hook:MongoDB\Collection::insertOne
-     * @hook:MongoDB\Collection::updateOne
-     * @hook:MongoDB\Collection::deleteMany
-     * @hook:MongoDB\Collection::find
-     */
-    function onBefore()
-    {
-        if(strpos($this->apId, "Client::__construct")) {
-            $url=$this->args[0];
-            pinpoint_add_clue(SERVER_TYPE,MONGODB_EXE_QUERY);
-            pinpoint_add_clue(DESTINATION, $url);
-            return;
-        }
-        pinpoint_add_clue(SERVER_TYPE,MONGODB_EXE_QUERY);
-        pinpoint_add_clues(PHP_ARGS, print_r($this->args[0],true));
-    }
-
-    function onEnd(&$ret)
-    {
-        // TODO: Implement onEnd() method.
-    }
-
-    function onException($e)
-    {
-        // TODO: Implement onException() method.
-    }
-}
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/AutoGen/SwooleApp/UserPlugin.php b/plugins/PHP/Plugins/AutoGen/SwooleApp/UserPlugin.php
deleted file mode 100644
index b650a5a3e..000000000
--- a/plugins/PHP/Plugins/AutoGen/SwooleApp/UserPlugin.php
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-/******************************************************************************
- * Copyright 2020 NAVER Corp.                                                 *
- *                                                                            *
- * Licensed under the Apache License, Version 2.0 (the "License");            *
- * you may not use this file except in compliance with the License.           *
- * You may obtain a copy of the License at                                    *
- *                                                                            *
- *     http://www.apache.org/licenses/LICENSE-2.0                             *
- *                                                                            *
- * Unless required by applicable law or agreed to in writing, software        *
- * distributed under the License is distributed on an "AS IS" BASIS,          *
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
- * See the License for the specific language governing permissions and        *
- * limitations under the License.                                             *
- ******************************************************************************/
-
-
-
-namespace Plugins\AutoGen\SwooleApp;
-use Plugins\Framework\Swoole\Candy;
-
-/**
- * @hook:app\HttpServer::doSomething app\HttpServer::doSomething1 app\HttpServer::doSomething2
- * @hook:app\HttpServer::doAny
- */
-class UserPlugin extends Candy
-{
-    public function onBefore(){
-        pinpoint_add_clue(PP_SERVER_TYPE,PP_PHP_METHOD,$this->id);
-        pinpoint_add_clues(PP_PHP_ARGS,"placeholder",$this->id);
-    }
-
-    public function onEnd(&$ret){
-        pinpoint_add_clues(PP_PHP_RETURN,"placeholder",$this->id);
-    }
-
-    public function onException($e){
-        pinpoint_add_clue(PP_ADD_EXCEPTION,$e->getMessage(),$this->id);
-    }
-}
diff --git a/plugins/PHP/Plugins/AutoGen/app/CommonPlugin.php b/plugins/PHP/Plugins/AutoGen/app/CommonPlugin.php
deleted file mode 100644
index bb8126742..000000000
--- a/plugins/PHP/Plugins/AutoGen/app/CommonPlugin.php
+++ /dev/null
@@ -1,61 +0,0 @@
-<?php
-#-------------------------------------------------------------------------------
-# Copyright 2019 NAVER Corp
-# 
-# Licensed under the Apache License, Version 2.0 (the "License"); you may not
-# use this file except in compliance with the License.  You may obtain a copy
-# of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
-# License for the specific language governing permissions and limitations under
-# the License.
-#-------------------------------------------------------------------------------
-
-namespace Plugins\AutoGen\app;
-use Plugins\Common\Candy;
-
-///@hook:app\Foo::foo_p3_rbool app\Foo::foo_p3_rfloat app\Foo::foo_p3 app\Foo::foo_p1
-///@hook:app\AppDate::\date app1\Foo::test_func_2 app\AopFunction::test_func1 app\TestError::Strict
-///@hook:app\AppDate::outputDate
-///@hook:app\AppDate::\date
-///@hook:app\AopFunction::test_func1
-///@hook:app\AopFunction::test_func2  app1\Foo::test_func_2
-///@hook:app\Person::eat app\Teacher::eat app\Student::eat app\Doctor::other
-///@hook:app\TestGenerator::generator
-///@hook:app\AbstractStudent::eat app\AbstractStudent::drink app\AbstractStudent::breath
-///@hook:app\AbstractStudent::eat app\AbstractStudent::drink app\AbstractPerson::breath
-///@hook:app\InterfaceStudent::setVariable app\InterfaceStudent::getHtml app\InterfaceStudent::other
-///@hook:app\TestClone::setColor app\TestClone::getColor app\TestClone::__clone
-///@hook:app\TestRecursion::test_cumsum1 app\TestRecursion::test_cumsum2
-///@hook:app\TestAnonymous::createbell app\AopFunction::test_func1
-///@hook:app\TestStatic::static_func
-///@hook:app\TestFinalClass::test app\TestFinalFunc::test
-///@hook:app\FuncInTrait::traitfunc app\TestTrait::test
-///@hook:app\CallBackFunc::fnCallback1 app\CallBackFunc::fnCallback2
-///@hook:app\LevelClass::public_function app\LevelClass::protected_function app\LevelClass::private_function
-///@hook:app\TestError::throwException app\TestError::caughtException app\TestError::testRetConst app\TestError::testRetParm app\TestError::testRetConstAndExp app\TestError::testParseError app\TestError::testTypeError app\TestError::testArithmeticError app\TestError::testDivisionByZeroError app\TestError::testAssertionError
-///@hook:app\OverRideLevel::public_function app\OverRideLevel::protected_function app\OverRideLevel::private_function
-///@hook:app\TestArgs::test_args
-///@hook:app\TestReturn::test_return
-class CommonPlugin extends Candy
-{
-    ///@hook:app\DBcontrol::connectDb
-    public function onBefore(){
-        pinpoint_add_clue("stp",PP_PHP_METHOD);
-        pinpoint_add_clues(PP_PHP_ARGS,"input parameters");
-    }
-
-    ///@hook:app\DBcontrol::getData1 app\DBcontrol::\array_push
-    public function onEnd(&$ret){
-        pinpoint_add_clues(PP_PHP_RETURN,"return value");
-    }
-
-    ///@hook:app\DBcontrol::getData2
-    public function onException($e){
-        pinpoint_add_clue("EXP",$e->getMessage());
-    }
-}
diff --git a/plugins/PHP/Plugins/AutoGen/workerman/AcceptPlugin.php b/plugins/PHP/Plugins/AutoGen/workerman/AcceptPlugin.php
deleted file mode 100644
index 3510fca28..000000000
--- a/plugins/PHP/Plugins/AutoGen/workerman/AcceptPlugin.php
+++ /dev/null
@@ -1,184 +0,0 @@
-<?php
-/******************************************************************************
- * Copyright 2020 NAVER Corp.                                                 *
- *                                                                            *
- * Licensed under the Apache License, Version 2.0 (the "License");            *
- * you may not use this file except in compliance with the License.           *
- * You may obtain a copy of the License at                                    *
- *                                                                            *
- *     http://www.apache.org/licenses/LICENSE-2.0                             *
- *                                                                            *
- * Unless required by applicable law or agreed to in writing, software        *
- * distributed under the License is distributed on an "AS IS" BASIS,          *
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
- * See the License for the specific language governing permissions and        *
- * limitations under the License.                                             *
- ******************************************************************************/
-namespace Plugins\AutoGen\workerman;
-require_once __DIR__ . "/../../__init__.php";
-use Plugins\Util\Trace;
-
-/**
- * @hook: Workerman\Worker::acceptConnection
- */
-class AcceptPlugin
-{
-    protected $worker_self;
-    protected $origin_onMessage;
-    protected $origin_onConnect;
-    protected $origin_onClose;
-    public function __construct($apId,$who,&...$args)
-    {
-        assert($who instanceof \Workerman\Worker);
-        $this->worker_self = $who;
-    }
-
-    public function onEnd()
-    {
-        $this->worker_self->onMessage =  $this->origin_onMessage;
-        $this->worker_self->onConnect =  $this->origin_onConnect;
-        $this->worker_self->onClose   =  $this->origin_onClose ;
-    }
-
-
-    public function onBefore(){
-        $this->origin_onMessage =  $this->worker_self->onMessage;
-        $this->origin_onConnect =  $this->worker_self->onConnect;
-        $this->origin_onClose  =   $this->worker_self->onClose;
-        $this->worker_self->onMessage = function ($connection, $request) {
-            $id = $connection->_pinpoint_node_id_;
-            echo "onMessage $id \n";
-            Context::getInstance()->setId($id);
-            $this->onRequest($connection,$request);
-            if(!empty($this->origin_onMessage))
-            {
-                ($this->origin_onMessage)($connection,$request);
-            }
-        };
-
-        $this->worker_self->onConnect = function($connection) {
-            $id =pinpoint_start_trace(0);
-            //  store _pinpoint_id_ into connection
-            $connection->_pinpoint_node_id_ = $id;
-            echo "onConnect $id \n";
-            if(!empty($this->origin_onConnect))
-            {
-                ($this->origin_onConnect)($connection);
-            }
-        };
-
-        $this->worker_self->onClose = function($connection)
-        {
-            // request end
-            if(!empty($this->origin_onClose))
-            {
-                ($this->origin_onClose)($connection);
-            }
-            $this->onClose($connection);
-        };
-
-
-    }
-
-    public function onException($e)
-    {
-
-    }
-
-
-    public function onRequest(&$connection, &$request)
-    {
-        $id = $connection->_pinpoint_node_id_;
-
-        $header =$request->header();
-//        var_dump($header);
-        pinpoint_add_clue(PP_REQ_URI,$request->uri(),$id);
-        pinpoint_add_clue(PP_REQ_CLIENT,$connection->getRemoteIp(),$id);
-        pinpoint_add_clue(PP_REQ_SERVER,$header['host'],$id);
-        pinpoint_add_clue(PP_SERVER_TYPE, PP_PHP,$id);
-        pinpoint_add_clue(PP_INTERCEPTOR_NAME, "workerman-http",$id);
-        $this->app_name = APPLICATION_NAME;
-        pinpoint_add_clue(PP_APP_NAME, $this->app_name,$id);
-        pinpoint_set_context(PP_APP_NAME,$this->app_name,$id);
-        $this->app_id = APPLICATION_ID;
-        pinpoint_add_clue(PP_APP_ID, $this->app_id,$id);
-        pinpoint_set_context(PP_APP_NAME, $this->app_id,$id);
-
-        if (isset($header[PP_HEADER_PSPANID]) || array_key_exists(PP_HEADER_PSPANID, $header)) {
-            $this->psid = $header[PP_HEADER_PSPANID];
-            pinpoint_add_clue(PP_PARENT_SPAN_ID, $this->psid,$id);
-            pinpoint_set_context(PP_PARENT_SPAN_ID, $this->psid,$id);
-            echo "psid: $this->psid \n";
-        }
-
-        if (isset($header[PP_HEADER_SPANID]) || array_key_exists(PP_HEADER_SPANID, $header)) {
-            $this->sid = $header[PP_HEADER_SPANID];
-            echo "sid: $this->sid \n";
-        } else {
-            $this->sid = Trace::generateSpanID();
-        }
-
-        if (isset($header[PP_HEADER_TRACEID]) || array_key_exists(PP_HEADER_TRACEID, $header)) {
-            $this->tid = $header[PP_HEADER_TRACEID];
-        } else {
-            $this->tid = $this->generateTransactionID();
-        }
-
-        if (isset($header[PP_HEADER_PAPPNAME]) || array_key_exists(PP_HEADER_PAPPNAME, $header)) {
-            $this->pname = $header[PP_HEADER_PAPPNAME];
-
-            pinpoint_add_clue(PP_PARENT_NAME, $this->pname,$id);
-            echo "pname: $this->pname";
-        }
-
-        if (isset($header[PP_HEADER_PAPPTYPE]) || array_key_exists(PP_HEADER_PAPPTYPE, $header)) {
-            $this->ptype = $header[PP_HEADER_PAPPTYPE];
-            pinpoint_add_clue(PP_PARENT_TYPE, $this->ptype,$id);
-        }
-
-        if (isset($header[PP_HEADER_PINPOINT_HOST]) || array_key_exists(PP_HEADER_PINPOINT_HOST, $header)) {
-            $this->ah = $header[PP_HEADER_PINPOINT_HOST];
-            pinpoint_add_clue(PP_PARENT_HOST, $this->ah,$id);
-        }
-        if (isset($header[PP_HEADER_NGINX_PROXY]) || array_key_exists(PP_HEADER_NGINX_PROXY, $header)) {
-            pinpoint_add_clue(PP_NGINX_PROXY, $header[PP_HEADER_NGINX_PROXY],$id);
-        }
-
-        if (isset($header[PP_HEADER_APACHE_PROXY]) || array_key_exists(PP_HEADER_APACHE_PROXY, $header)) {
-            pinpoint_add_clue(PP_APACHE_PROXY, $header[PP_HEADER_APACHE_PROXY],$id);
-        }
-
-        pinpoint_set_context("Pinpoint-Sampled",PP_SAMPLED,$id);
-        if (isset($header[PP_HEADER_SAMPLED]) || array_key_exists(PP_HEADER_SAMPLED, $header)) {
-            if ($header[PP_HEADER_SAMPLED] == PP_NOT_SAMPLED) {
-                //drop this request. collector could not receive any thing
-                pinpoint_drop_trace($id);
-                pinpoint_set_context("Pinpoint-Sampled",PP_NOT_SAMPLED,$id);
-            }
-
-        } else {
-            if(pinpoint_tracelimit())
-            {
-                pinpoint_set_context("Pinpoint-Sampled",PP_NOT_SAMPLED,$id);
-                pinpoint_drop_trace($id);
-            }
-        }
-
-        pinpoint_add_clue(PP_TRANSCATION_ID, $this->tid,$id);
-        pinpoint_set_context(PP_TRANSCATION_ID, $this->tid,$id);
-        pinpoint_add_clue(PP_SPAN_ID, $this->sid,$id);
-        pinpoint_set_context(PP_SPAN_ID, $this->tid,$id);
-
-    }
-
-    public function onClose(&$connection)
-    {
-        pinpoint_end_trace($connection->_pinpoint_node_id_);
-        echo "onClose ".$connection->_pinpoint_node_id_."\n";
-    }
-
-    public function generateTransactionID()
-    {
-        return  $this->app_id . '^' . strval(pinpoint_start_time()) . '^' . strval(pinpoint_unique_id());
-    }
-}
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/AutoGen/workerman/Candy.php b/plugins/PHP/Plugins/AutoGen/workerman/Candy.php
deleted file mode 100644
index dca442516..000000000
--- a/plugins/PHP/Plugins/AutoGen/workerman/Candy.php
+++ /dev/null
@@ -1,59 +0,0 @@
-<?php
-/******************************************************************************
- * Copyright 2020 NAVER Corp.                                                 *
- *                                                                            *
- * Licensed under the Apache License, Version 2.0 (the "License");            *
- * you may not use this file except in compliance with the License.           *
- * You may obtain a copy of the License at                                    *
- *                                                                            *
- *     http://www.apache.org/licenses/LICENSE-2.0                             *
- *                                                                            *
- * Unless required by applicable law or agreed to in writing, software        *
- * distributed under the License is distributed on an "AS IS" BASIS,          *
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
- * See the License for the specific language governing permissions and        *
- * limitations under the License.                                             *
- ******************************************************************************/
-namespace Plugins\AutoGen\workerman;
-
-abstract class Candy
-{
-    protected $apId;
-    protected $who;
-    protected $args;
-    protected $pinpoint_id;
-    protected $ret=null;
-
-    public function __construct($apId,$who,&...$args)
-    {
-        $parent_id = Context::getInstance()->getId();
-        $this->apId = $apId;
-        $this->who =  $who;
-        $this->args = &$args;
-        $newid = pinpoint_start_trace($parent_id);
-        // store current id into candy
-        $this->pinpoint_id = $newid;
-        // update global id
-        Context::getInstance()->setId($newid);
-        pinpoint_add_clue(PP_INTERCEPTOR_NAME,$apId,$this->pinpoint_id);
-        echo "$apId start -> $parent_id $newid \n";
-    }
-
-    public function __destruct()
-    {
-
-    }
-
-    abstract function onBefore();
-
-    abstract function onException($e);
-
-    function onEnd(&$ret)
-    {
-        // update pinpoint_id
-        $id = pinpoint_end_trace($this->pinpoint_id);
-        Context::getInstance()->setId($id);
-        echo  $this->apId." end ".$this->pinpoint_id."\n";
-    }
-
-}
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/AutoGen/workerman/Context.php b/plugins/PHP/Plugins/AutoGen/workerman/Context.php
deleted file mode 100644
index 2a634149d..000000000
--- a/plugins/PHP/Plugins/AutoGen/workerman/Context.php
+++ /dev/null
@@ -1,49 +0,0 @@
-<?php
-/******************************************************************************
- * Copyright 2020 NAVER Corp.                                                 *
- *                                                                            *
- * Licensed under the Apache License, Version 2.0 (the "License");            *
- * you may not use this file except in compliance with the License.           *
- * You may obtain a copy of the License at                                    *
- *                                                                            *
- *     http://www.apache.org/licenses/LICENSE-2.0                             *
- *                                                                            *
- * Unless required by applicable law or agreed to in writing, software        *
- * distributed under the License is distributed on an "AS IS" BASIS,          *
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
- * See the License for the specific language governing permissions and        *
- * limitations under the License.                                             *
- ******************************************************************************/
-
-/**
- * Created by PhpStorm.
- * User: eeliu
- * Date: 10/15/20
- * Time: 2:37 PM
- */
-
-namespace Plugins\AutoGen\workerman;
-
-
-class Context
-{
-    private static $context=null;
-    private $id;
-    public static function getInstance()
-    {
-        if(self::$context == null){
-            self::$context = new Context();
-        }
-        return self::$context;
-    }
-
-    public function setId($id)
-    {
-        assert($id!=0);
-        $this->id = $id;
-    }
-    public function getId()
-    {
-        return $this->id;
-    }
-}
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/AutoGen/workerman/HttpClientPlugin.php b/plugins/PHP/Plugins/AutoGen/workerman/HttpClientPlugin.php
deleted file mode 100644
index 454e827cf..000000000
--- a/plugins/PHP/Plugins/AutoGen/workerman/HttpClientPlugin.php
+++ /dev/null
@@ -1,133 +0,0 @@
-<?php
-/******************************************************************************
- * Copyright 2020 NAVER Corp.                                                 *
- *                                                                            *
- * Licensed under the Apache License, Version 2.0 (the "License");            *
- * you may not use this file except in compliance with the License.           *
- * You may obtain a copy of the License at                                    *
- *                                                                            *
- *     http://www.apache.org/licenses/LICENSE-2.0                             *
- *                                                                            *
- * Unless required by applicable law or agreed to in writing, software        *
- * distributed under the License is distributed on an "AS IS" BASIS,          *
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
- * See the License for the specific language governing permissions and        *
- * limitations under the License.                                             *
- ******************************************************************************/
-namespace Plugins\AutoGen\workerman;
-
-use Plugins\Util\Trace;
-
-/**
- * Class HttpClientPlugin
- */
-class HttpClientPlugin extends Candy
-{
-    protected $url;
-    protected $option;
-    protected $origin_success_cb;
-    protected $origin_error_cb;
-    protected $nsid;
-
-    public function __construct($apId,$who,&...$args)
-    {
-        parent::__construct($apId,$who,$args);
-        $this->url = $args[0];
-        $this->option = &$args[1];
-
-        $this->origin_success_cb = $args[1]['success'];
-        $this->origin_error_cb = $args[1]['error'];
-        $this->nsid = Trace::generateSpanID();
-    }
-
-    private function handleHttpHeader($url,&$headers)
-    {
-        if(pinpoint_get_context("Pinpoint-Sampled",$this->pinpoint_id) == PP_NOT_SAMPLED){
-            $headers[] = 'Pinpoint-Sampled:s0';
-            return ;
-        }
-        $headers[] ='Pinpoint-Sampled:s1';
-        $headers[] ='Pinpoint-Flags:0';
-        $headers[] ='Pinpoint-Papptype:1500';
-        $headers[] ='Pinpoint-Pappname:'.APPLICATION_NAME;
-
-        $headers[] = 'Pinpoint-Host:'.$url;
-
-        $headers[] ='Pinpoint-Traceid:'.pinpoint_get_context(PP_TRANSCATION_ID,$this->pinpoint_id) ;
-        $headers[] ='Pinpoint-Pspanid:'.pinpoint_get_context(PP_SPAN_ID,$this->pinpoint_id);
-
-        $headers[] ='Pinpoint-Spanid:'.$this->nsid;
-    }
-
-
-    // @hook: Workerman\Http\Client::request
-    function onBefore()
-    {
-        $this->startRequest();
-        // start request
-        $new_suc_cb =function ($reponse){
-            $this->endRequest($reponse);
-            if($this->origin_success_cb){
-                ($this->origin_success_cb)($reponse);
-            }
-
-        };
-        $this->option['success'] = $new_suc_cb;
-
-        $new_fail_cb =function ($exception){
-            $this->onError($exception);
-            if($this->origin_error_cb){
-                ($this->origin_error_cb)($exception);
-            }
-        };
-        $this->option['error'] = $new_fail_cb;
-        
-        $headers = $this->option['headers'];
-        $this->handleHttpHeader($this->url,$headers);
-        $this->option['headers'] = $headers;
-    }
-
-
-    protected function startRequest()
-    {
-        echo $this->pinpoint_id." startRequest \n";
-        pinpoint_add_clue(PP_DESTINATION,$this->getHostFromUrl($this->url),$this->pinpoint_id);
-        pinpoint_add_clues(PP_PHP_ARGS,$this->url,$this->pinpoint_id);
-        pinpoint_add_clue(PP_SERVER_TYPE,PP_PHP_REMOTE,$this->pinpoint_id);
-        pinpoint_add_clue(PP_NEXT_SPAN_ID,$this->nsid,$this->pinpoint_id);
-        pinpoint_add_clues(PP_HTTP_URL,$this->url,$this->pinpoint_id);
-    }
-
-
-    protected function onError($exception)
-    {
-        pinpoint_add_clue(PP_ADD_EXCEPTION,$exception,$this->pinpoint_id);
-        pinpoint_add_clues(PP_HTTP_STATUS_CODE,0,$this->pinpoint_id);
-        pinpoint_end_trace($this->pinpoint_id);
-        echo $this->pinpoint_id." onError \n";
-    }
-
-    protected function endRequest($reponse)
-    {
-        $status_code = $reponse->getStatusCode();
-        pinpoint_add_clues(PP_HTTP_STATUS_CODE,$status_code,$this->pinpoint_id);
-        pinpoint_end_trace($this->pinpoint_id);
-        echo $this->pinpoint_id." endRequest \n";
-    }
-
-    function onException($e)
-    {
-
-    }
-
-    function onEnd(&$ret)
-    {
-        // do nothing
-    }
-
-    function getHostFromUrl($url)
-    {
-        $urlAr  = parse_url($url);
-        return $urlAr['host'];
-    }
-}
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/AutoGen/workerman/MysqlPlugin.php b/plugins/PHP/Plugins/AutoGen/workerman/MysqlPlugin.php
deleted file mode 100644
index 760e8076a..000000000
--- a/plugins/PHP/Plugins/AutoGen/workerman/MysqlPlugin.php
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-/******************************************************************************
- * Copyright 2020 NAVER Corp.                                                 *
- *                                                                            *
- * Licensed under the Apache License, Version 2.0 (the "License");            *
- * you may not use this file except in compliance with the License.           *
- * You may obtain a copy of the License at                                    *
- *                                                                            *
- *     http://www.apache.org/licenses/LICENSE-2.0                             *
- *                                                                            *
- * Unless required by applicable law or agreed to in writing, software        *
- * distributed under the License is distributed on an "AS IS" BASIS,          *
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
- * See the License for the specific language governing permissions and        *
- * limitations under the License.                                             *
- ******************************************************************************/
-namespace Plugins\AutoGen\workerman;
-use Workerman\MySQL\Connection as MysqlConnection;
-/**
- * Class MysqlPlugin
- * @hook: Workerman\MySQL\Connection::execute
- */
-class MysqlPlugin extends Candy
-{
-
-    function onBefore()
-    {
-        $query = $this->args[0];
-//        $parameters = $this->args[1];
-        pinpoint_add_clue(PP_SERVER_TYPE,PP_MYSQL,$this->pinpoint_id);
-        assert($this->who instanceof MysqlConnection);
-        $setting = $this->getSetting($this->who);
-        $dst = $setting['host'].":".$setting['port'];
-        pinpoint_add_clue(PP_DESTINATION,$dst,$this->pinpoint_id);
-        pinpoint_add_clue(PP_SQL_FORMAT,$query,$this->pinpoint_id);
-
-    }
-
-    function onEnd(&$ret)
-    {
-
-
-        parent::onEnd($ret);
-    }
-
-    function onException($e)
-    {
-
-    }
-
-    function getSetting($conn)
-    {
-        $getSetting = function (){
-            return $this->settings;
-        };
-
-        return $getSetting->call($conn);
-    }
-
-}
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/AutoGen/yii2/.gitignore b/plugins/PHP/Plugins/AutoGen/yii2/.gitignore
deleted file mode 100644
index e69de29bb..000000000
diff --git a/plugins/PHP/Plugins/Common/Candy.php b/plugins/PHP/Plugins/Common/Candy.php
deleted file mode 100644
index 6e3192717..000000000
--- a/plugins/PHP/Plugins/Common/Candy.php
+++ /dev/null
@@ -1,59 +0,0 @@
-<?php
-/******************************************************************************
- * Copyright 2020 NAVER Corp.                                                 *
- *                                                                            *
- * Licensed under the Apache License, Version 2.0 (the "License");            *
- * you may not use this file except in compliance with the License.           *
- * You may obtain a copy of the License at                                    *
- *                                                                            *
- *     http://www.apache.org/licenses/LICENSE-2.0                             *
- *                                                                            *
- * Unless required by applicable law or agreed to in writing, software        *
- * distributed under the License is distributed on an "AS IS" BASIS,          *
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
- * See the License for the specific language governing permissions and        *
- * limitations under the License.                                             *
- ******************************************************************************/
-
-
-
-/**pinpoint_start_trace
- * User: eeliu
- * Date: 1/4/19
- * Time: 3:23 PM
- */
-
-namespace Plugins\Common;
-require_once "PluginsDefines.php";
-
-abstract class Candy
-{
-    protected $apId;
-    protected $who;
-    protected $args;
-    protected $ret=null;
-
-    public function __construct($apId,$who,&...$args)
-    {
-        /// todo start_this_aspect_trace
-        $this->apId = $apId;
-        $this->who =  $who;
-        $this->args = &$args;
-        pinpoint_start_trace();
-        pinpoint_add_clue(PP_INTERCEPTOR_NAME,$apId);
-    }
-
-    public function __destruct()
-    {
-        pinpoint_end_trace();
-    }
-
-    abstract function onBefore();
-
-    abstract function onEnd(&$ret);
-
-    public function onException($e)
-    {
-        pinpoint_add_clue(PP_ADD_EXCEPTION,$e->getMessage());
-    }
-}
diff --git a/plugins/PHP/Plugins/Common/CommonPlugin.php b/plugins/PHP/Plugins/Common/CommonPlugin.php
deleted file mode 100644
index b461811ff..000000000
--- a/plugins/PHP/Plugins/Common/CommonPlugin.php
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php
-/******************************************************************************
- * Copyright 2020 NAVER Corp.                                                 *
- *                                                                            *
- * Licensed under the Apache License, Version 2.0 (the "License");            *
- * you may not use this file except in compliance with the License.           *
- * You may obtain a copy of the License at                                    *
- *                                                                            *
- *     http://www.apache.org/licenses/LICENSE-2.0                             *
- *                                                                            *
- * Unless required by applicable law or agreed to in writing, software        *
- * distributed under the License is distributed on an "AS IS" BASIS,          *
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
- * See the License for the specific language governing permissions and        *
- * limitations under the License.                                             *
- ******************************************************************************/
-
-namespace Plugins\Common;
-
-class CommonPlugin extends Candy
-{
-    ///@hook:app\DBcontrol::connectDb
-    public function onBefore(){
-        pinpoint_add_clue(PP_SERVER_TYPE,PP_PHP_METHOD);
-        pinpoint_add_clues(PP_PHP_ARGS,"--placeholder---");
-    }
-
-    ///@hook:app\DBcontrol::getData1 app\DBcontrol::\array_push
-    public function onEnd(&$ret){
-        pinpoint_add_clues(PP_PHP_RETURN,"--placeholder---");
-    }
-
-    ///@hook:app\DBcontrol::getData2
-    public function onException($e){
-        pinpoint_add_clue(PP_ADD_EXCEPTION,$e->getMessage());
-    }
-}
diff --git a/plugins/PHP/Plugins/Common/InsWrapper.php b/plugins/PHP/Plugins/Common/InsWrapper.php
deleted file mode 100644
index 3650bec7d..000000000
--- a/plugins/PHP/Plugins/Common/InsWrapper.php
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php
-/******************************************************************************
- * Copyright 2020 NAVER Corp.                                                 *
- *                                                                            *
- * Licensed under the Apache License, Version 2.0 (the "License");            *
- * you may not use this file except in compliance with the License.           *
- * You may obtain a copy of the License at                                    *
- *                                                                            *
- *     http://www.apache.org/licenses/LICENSE-2.0                             *
- *                                                                            *
- * Unless required by applicable law or agreed to in writing, software        *
- * distributed under the License is distributed on an "AS IS" BASIS,          *
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
- * See the License for the specific language governing permissions and        *
- * limitations under the License.                                             *
- ******************************************************************************/
-namespace Plugins\Common;
-
-
-class InsWrapper
-{
-    protected $origin;
-    public function __construct($inc)
-    {
-        $this->origin = $inc;
-    }
-
-    public function __call($name, $arguments)
-    {
-        return call_user_func_array([&$this->origin,$name],$arguments);
-    }
-
-    public static function __callStatic($name, $arguments)
-    {
-        // TODO: Implement __callStatic() method.
-    }
-}
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Common/InstancePlugins.php b/plugins/PHP/Plugins/Common/InstancePlugins.php
deleted file mode 100644
index 992177541..000000000
--- a/plugins/PHP/Plugins/Common/InstancePlugins.php
+++ /dev/null
@@ -1,120 +0,0 @@
-<?php
-/******************************************************************************
- * Copyright 2020 NAVER Corp.                                                 *
- *                                                                            *
- * Licensed under the Apache License, Version 2.0 (the "License");            *
- * you may not use this file except in compliance with the License.           *
- * You may obtain a copy of the License at                                    *
- *                                                                            *
- *     http://www.apache.org/licenses/LICENSE-2.0                             *
- *                                                                            *
- * Unless required by applicable law or agreed to in writing, software        *
- * distributed under the License is distributed on an "AS IS" BASIS,          *
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
- * See the License for the specific language governing permissions and        *
- * limitations under the License.                                             *
- ******************************************************************************/
-
-
-
-namespace Plugins\Common;
-
-
-class InstancePlugins
-{
-    protected $_instance;
-    protected $_name_list=[];
-    protected $args;
-    protected $_name;
-    protected $_classFullname;
-
-    public function __construct(&$instance)
-    {
-        $this->_instance =&$instance;
-        $this->_classFullname = get_class($instance);
-    }
-
-    protected function onBefore()
-    {
-        pinpoint_start_trace();
-        pinpoint_add_clue(PP_INTERCEPTOR_NAME,$this->_name);
-    }
-    protected function onEnd(&$ret)
-    {
-        pinpoint_end_trace();
-    }
-
-    protected function onException($e)
-    {
-        pinpoint_add_clue(PP_ADD_EXCEPTION,$e->getMessage());
-    }
-
-    public function __call($name, $arguments)
-    {
-        if(!in_array($name ,$this->_name_list))
-        {
-            return call_user_func_array([$this->_instance,$name],$arguments);
-        }else{ // should hooked
-            try{
-                $this->_name = $name;
-                $this->args = $arguments;
-                $this->onBefore();
-                $ret = call_user_func_array([$this->_instance,$name],$arguments);
-                $this->onEnd($ret);
-                return $ret;
-            }catch (\Exception $e){
-                $this->onException($e);
-                $ret = null;
-                $this->onEnd($ret);
-                throw $e;
-            }
-        }
-    }
-
-    public function __get($name)
-    {
-        return $this->_instance->$name;
-    }
-
-    public function __set($name, $value)
-    {
-        $this->_instance->$name = $value;
-    }
-
-    public function __isset($name)
-    {
-        return $this->_instance->__isset($name);
-    }
-
-    public  function __unset($name)
-    {
-        $this->_instance->__unset($name);
-    }
-
-    public function __sleep()
-    {
-       return $this->_instance->__sleep();
-    }
-
-    public function __wakeup()
-    {
-        $this->_instance->__wakeup();
-    }
-
-    public function __toString():string
-    {
-        return $this->_instance->__toString();
-    }
-
-    public function __invoke()
-    {
-        return $this->_instance->__invoke();
-    }
-
-    public function __clone()
-    {
-        $this->_instance = clone $this->_instance;
-    }
-
-
-}
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Common/PluginsDefines.php b/plugins/PHP/Plugins/Common/PluginsDefines.php
deleted file mode 100644
index fa7752b0e..000000000
--- a/plugins/PHP/Plugins/Common/PluginsDefines.php
+++ /dev/null
@@ -1,87 +0,0 @@
-<?php
-/******************************************************************************
- * Copyright 2020 NAVER Corp.                                                 *
- *                                                                            *
- * Licensed under the Apache License, Version 2.0 (the "License");            *
- * you may not use this file except in compliance with the License.           *
- * You may obtain a copy of the License at                                    *
- *                                                                            *
- *     http://www.apache.org/licenses/LICENSE-2.0                             *
- *                                                                            *
- * Unless required by applicable law or agreed to in writing, software        *
- * distributed under the License is distributed on an "AS IS" BASIS,          *
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
- * See the License for the specific language governing permissions and        *
- * limitations under the License.                                             *
- ******************************************************************************/
-
-define('PP_PHP_ARGS',-1);
-define('PP_PHP_RETURN',14);
-define('PP_PROXY_HTTP_HEADER',300);
-define('PP_SQL_ID' ,20);
-define("PP_SQL",  21);
-define("PP_SQL_METADATA",  22);
-define("PP_SQL_PARAM",  23);
-define("PP_SQL_BINDVALUE",  24);
-define("PP_STRING_ID", 30);
-define("PP_SQL_FORMAT","SQL");
-define("PP_HTTP_URL", 40);
-define("PP_HTTP_PARAM",  41);
-define("PP_HTTP_PARAM_ENTITY",  42);
-define("PP_HTTP_COOKIE",  45);
-define("PP_HTTP_STATUS_CODE",  46);
-define("PP_MEMORY_USAGE",330);
-define("PP_HTTP_INTERNAL_DISPLAY",  48);
-define("PP_HTTP_IO",  49);
-define("PP_MESSAGE_QUEUE_URI ",100);
-define("PP_KAFKA_TOPIC",140);
-define("PP_PHP_METHOD","1501");
-define("PP_PHP","1500");
-define("PP_MYSQL","2101");
-define("PP_MSSQL_SERVER", "2200");
-define("PP_ORACLE", "2300");
-define("PP_CUBRID", "2400");
-define("PP_POSTGRESQL", "2500");
-define("PP_CASSANDRA", "2600");
-define("PP_MONGODB", "2651");
-define("PP_KAFKA","8660");
-define("PP_REDIS","8200");
-define("PP_REDIS_REDISSON","8203");
-define("PP_REDIS_REDISSON_INTERNAL","8204");
-define("PP_RABBITMQ", "8300");
-define("PP_ACTIVEMQ", "8310");
-define("PP_ARCUS", "8100");
-define("PP_MEMCACHED","8050");
-define("PP_PHP_REMOTE",9700);
-
-define("PP_HEADER_NGINX_PROXY","Pinpoint-ProxyNginx");
-define("PP_HEADER_APACHE_PROXY","HTTP_PINPOINT_PROXYAPACHE");
-define("PP_HEADER_SAMPLED","HTTP_PINPOINT_SAMPLED");
-define("PP_HEADER_PINPOINT_HOST","HTTP_PINPOINT_HOST");
-define("PP_HEADER_PAPPTYPE","HTTP_PINPOINT_PAPPTYPE");
-define("PP_HEADER_PAPPNAME","HTTP_PINPOINT_PAPPNAME");
-define("PP_HEADER_TRACEID","HTTP_PINPOINT_TRACEID");
-define("PP_HEADER_SPANID","HTTP_PINPOINT_SPANID");
-define("PP_HEADER_PSPANID","HTTP_PINPOINT_PSPANID");
-
-define("PP_SERVER_TYPE","stp");
-define("PP_NEXT_SPAN_ID",'nsid');
-define("PP_DESTINATION","dst");
-define("PP_INTERCEPTOR_NAME","name");
-define("PP_ADD_EXCEPTION","EXP");
-define("PP_ROOT_LOC",1);
-define("PP_REQ_URI","uri");
-define("PP_REQ_CLIENT","client");
-define("PP_REQ_SERVER","server");
-define("PP_APP_NAME","appname");
-define("PP_APP_ID","appid");
-define("PP_PARENT_SPAN_ID","psid");
-define("PP_PARENT_NAME","pname");
-define("PP_PARENT_TYPE","ptype");
-define("PP_PARENT_HOST","Ah");
-define("PP_NGINX_PROXY","NP");
-define("PP_APACHE_PROXY","AP");
-define("PP_TRANSCATION_ID","tid");
-define("PP_SPAN_ID","sid");
-define("PP_NOT_SAMPLED","s0");
-define("PP_SAMPLED","s1");
diff --git a/plugins/PHP/Plugins/Framework/CakePHP/Readme.md b/plugins/PHP/Plugins/Framework/CakePHP/Readme.md
deleted file mode 100644
index 5687fc48f..000000000
--- a/plugins/PHP/Plugins/Framework/CakePHP/Readme.md
+++ /dev/null
@@ -1,16 +0,0 @@
-## Steps
-
-* copy pinpoint header into index.php
-
-```php
-define('AOP_CACHE_DIR', __DIR__ . '/../Cache/');
-define('PLUGINS_DIR', __DIR__ . '/../Plugins/');
-define('APPLICATION_NAME','app-cakephp');
-define('APPLICATION_ID','app-cakephp');
-define('PINPOINT_USE_CACHE','YES');
-define('PP_REQ_PLUGINS', '\Plugins\PerRequestPlugins');
-require_once __DIR__ . '/../vendor/pinpoint-apm/pinpoint-php-aop/auto_pinpointed.php';
-
-```
-
-* copy setting.ini into `Plugins`
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Framework/CakePHP/setting.ini b/plugins/PHP/Plugins/Framework/CakePHP/setting.ini
deleted file mode 100644
index 9b4064873..000000000
--- a/plugins/PHP/Plugins/Framework/CakePHP/setting.ini
+++ /dev/null
@@ -1,21 +0,0 @@
-[nm_class]
-;rename below class
-PDO=Plugins\Sys\PDO\PDO
-
-;Swoole\Http\Server=Plugins\Framework\Swoole\Http\Server
-
-[nm_func]
-;rename below system function
-;curl_init=Plugins\Sys\curl\curl_init
-;curl_setopt=Plugins\Sys\curl\curl_setopt
-;curl_exec=Plugins\Sys\curl\curl_exec
-;curl_close=Plugins\Sys\curl\curl_close
-;curl_setopt_array=Plugins\Sys\curl\curl_setopt_array
-[nm_string]
-; I am not lazy, does user real need this?
-[nm_add_class]
-;expand above setting into below class
-class_name[]=Cake\Database\Driver
-;class_name[]=App\Service\Action\User\RegisterAction
-[nm_ignore_class]
-;ho ho, do not change in below class
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Framework/EasySwoole/composer.json b/plugins/PHP/Plugins/Framework/EasySwoole/composer.json
deleted file mode 100644
index 91c8e943d..000000000
--- a/plugins/PHP/Plugins/Framework/EasySwoole/composer.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
-    "authors": [
-        {
-            "name": "jmz",
-            "email": "1125378902@qq.com"
-        }
-    ],
-	"autoload": {
-        "psr-4": {
-            "App\\": "App/",
-           "Plugins\\":"Plugins/"
-        }
-    },
-    "require": {
-        "easyswoole/easyswoole": "3.2.5",
-		"easyswoole/template": "^1.0",
-		"easyswoole/mysqli": "^1.1",
-		"easyswoole/verifycode": "^3.0",
-		"easyswoole/mysqli-pool": "^1.0",
-		"duncan3dc/blade": "^4.5",
-        "easyswoole/cache": "^1.1",
-        "pinpoint-apm/pinpoint-php-aop": "v2.0.0"
-    }
-}
diff --git a/plugins/PHP/Plugins/Framework/EasySwoole/easyswoole_example.txt b/plugins/PHP/Plugins/Framework/EasySwoole/easyswoole_example.txt
deleted file mode 100644
index c633d2f06..000000000
--- a/plugins/PHP/Plugins/Framework/EasySwoole/easyswoole_example.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/env php
-<?php
-
-/// The code template was  copied from  https://github.com/easy-swoole/easyswoole/blob/3.x/bin/easyswoole
-
-use EasySwoole\EasySwoole\Command\CommandRunner;
-
-defined('IN_PHAR') or define('IN_PHAR', boolval(\Phar::running(false)));
-defined('RUNNING_ROOT') or define('RUNNING_ROOT', realpath(getcwd()));
-defined('EASYSWOOLE_ROOT') or define('EASYSWOOLE_ROOT', IN_PHAR ? \Phar::running() : realpath(getcwd()));
-
-$file = EASYSWOOLE_ROOT.'/vendor/autoload.php';
-if (file_exists($file)) {
-    require $file;
-}else{
-    die("include composer autoload.php fail\n");
-}
-
-#################################################
-// pinpoint entry
-define('AOP_CACHE_DIR',__DIR__.'/Cache/');
-define('PLUGINS_DIR', __DIR__ . '/Plugins/');
-//define('USER_DEFINED_CLASS_MAP_IMPLEMENT',"Plugins\Framework\app\ClassMapInFile");
-define('PER_REQ_CLASS_NAME','Plugins\Framework\Swoole\Http\Server\PerReqPlugin');
-define('APPLICATION_NAME','APP-3');
-define('APPLICATION_ID','app-3');
-define("PINPOINT_USE_CACHE",'NO');
-require_once __DIR__. '/vendor/pinpoint-apm/pinpoint-php-aop/auto_pinpointed.php';
-#################################################
-
-if(file_exists(EASYSWOOLE_ROOT.'/bootstrap.php')){
-    require_once EASYSWOOLE_ROOT.'/bootstrap.php';
-}
-
-$args = $argv;
-//trim first command
-array_shift($args);
-$ret = CommandRunner::getInstance()->run($args);
-if(!empty($ret)){
-    echo $ret."\n";
-}
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Framework/EasySwoole/readme.md b/plugins/PHP/Plugins/Framework/EasySwoole/readme.md
deleted file mode 100644
index bff12352d..000000000
--- a/plugins/PHP/Plugins/Framework/EasySwoole/readme.md
+++ /dev/null
@@ -1,21 +0,0 @@
-## Steps
-
-### 1. copy setting.ini
-
-### 2. enable pinpoint entry into easyswoole
-
-```php
-#################################################
-define('AOP_CACHE_DIR',__DIR__.'/Cache/');
-define('PLUGINS_DIR', __DIR__ . '/Plugins/');
-//define('USER_DEFINED_CLASS_MAP_IMPLEMENT',"Plugins\Framework\app\ClassMapInFile");
-define('PER_REQ_CLASS_NAME','Plugins\Framework\Swoole\Http\Server\PerReqPlugin');
-define('APPLICATION_NAME','APP-3');
-define('APPLICATION_ID','app-3');
-define("PINPOINT_USE_CACHE",'NO');
-require_once __DIR__. '/vendor/pinpoint-apm/pinpoint-php-aop/auto_pinpointed.php';
-#################################################
-```
-
-[ read the  example please ](easyswoole_example.txt)
-
diff --git a/plugins/PHP/Plugins/Framework/EasySwoole/setting.ini b/plugins/PHP/Plugins/Framework/EasySwoole/setting.ini
deleted file mode 100644
index b4b1361e8..000000000
--- a/plugins/PHP/Plugins/Framework/EasySwoole/setting.ini
+++ /dev/null
@@ -1,18 +0,0 @@
-[nm_class]
-;rename below class
-;PDO=Plugins\Sys\PDO\PDO
-
-swoole_http_server=Plugins\Framework\Swoole\Http\Server
-
-[nm_func]
-;rename below system function
-curl_setopt_array=Plugins\Framework\Swoole\curl\curl_setopt_array
-curl_exec=Plugins\Framework\Swoole\curl\curl_exec
-[nm_string]
-; I am not lazy, does user real need this?
-[nm_add_class]
-;expand above setting into below class
-class_name[]=EasySwoole\EasySwoole\ServerManager
-class_name[]=EasySwoole\Curl\Request
-[nm_ignore_class]
-;ho ho, do not change in below class
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Framework/Laravel/Readme.md b/plugins/PHP/Plugins/Framework/Laravel/Readme.md
deleted file mode 100644
index e79fdfd99..000000000
--- a/plugins/PHP/Plugins/Framework/Laravel/Readme.md
+++ /dev/null
@@ -1,18 +0,0 @@
-## Steps
-
-* copy pinpoint header into index.php
-
-```php
-###################################################################
-define('AOP_CACHE_DIR', __DIR__ . '/Cache/');
-define('PLUGINS_DIR', __DIR__ . '/Plugins/');
-define('APPLICATION_NAME','app-laravel');
-define('APPLICATION_ID','app-laravel');
-define('PINPOINT_USE_CACHE','YES');
-define('PP_REQ_PLUGINS', '\Plugins\PerRequestPlugins');
-require_once __DIR__ . '/vendor/pinpoint-apm/pinpoint-php-aop/auto_pinpointed.php';
-###################################################################
-
-```
-
-* copy setting.ini into `Plugins`
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Framework/Swoole/Candy.php b/plugins/PHP/Plugins/Framework/Swoole/Candy.php
deleted file mode 100644
index adbd6c3c6..000000000
--- a/plugins/PHP/Plugins/Framework/Swoole/Candy.php
+++ /dev/null
@@ -1,58 +0,0 @@
-<?php
-/******************************************************************************
- * Copyright 2020 NAVER Corp.                                                 *
- *                                                                            *
- * Licensed under the Apache License, Version 2.0 (the "License");            *
- * you may not use this file except in compliance with the License.           *
- * You may obtain a copy of the License at                                    *
- *                                                                            *
- *     http://www.apache.org/licenses/LICENSE-2.0                             *
- *                                                                            *
- * Unless required by applicable law or agreed to in writing, software        *
- * distributed under the License is distributed on an "AS IS" BASIS,          *
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
- * See the License for the specific language governing permissions and        *
- * limitations under the License.                                             *
- ******************************************************************************/
-
-
-
-/**
- * User: eeliu
- * Date: 1/4/19
- * Time: 3:23 PM
- */
-
-namespace Plugins\Framework\Swoole;
-
-abstract class Candy
-{
-    protected $apId;
-    protected $who;
-    protected $args;
-    protected $ret=null;
-    protected $id;
-
-    public function __construct($apId,$who,&...$args)
-    {
-        /// todo start_this_aspect_trace
-        $this->apId = $apId;
-        $this->who =  $who;
-        $this->args = &$args;
-        $this->id = pinpoint_start_trace(IDContext::get());
-        IDContext::set($this->id);
-        pinpoint_add_clue(PP_INTERCEPTOR_NAME,$apId,$this->id);
-    }
-
-    public function __destruct()
-    {
-        $id = pinpoint_end_trace($this->id);
-        IDContext::set($id);
-    }
-
-    abstract function onBefore();
-
-    abstract function onEnd(&$ret);
-
-    abstract function onException($e);
-}
diff --git a/plugins/PHP/Plugins/Framework/Swoole/Http/PerReqPlugin.php b/plugins/PHP/Plugins/Framework/Swoole/Http/PerReqPlugin.php
deleted file mode 100644
index 597d4fd3e..000000000
--- a/plugins/PHP/Plugins/Framework/Swoole/Http/PerReqPlugin.php
+++ /dev/null
@@ -1,160 +0,0 @@
-<?php
-/******************************************************************************
- * Copyright 2020 NAVER Corp.                                                 *
- *                                                                            *
- * Licensed under the Apache License, Version 2.0 (the "License");            *
- * you may not use this file except in compliance with the License.           *
- * You may obtain a copy of the License at                                    *
- *                                                                            *
- *     http://www.apache.org/licenses/LICENSE-2.0                             *
- *                                                                            *
- * Unless required by applicable law or agreed to in writing, software        *
- * distributed under the License is distributed on an "AS IS" BASIS,          *
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
- * See the License for the specific language governing permissions and        *
- * limitations under the License.                                             *
- ******************************************************************************/
-namespace Plugins\Framework\Swoole\Http;
-
-use Plugins\Framework\Swoole\IDContext;
-use Plugins\Util\Trace;
-require_once __DIR__."/../../../__init__.php";
-
-class PerReqPlugin
-{
-    private  $_callback;
-    public $tid = null;
-    public $sid = null;
-    public $psid = null;
-    public $pname = null;
-    public $ptype = null;
-
-    public $ah = null;
-    public $app_name = null;
-    public $app_id = null;
-    private $curNextSpanId = '';
-    public $request;
-    public $reponse;
-
-    public function __construct(callable $callback)
-    {
-        $this->_callback = $callback;
-
-    }
-    
-    protected function onBefore()
-    {
-        $id = pinpoint_start_trace(0);
-        IDContext::set($id);
-        $request =$this->request;
-        $header = &$request->header;
-        pinpoint_add_clue(PP_REQ_URI,$request->server['request_uri'],$id);
-        pinpoint_add_clue(PP_REQ_CLIENT,$request->server['remote_addr'],$id);
-        pinpoint_add_clue(PP_REQ_SERVER,$header['host'],$id);
-        pinpoint_add_clue(PP_SERVER_TYPE, PP_PHP,$id);
-        pinpoint_add_clue(PP_INTERCEPTOR_NAME, "swoole-http-server",$id);
-        pinpoint_add_clue(PP_APP_NAME, APPLICATION_NAME,$id);
-        pinpoint_set_context(PP_APP_NAME,APPLICATION_NAME,$id);
-        pinpoint_add_clue(PP_APP_ID, APPLICATION_ID,$id);
-        pinpoint_set_context(PP_APP_ID, APPLICATION_ID,$id);
-
-        if (isset($header[PP_HEADER_PSPANID]) || array_key_exists(PP_HEADER_PSPANID, $header)) {
-            $this->psid = $header[PP_HEADER_PSPANID];
-            pinpoint_add_clue(PP_PARENT_SPAN_ID, $this->psid,$id);
-            pinpoint_set_context(PP_PARENT_SPAN_ID, $this->psid,$id);
-        }
-
-        if (isset($header[PP_HEADER_SPANID]) || array_key_exists(PP_HEADER_SPANID, $header)) {
-            $this->sid = $header[PP_HEADER_SPANID];
-        } else {
-            $this->sid = Trace::generateSpanID();
-        }
-
-        if (isset($header[PP_HEADER_TRACEID]) || array_key_exists(PP_HEADER_TRACEID, $header)) {
-            $this->tid = $header[PP_HEADER_TRACEID];
-        } else {
-            $this->tid = $this->generateTransactionID();
-        }
-
-        if (isset($header[PP_HEADER_PAPPNAME]) || array_key_exists(PP_HEADER_PAPPNAME, $header)) {
-            $this->pname = $header[PP_HEADER_PAPPNAME];
-
-            pinpoint_add_clue(PP_PARENT_NAME, $this->pname,$id);
-        }
-
-        if (isset($header[PP_HEADER_PAPPTYPE]) || array_key_exists(PP_HEADER_PAPPTYPE, $header)) {
-            $this->ptype = $header[PP_HEADER_PAPPTYPE];
-            pinpoint_add_clue(PP_PARENT_TYPE, $this->ptype,$id);
-        }
-
-        if (isset($header[PP_HEADER_PINPOINT_HOST]) || array_key_exists(PP_HEADER_PINPOINT_HOST, $header)) {
-            $this->ah = $header[PP_HEADER_PINPOINT_HOST];
-            pinpoint_add_clue(PP_PARENT_HOST, $this->ah,$id);
-        }
-        if (isset($header[PP_HEADER_NGINX_PROXY]) || array_key_exists(PP_HEADER_NGINX_PROXY, $header)) {
-            pinpoint_add_clue(PP_NGINX_PROXY, $header[PP_HEADER_NGINX_PROXY],$id);
-        }
-
-        if (isset($header[PP_HEADER_APACHE_PROXY]) || array_key_exists(PP_HEADER_APACHE_PROXY, $header)) {
-            pinpoint_add_clue(PP_APACHE_PROXY, $header[PP_HEADER_APACHE_PROXY],$id);
-        }
-        pinpoint_set_context("Pinpoint-Sampled",PP_SAMPLED,$id);
-        if (isset($header[PP_HEADER_SAMPLED]) || array_key_exists(PP_HEADER_SAMPLED, $header)) {
-            if ($header[PP_HEADER_SAMPLED] == PP_NOT_SAMPLED) {
-                //drop this request. collector could not receive any thing
-                pinpoint_drop_trace($id);
-                pinpoint_set_context("Pinpoint-Sampled",PP_NOT_SAMPLED,$id);
-            }
-
-        } else {
-            if(pinpoint_tracelimit())
-            {
-                pinpoint_set_context("Pinpoint-Sampled",PP_NOT_SAMPLED,$id);
-                pinpoint_drop_trace($id);
-            }
-        }
-
-        pinpoint_add_clue(PP_TRANSCATION_ID, $this->tid,$id);
-        pinpoint_set_context(PP_TRANSCATION_ID, $this->tid,$id);
-        pinpoint_add_clue(PP_SPAN_ID, $this->sid,$id);
-        pinpoint_set_context(PP_SPAN_ID, (string)$this->sid,$id);
-
-        pinpoint_set_context((string)PP_HTTP_STATUS_CODE,'200',$id);
-
-    }
-
-
-    protected function onException($e)
-    {
-
-    }
-
-    protected function onEnd(&$ret)
-    {
-        $id = IDContext::get();
-        $code = pinpoint_get_context((string)PP_HTTP_STATUS_CODE,$id);
-        pinpoint_add_clues(PP_HTTP_STATUS_CODE,$code,$id,PP_ROOT_LOC);
-        pinpoint_end_trace($id);
-    }
-
-    public function __invoke(&...$args)
-    {
-        $this->request = &$args[0];
-        $this->reponse = &$args[1];
-        $this->onBefore();
-        try{
-            $ret = call_user_func_array($this->_callback,[&$this->request,&$this->reponse]);
-            $this->onEnd($ret);
-            return $ret;
-        }catch (\Exception $e){
-            $this->onException($e);
-            throw $e;
-        }
-    }
-
-    public function generateTransactionID()
-    {
-        return  $this->app_id . '^' . strval(pinpoint_start_time()) . '^' . strval(pinpoint_unique_id());
-    }
-
-}
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Framework/Swoole/Http/Response.php b/plugins/PHP/Plugins/Framework/Swoole/Http/Response.php
deleted file mode 100644
index 81e5cb368..000000000
--- a/plugins/PHP/Plugins/Framework/Swoole/Http/Response.php
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-/******************************************************************************
- * Copyright 2020 NAVER Corp.                                                 *
- *                                                                            *
- * Licensed under the Apache License, Version 2.0 (the "License");            *
- * you may not use this file except in compliance with the License.           *
- * You may obtain a copy of the License at                                    *
- *                                                                            *
- *     http://www.apache.org/licenses/LICENSE-2.0                             *
- *                                                                            *
- * Unless required by applicable law or agreed to in writing, software        *
- * distributed under the License is distributed on an "AS IS" BASIS,          *
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
- * See the License for the specific language governing permissions and        *
- * limitations under the License.                                             *
- ******************************************************************************/
-namespace Plugins\Framework\Swoole\Http;
-
-
-use Plugins\Common\InsWrapper;
-
-class Response  extends \swoole_http_response
-{
-    protected $origin;
-    public function __construct(&$origin)
-    {
-        $this->origin = $origin;
-    }
-
-    public function status($http_code,$reason=NULL)
-    {
-        echo "------$http_code----------------";
-
-        return $this->origin->status($http_code,$reason);
-    }
-
-//    public function __call($name, $arguments)
-//    {
-//        return call_user_func_array([$this->origin,$name],$arguments);
-//    }
-//
-//    public static function __callStatic($name, $arguments)
-//    {
-//       throw new \Exception(";;;;;");
-//    }
-}
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Framework/Swoole/Http/Server.php b/plugins/PHP/Plugins/Framework/Swoole/Http/Server.php
deleted file mode 100644
index 8a6e4a30c..000000000
--- a/plugins/PHP/Plugins/Framework/Swoole/Http/Server.php
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-/******************************************************************************
- * Copyright 2020 NAVER Corp.                                                 *
- *                                                                            *
- * Licensed under the Apache License, Version 2.0 (the "License");            *
- * you may not use this file except in compliance with the License.           *
- * You may obtain a copy of the License at                                    *
- *                                                                            *
- *     http://www.apache.org/licenses/LICENSE-2.0                             *
- *                                                                            *
- * Unless required by applicable law or agreed to in writing, software        *
- * distributed under the License is distributed on an "AS IS" BASIS,          *
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
- * See the License for the specific language governing permissions and        *
- * limitations under the License.                                             *
- ******************************************************************************/
-namespace Plugins\Framework\Swoole\Http;
-use Swoole\Http\Server as SServer;
-require_once __DIR__."/../__init__.php";
-
-class Server extends SServer
-{
-    public function on($event,callable $callback)
-    {
-        switch ($event)
-        {
-            case 'request':
-                $callback = new PerReqPlugin($callback);
-                break;
-//            case 'receive':
-//                $callback = new PerReqPlugin($callback);
-//                break;
-        }
-        parent::on($event,$callback);
-
-    }
-
-}
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Framework/Swoole/IDContext.php b/plugins/PHP/Plugins/Framework/Swoole/IDContext.php
deleted file mode 100644
index 438e16af2..000000000
--- a/plugins/PHP/Plugins/Framework/Swoole/IDContext.php
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-/******************************************************************************
- * Copyright 2020 NAVER Corp.                                                 *
- *                                                                            *
- * Licensed under the Apache License, Version 2.0 (the "License");            *
- * you may not use this file except in compliance with the License.           *
- * You may obtain a copy of the License at                                    *
- *                                                                            *
- *     http://www.apache.org/licenses/LICENSE-2.0                             *
- *                                                                            *
- * Unless required by applicable law or agreed to in writing, software        *
- * distributed under the License is distributed on an "AS IS" BASIS,          *
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
- * See the License for the specific language governing permissions and        *
- * limitations under the License.                                             *
- ******************************************************************************/
-namespace Plugins\Framework\Swoole;
-
-$context = new \Co\Context;
-
-class IDContext
-{
-
-    public static function get()
-    {
-        return \Co::getContext()["id"];
-    }
-    public static function set($id)
-    {
-        \Co::getContext()["id"] = $id;
-    }
-}
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Framework/Swoole/__init__.php b/plugins/PHP/Plugins/Framework/Swoole/__init__.php
deleted file mode 100644
index 60dbfa4c4..000000000
--- a/plugins/PHP/Plugins/Framework/Swoole/__init__.php
+++ /dev/null
@@ -1,17 +0,0 @@
-<?php
-/******************************************************************************
- * Copyright 2020 NAVER Corp.                                                 *
- *                                                                            *
- * Licensed under the Apache License, Version 2.0 (the "License");            *
- * you may not use this file except in compliance with the License.           *
- * You may obtain a copy of the License at                                    *
- *                                                                            *
- *     http://www.apache.org/licenses/LICENSE-2.0                             *
- *                                                                            *
- * Unless required by applicable law or agreed to in writing, software        *
- * distributed under the License is distributed on an "AS IS" BASIS,          *
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
- * See the License for the specific language governing permissions and        *
- * limitations under the License.                                             *
- ******************************************************************************/
-require_once "curl/curl.php";// intercept all curl_xxxx
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Framework/Swoole/curl/CurlExecPlugin.php b/plugins/PHP/Plugins/Framework/Swoole/curl/CurlExecPlugin.php
deleted file mode 100644
index 0d6300a71..000000000
--- a/plugins/PHP/Plugins/Framework/Swoole/curl/CurlExecPlugin.php
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-/******************************************************************************
- * Copyright 2020 NAVER Corp.                                                 *
- *                                                                            *
- * Licensed under the Apache License, Version 2.0 (the "License");            *
- * you may not use this file except in compliance with the License.           *
- * You may obtain a copy of the License at                                    *
- *                                                                            *
- *     http://www.apache.org/licenses/LICENSE-2.0                             *
- *                                                                            *
- * Unless required by applicable law or agreed to in writing, software        *
- * distributed under the License is distributed on an "AS IS" BASIS,          *
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
- * See the License for the specific language governing permissions and        *
- * limitations under the License.                                             *
- ******************************************************************************/
-
-namespace Plugins\Framework\Swoole\curl;
-
-use Plugins\Framework\Swoole\Candy;
-use Plugins\Sys\curl\CurlUtil;
-
-class CurlExecPlugin extends Candy
-{
-    public $nsid = null;
-
-    function onBefore()
-    {
-    }
-
-    function onEnd(&$url)
-    {
-//        $argv = &$this->args[0];
-//        $ch = $argv[0];
-//        pinpoint_add_clue(PP_DESTINATION,CurlUtil::getHostFromURL(curl_getinfo($ch,CURLINFO_EFFECTIVE_URL)),$this->id);
-//        pinpoint_add_clue(PP_SERVER_TYPE,PP_PHP_REMOTE,$this->id);
-//        pinpoint_add_clue(PP_NEXT_SPAN_ID,pinpoint_get_context(PP_NEXT_SPAN_ID,$this->id),$this->id);
-//        pinpoint_add_clues(PP_HTTP_URL,curl_getinfo($ch,CURLINFO_EFFECTIVE_URL),$this->id);
-
-        pinpoint_add_clue(PP_DESTINATION,CurlUtil::getHostFromURL($url),$this->id);
-        pinpoint_add_clue(PP_SERVER_TYPE,PP_PHP_REMOTE,$this->id);
-        pinpoint_add_clue(PP_NEXT_SPAN_ID,pinpoint_get_context(PP_NEXT_SPAN_ID,$this->id),$this->id);
-        pinpoint_add_clues(PP_HTTP_URL,$url,$this->id);
-        $code = curl_getinfo($this->args[0],CURLINFO_HTTP_CODE);
-        if($code == 404){
-            pinpoint_add_clue(PP_ADD_EXCEPTION," 404 file not found",$this->id);
-        }
-        pinpoint_add_clues(PP_HTTP_STATUS_CODE,$code,$this->id);
-
-    }
-
-    function onException($e)
-    {
-
-    }
-}
diff --git a/plugins/PHP/Plugins/Framework/Swoole/curl/CurlUtil.php b/plugins/PHP/Plugins/Framework/Swoole/curl/CurlUtil.php
deleted file mode 100644
index 26850dc2d..000000000
--- a/plugins/PHP/Plugins/Framework/Swoole/curl/CurlUtil.php
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-/******************************************************************************
- * Copyright 2020 NAVER Corp.                                                 *
- *                                                                            *
- * Licensed under the Apache License, Version 2.0 (the "License");            *
- * you may not use this file except in compliance with the License.           *
- * You may obtain a copy of the License at                                    *
- *                                                                            *
- *     http://www.apache.org/licenses/LICENSE-2.0                             *
- *                                                                            *
- * Unless required by applicable law or agreed to in writing, software        *
- * distributed under the License is distributed on an "AS IS" BASIS,          *
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
- * See the License for the specific language governing permissions and        *
- * limitations under the License.                                             *
- ******************************************************************************/
-namespace Plugins\Framework\Swoole\curl;
-
-use Plugins\Framework\Swoole\IDContext;
-use Plugins\Util\Trace;
-use Plugins\Sys\curl\CurlUtil as URLUtils;
-class CurlUtil
-{
-    public static function getPinpointHeader($url)
-    {
-        if(pinpoint_get_context('Pinpoint-Sampled',IDContext::get())==PP_NOT_SAMPLED){
-            return ["Pinpoint-Sampled:s0"];
-        }
-
-        $nsid = Trace::generateSpanID();
-        $header = [
-            'Pinpoint-Sampled:s1',
-            'Pinpoint-Flags:0',
-            'Pinpoint-Papptype:1500',
-            'Pinpoint-Pappname:'.APPLICATION_NAME,
-            'Pinpoint-Host:'.static::getHostFromURL($url),
-            'Pinpoint-Traceid:'.pinpoint_get_context(PP_TRANSCATION_ID,IDContext::get()),
-            'Pinpoint-Pspanid:'.pinpoint_get_context(PP_SPAN_ID,IDContext::get()),
-            'Pinpoint-Spanid:'.$nsid
-        ];
-        pinpoint_set_context(PP_NEXT_SPAN_ID, (string)$nsid,IDContext::get());
-        return $header;
-    }
-
-
-}
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Framework/Swoole/curl/curl.php b/plugins/PHP/Plugins/Framework/Swoole/curl/curl.php
deleted file mode 100644
index d7b88f92d..000000000
--- a/plugins/PHP/Plugins/Framework/Swoole/curl/curl.php
+++ /dev/null
@@ -1,174 +0,0 @@
-<?php
-/******************************************************************************
- * Copyright 2020 NAVER Corp.                                                 *
- *                                                                            *
- * Licensed under the Apache License, Version 2.0 (the "License");            *
- * you may not use this file except in compliance with the License.           *
- * You may obtain a copy of the License at                                    *
- *                                                                            *
- *     http://www.apache.org/licenses/LICENSE-2.0                             *
- *                                                                            *
- * Unless required by applicable law or agreed to in writing, software        *
- * distributed under the License is distributed on an "AS IS" BASIS,          *
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
- * See the License for the specific language governing permissions and        *
- * limitations under the License.                                             *
- ******************************************************************************/
-namespace Plugins\Framework\Swoole\curl;
-
-/*
-static $chArr= [];
-
-function curl_init($url = null)
-{
-    $ch = \curl_init($url);
-    global $curlChAr;
-    if($url){
-        $curlChAr[strval($ch)] = ['url'=>$url];
-    }else{
-        $curlChAr[strval($ch)] = [];
-    }
-    return $ch;
-}
-
-
-function curl_setopt($ch, $option, $value)
-{
-    if($option == CURLOPT_HTTPHEADER)
-    {
-        CurlUtil::curlPinpointHeader($ch,$value);
-    }elseif ($option == CURLOPT_URL ){
-        global $curlChAr;
-        $curlChAr[strval($ch)] = ['url'=>$value];
-    }
-
-    return \curl_setopt($ch, $option, $value);
-}
-
-function curl_setopt_array($ch, array $options)
-{
-
-    $url = $options[CURLOPT_URL];
-    CurlUtil::appendPinpointHeader($url,$options[CURLOPT_HTTPHEADER]);
-    $ret =  \curl_setopt_array($ch,$options);
-    return $ret;
-
-}
-function curl_exec($ch)
-{
-    $args = \pinpoint_get_func_ref_args();
-    $commPlugins_curl_exec_var = new CurlExecPlugin('curl_exec', null, $args);
-    try {
-        $commPlugins_curl_exec_var->onBefore();
-        $commPlugins_curl_exec_ret = call_user_func_array('curl_exec', $args);
-        $commPlugins_curl_exec_var->onEnd($commPlugins_curl_exec_ret);
-        return $commPlugins_curl_exec_ret;
-    } catch (\Exception $e) {
-        $commPlugins_curl_exec_var->onException($e);
-        throw $e;
-    }
-}
-
-function curl_close($ch)
-{
-    global $curlChAr;
-    unset($curlChAr[strval($ch)] );
-    \curl_close($ch);
-}
-
-function curl_reset($ch)
-{
-    global $ch_arr;
-    $ch_arr[strval($ch)] = [];
-    \curl_reset($ch);
-}
-*/
-
-static $curlChAr= [];
-const CH_URL="url";
-const CH_HEADRR="header";
-function curl_init($url = null)
-{
-    $ch = \curl_init($url);
-    global $curlChAr;
-    if($url){
-        $curlChAr[strval($ch)] = [CH_URL=>$url,CH_HEADRR=>[]];
-    }else{
-        $curlChAr[strval($ch)] = [CH_URL=>"",
-            CH_HEADRR=>[]];
-    }
-    return $ch;
-}
-
-function curl_setopt($ch, $option, $value)
-{
-    if($option == CURLOPT_HTTPHEADER)
-    {
-        global $curlChAr;
-        $curlChAr[strval($ch)][CH_HEADRR] = $value;
-
-    }elseif ($option == CURLOPT_URL ){
-        global $curlChAr;
-        $curlChAr[strval($ch)][CH_URL]=$value;
-    }
-
-    return \curl_setopt($ch, $option, $value);
-}
-
-function curl_setopt_array($ch, array $options)
-{
-    global $curlChAr;
-    if(isset($options[CURLOPT_URL]))
-    {
-
-        $curlChAr[strval($ch)][CH_URL] = $options[CURLOPT_URL];
-    }
-
-    if(isset($options[CURLOPT_HTTPHEADER]))
-    {
-
-        $curlChAr[strval($ch)][CH_HEADRR] = $options[CURLOPT_HTTPHEADER];
-    }
-
-    return \curl_setopt_array($ch,$options);
-}
-
-
-function set_pinpoint_header($ch,$url,$userHeader)
-{
-    $ppHeader = CurlUtil::getPinpointHeader($url);
-    $header= array_merge($userHeader,$ppHeader);
-    \curl_setopt($ch,CURLOPT_HTTPHEADER,$header);
-}
-
-
-function curl_exec($ch)
-{
-    global $curlChAr;
-    $chAr= $curlChAr[strval($ch)];
-    $plugin = new CurlExecPlugin('curl_exec', null, $ch);
-    try {
-        $plugin->onBefore();
-        set_pinpoint_header($ch,$chAr[CH_URL],$chAr[CH_HEADRR]);
-        $ret= \curl_exec($ch);
-        $plugin->onEnd($chAr[CH_URL]);
-        return $ret;
-    } catch (\Exception $e) {
-        $plugin->onException($e);
-        throw $e;
-    }
-}
-
-function curl_close($ch)
-{
-    global $curlChAr;
-    unset($curlChAr[strval($ch)] );
-    \curl_close($ch);
-}
-
-function curl_reset($ch)
-{
-    global $ch_arr;
-    $ch_arr[strval($ch)] = [];
-    \curl_reset($ch);
-}
diff --git a/plugins/PHP/Plugins/Framework/SwooleApp/setting.ini b/plugins/PHP/Plugins/Framework/SwooleApp/setting.ini
deleted file mode 100644
index e729e37a7..000000000
--- a/plugins/PHP/Plugins/Framework/SwooleApp/setting.ini
+++ /dev/null
@@ -1,15 +0,0 @@
-[nm_class]
-;rename below class
-;PDO=Plugins\Sys\PDO\PDO
-
-Swoole\Http\Server=Plugins\Framework\Swoole\Http\Server
-
-[nm_func]
-;rename below system function
-[nm_string]
-; I am not lazy, does user real need this?
-[nm_add_class]
-;expand above setting into below class
-class_name[]=app\HttpServer
-[nm_ignore_class]
-;ho ho, do not change in below class
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Framework/ThinkPHP/Readme.md b/plugins/PHP/Plugins/Framework/ThinkPHP/Readme.md
deleted file mode 100644
index 010c9ef48..000000000
--- a/plugins/PHP/Plugins/Framework/ThinkPHP/Readme.md
+++ /dev/null
@@ -1,17 +0,0 @@
-## Steps
-
-* copy pinpoint header into index.php
-
-```php
-###################################################################
-define('AOP_CACHE_DIR', __DIR__ . '/../Cache/');
-define('PLUGINS_DIR', __DIR__ . '/../Plugins/');
-define('APPLICATION_NAME','app-thinkphp');
-define('APPLICATION_ID','app-thinkphp');
-define('PINPOINT_USE_CACHE','YES');
-define('PP_REQ_PLUGINS', '\Plugins\PerRequestPlugins');
-require_once __DIR__ . '/../vendor/pinpoint-apm/pinpoint-php-aop/auto_pinpointed.php';
-###################################################################
-```
-
-* copy setting.ini into `Plugins`
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Framework/app/ClassMapInFile.php b/plugins/PHP/Plugins/Framework/app/ClassMapInFile.php
deleted file mode 100644
index f196bc0a8..000000000
--- a/plugins/PHP/Plugins/Framework/app/ClassMapInFile.php
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-/******************************************************************************
- * Copyright 2020 NAVER Corp.                                                 *
- *                                                                            *
- * Licensed under the Apache License, Version 2.0 (the "License");            *
- * you may not use this file except in compliance with the License.           *
- * You may obtain a copy of the License at                                    *
- *                                                                            *
- *     http://www.apache.org/licenses/LICENSE-2.0                             *
- *                                                                            *
- * Unless required by applicable law or agreed to in writing, software        *
- * distributed under the License is distributed on an "AS IS" BASIS,          *
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
- * See the License for the specific language governing permissions and        *
- * limitations under the License.                                             *
- ******************************************************************************/
-
-
-
-namespace Plugins\Framework\app;
-use pinpoint\Common\AopClassMap;
-use Plugins\PerRequestPlugins;
-class ClassMapInFile extends AopClassMap
-{
-    private $mustHoldClasses = ['app\AccessRemote'=>null,'app\Proxied_AccessRemote'=>null,'Plugins\PerRequestPlugins'=>null];
-    public function __construct()
-    {
-        parent::__construct();
-    }
-
-    public  function findFile($classFullName)
-    {
-        $file = parent::findFile($classFullName);
-        if($file){
-            if(!PerRequestPlugins::instance()->traceLimit())
-            {
-                return $file;
-            }elseif (array_key_exists($classFullName ,$this->mustHoldClasses) == 1){
-                return $file;
-            }else{
-                echo "reject $$classFullName <br>";
-                return null;
-            }
-        }
-        return $file;
-    }
-
-}
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Framework/app/Readme.md b/plugins/PHP/Plugins/Framework/app/Readme.md
deleted file mode 100644
index 8540f06b2..000000000
--- a/plugins/PHP/Plugins/Framework/app/Readme.md
+++ /dev/null
@@ -1,19 +0,0 @@
-## Steps
-
-* copy pinpoint header into index.php
-
-```php
-#################################################
-define('AOP_CACHE_DIR',__DIR__.'/../Cache/');
-define('PLUGINS_DIR',__DIR__.'/../Plugins/');
-define('USER_DEFINED_CLASS_MAP_IMPLEMENT',"\Plugins\Framework\app\ClassMapInFile");
-define('APPLICATION_NAME','APP-2');
-define('APPLICATION_ID','app-2');
-define('PINPOINT_USE_CACHE','YES');
-define('PP_REQ_PLUGINS', '\Plugins\PerRequestPlugins');
-require_once __DIR__. '/../vendor/pinpoint-apm/pinpoint-php-aop/auto_pinpointed.php';
-###################################################################
-
-```
-
-* copy setting.ini into `Plugins`
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Framework/app/setting.ini b/plugins/PHP/Plugins/Framework/app/setting.ini
deleted file mode 100644
index 1412491e0..000000000
--- a/plugins/PHP/Plugins/Framework/app/setting.ini
+++ /dev/null
@@ -1,30 +0,0 @@
-[nm_class]
-;rename below class
-PDO=Plugins\Sys\PDO\PDO
-Memcached=Plugins\Sys\Memcached\Memcached
-Redis=Plugins\Sys\phpredis\Redis
-mysqli=Plugins\Sys\mysqli\mysqli
-RdKafka\Producer=Plugins\Sys\RdKafka\Producer
-;Swoole\Http\Server=Plugins\Framework\Swoole\Http\Server
-
-[nm_func]
-;rename below system function
-curl_init=Plugins\Sys\curl\curl_init
-curl_setopt=Plugins\Sys\curl\curl_setopt
-curl_exec=Plugins\Sys\curl\curl_exec
-curl_close=Plugins\Sys\curl\curl_close
-curl_setopt_array=Plugins\Sys\curl\curl_setopt_array
-
-[nm_string]
-; I am not lazy, does user real need this?
-[nm_add_class]
-;expand above setting into below class
-class_name[]=app\TestMemcached
-class_name[]=app\TestPDO
-class_name[]=app\AccessRemote
-class_name[]=app\TestRedis
-class_name[]=app\TestMysqli
-class_name[]=app\TestKafka
-
-[nm_ignore_class]
-;ho ho, do not change in below class
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Framework/codeIgniter4/Readme.md b/plugins/PHP/Plugins/Framework/codeIgniter4/Readme.md
deleted file mode 100644
index 0088a28b4..000000000
--- a/plugins/PHP/Plugins/Framework/codeIgniter4/Readme.md
+++ /dev/null
@@ -1,17 +0,0 @@
-## Steps
-
-* copy pinpoint header into index.php
-
-```php
-################################################################
-define('AOP_CACHE_DIR', __DIR__ . '/../Cache/');
-define('PLUGINS_DIR', __DIR__ . '/../Plugins/');
-define('APPLICATION_NAME','app-ci4');
-define('APPLICATION_ID','app-ci4');
-define('PINPOINT_USE_CACHE','YES');
-define('PP_REQ_PLUGINS', '\Plugins\PerRequestPlugins');
-require_once __DIR__ . '/../vendor/pinpoint-apm/pinpoint-php-aop/auto_pinpointed.php';
-################################################################
-```
-
-* copy setting.ini into `Plugins`
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Framework/codeIgniter4/setting.ini b/plugins/PHP/Plugins/Framework/codeIgniter4/setting.ini
deleted file mode 100644
index 1e915e915..000000000
--- a/plugins/PHP/Plugins/Framework/codeIgniter4/setting.ini
+++ /dev/null
@@ -1,21 +0,0 @@
-[nm_class]
-;rename below class
-;PDO=Plugins\Sys\PDO\PDO
-
-;Swoole\Http\Server=Plugins\Framework\Swoole\Http\Server
-
-[nm_func]
-;rename below system function
-
-mysqli_init=Plugins\Sys\mysqli\mysqli_init
-
-[nm_string]
-; I am not lazy, does user real need this?
-[nm_add_class]
-;expand above setting into below class
-;class_name[]=Cake\Database\Driver
-;class_name[]=App\Service\Action\User\RegisterAction
-class_name[]=CodeIgniter\Database\MySQLi\Connection
-
-[nm_ignore_class]
-;ho ho, do not change in below class
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Framework/symfony/Readme.md b/plugins/PHP/Plugins/Framework/symfony/Readme.md
deleted file mode 100644
index 8b2dfc24e..000000000
--- a/plugins/PHP/Plugins/Framework/symfony/Readme.md
+++ /dev/null
@@ -1,18 +0,0 @@
-## Steps
-
-* copy pinpoint header into index.php
-
-```php
-###################################################################
-define('AOP_CACHE_DIR', __DIR__ . '/../Cache/');
-define('PLUGINS_DIR', __DIR__ . '/../Plugins/');
-define('APPLICATION_NAME','app-symfony');
-define('APPLICATION_ID','app-symfony');
-define('PINPOINT_USE_CACHE','YES');
-define('PP_REQ_PLUGINS', '\Plugins\PerRequestPlugins');
-require_once __DIR__ . '/../vendor/pinpoint-apm/pinpoint-php-aop/auto_pinpointed.php';
-###################################################################
-
-```
-
-* copy setting.ini into `Plugins`
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Framework/workerman/Reademe.md b/plugins/PHP/Plugins/Framework/workerman/Reademe.md
deleted file mode 100644
index e69de29bb..000000000
diff --git a/plugins/PHP/Plugins/Framework/workerman/setting.ini b/plugins/PHP/Plugins/Framework/workerman/setting.ini
deleted file mode 100644
index 4ef4bc21f..000000000
--- a/plugins/PHP/Plugins/Framework/workerman/setting.ini
+++ /dev/null
@@ -1,15 +0,0 @@
-[nm_class]
-;rename below class
-;PDO=Plugins\Sys\PDO\PDO
-
-;Swoole\Http\Server=Plugins\Framework\Swoole\Http\Server
-
-[nm_func]
-;rename below system function
-[nm_string]
-; I am not lazy, does user real need this?
-[nm_add_class]
-;expand above setting into below class
-;class_name[]=app\HttpServer
-[nm_ignore_class]
-;ho ho, do not change in below class
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Framework/yii2/PinpointYiiClassLoader.php b/plugins/PHP/Plugins/Framework/yii2/PinpointYiiClassLoader.php
deleted file mode 100644
index ee7f13a51..000000000
--- a/plugins/PHP/Plugins/Framework/yii2/PinpointYiiClassLoader.php
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php
-/******************************************************************************
- * Copyright 2020 NAVER Corp.                                                 *
- *                                                                            *
- * Licensed under the Apache License, Version 2.0 (the "License");            *
- * you may not use this file except in compliance with the License.           *
- * You may obtain a copy of the License at                                    *
- *                                                                            *
- *     http://www.apache.org/licenses/LICENSE-2.0                             *
- *                                                                            *
- * Unless required by applicable law or agreed to in writing, software        *
- * distributed under the License is distributed on an "AS IS" BASIS,          *
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
- * See the License for the specific language governing permissions and        *
- * limitations under the License.                                             *
- ******************************************************************************/
-
-namespace Plugins\Framework\yii2;
-use Yii;
-
-/**
- * @deprecated only use when composer autoload failed
- */
-class PinpointYiiClassLoader
-{
-    /**
-     * copy from yii autoload
-     */
-    public static function findFile($className)
-    {
-        if (isset(Yii::$classMap[$className])) {
-            $classFile = Yii::$classMap[$className];
-            if ($classFile[0] === '@') {
-                $classFile = Yii::getAlias($classFile);
-            }
-        } elseif (strpos($className, '\\') !== false) {
-            $classFile = Yii::getAlias('@' . str_replace('\\', '/', $className) . '.php', false);
-            if ($classFile === false || !is_file($classFile)) {
-                return null;
-            }
-        } else {
-            return null;
-        }
-         return $classFile;
-    }
-
-    public static function autoload($className)
-    {
-        Yii::autoload($className); // TODO: Change the autogenerated stub
-    }
-}
diff --git a/plugins/PHP/Plugins/Framework/yii2/Readme.md b/plugins/PHP/Plugins/Framework/yii2/Readme.md
deleted file mode 100644
index e06f53736..000000000
--- a/plugins/PHP/Plugins/Framework/yii2/Readme.md
+++ /dev/null
@@ -1,18 +0,0 @@
-## Steps
-
-* copy pinpoint header into index.php
-
-```php
-###################################################################
-define('AOP_CACHE_DIR', __DIR__ . '/../Cache/');
-define('PLUGINS_DIR', __DIR__ . '/../Plugins/');
-define('APPLICATION_NAME','app-yii2');
-define('APPLICATION_ID','app-yii2');
-define('PINPOINT_USE_CACHE','YES');
-define('PP_REQ_PLUGINS', '\Plugins\PerRequestPlugins');
-require_once __DIR__ . '/../vendor/pinpoint-apm/pinpoint-php-aop/auto_pinpointed.php';
-###################################################################
-
-```
-
-* copy setting.ini into `Plugins`
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Framework/yii2/index.php.example b/plugins/PHP/Plugins/Framework/yii2/index.php.example
deleted file mode 100644
index 8c4101ab7..000000000
--- a/plugins/PHP/Plugins/Framework/yii2/index.php.example
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-
-
-
-require_once dirname(__DIR__) . '/vendor/autoload.php';
-
-
-/////////////////////////////////////////////////////////
-define('AOP_CACHE_DIR', __DIR__ . '/../Cache/');
-define('PLUGINS_DIR', __DIR__ . '/../Plugins/');
-define('APPLICATION_NAME','app-yii2');
-define('APPLICATION_ID','app-yii2');
-define('PINPOINT_USE_CACHE','YES');
-define('PP_REQ_PLUGINS', '\Plugins\PerRequestPlugins');
-require_once __DIR__ . '/../vendor/pinpoint-apm/pinpoint-php-aop/auto_pinpointed.php';
-
-//////////////////////////////////////////////////////////
-
-
-
-
diff --git a/plugins/PHP/Plugins/Framework/yii2/setting.ini b/plugins/PHP/Plugins/Framework/yii2/setting.ini
deleted file mode 100644
index e758f1388..000000000
--- a/plugins/PHP/Plugins/Framework/yii2/setting.ini
+++ /dev/null
@@ -1,15 +0,0 @@
-[nm_class]
-;rename below class
-PDO=Plugins\Sys\PDO\PDO
-
-;Swoole\Http\Server=Plugins\Framework\Swoole\Http\Server
-
-[nm_func]
-;rename below system function
-[nm_string]
-; I am not lazy, does user real need this?
-[nm_add_class]
-;expand above setting into below class
-class_name[]=Spiral\Database\Driver\Driver
-[nm_ignore_class]
-;ho ho, do not change in below class
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/PerRequestPlugins.php b/plugins/PHP/Plugins/PerRequestPlugins.php
deleted file mode 100644
index c1c675942..000000000
--- a/plugins/PHP/Plugins/PerRequestPlugins.php
+++ /dev/null
@@ -1,179 +0,0 @@
-<?php
-/******************************************************************************
- * Copyright 2020 NAVER Corp.                                                 *
- *                                                                            *
- * Licensed under the Apache License, Version 2.0 (the "License");            *
- * you may not use this file except in compliance with the License.           *
- * You may obtain a copy of the License at                                    *
- *                                                                            *
- *     http://www.apache.org/licenses/LICENSE-2.0                             *
- *                                                                            *
- * Unless required by applicable law or agreed to in writing, software        *
- * distributed under the License is distributed on an "AS IS" BASIS,          *
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
- * See the License for the specific language governing permissions and        *
- * limitations under the License.                                             *
- ******************************************************************************/
-
-namespace Plugins;
-
-require_once "__init__.php";
-
-class PerRequestPlugins
-{
-    public static $_intance = null;
-    public $tid = null;
-    public $sid = null;
-    public $psid = null;
-    public $pname = null;
-    public $ptype = null;
-    public $ah = null;
-    public $app_name = null;
-    public $app_id = null;
-    private $curNextSpanId = '';
-    private $isLimit = false;
-    private $mem_start = 0;
-
-    public function traceLimit()
-    {
-        return $this->isLimit;
-    }
-
-    public static function instance()
-    {
-        if (static::$_intance == null) {
-            static::$_intance = new static();
-        }
-        return static::$_intance;
-    }
-
-    protected function __construct()
-    {
-        if(defined('PP_REPORT_MEMORY_USAGE') && PP_REPORT_MEMORY_USAGE === '1') {
-            $this->mem_start = memory_get_usage();
-        }
-
-        pinpoint_start_trace();
-        pinpoint_add_clue(PP_SERVER_TYPE, PP_PHP);
-        // Handle web request and CLI request
-        pinpoint_add_clue(PP_INTERCEPTOR_NAME, "PHP Request: ". php_sapi_name());
-
-        if(isset($_SERVER['REQUEST_URI'])) {
-            pinpoint_add_clue(PP_REQ_URI, $_SERVER['REQUEST_URI']);
-        } elseif(isset($_SERVER['argv'])) {
-            pinpoint_add_clue(PP_REQ_URI, implode(" ", $_SERVER['argv']));
-        }
-
-        if(isset($_SERVER['REMOTE_ADDR'])) {
-            pinpoint_add_clue(PP_REQ_CLIENT, $_SERVER["REMOTE_ADDR"]);
-        }
-
-        if(isset($_SERVER['HTTP_HOST'])) {
-            pinpoint_add_clue(PP_REQ_SERVER, $_SERVER["HTTP_HOST"]);
-        } elseif(($hostname = gethostname()) !== false) {
-            if(($pid = getmypid()) !== false) {
-                $hostname .= sprintf("[pid:%d]", $pid);
-            }
-            pinpoint_add_clue(PP_REQ_SERVER, $hostname);
-        }
-
-        $this->app_name = APPLICATION_NAME;
-        pinpoint_add_clue(PP_APP_NAME, $this->app_name);
-
-        $this->app_id = substr(APPLICATION_ID, 0, 24);
-        pinpoint_add_clue(PP_APP_ID, $this->app_id);
-
-        if (isset($_SERVER[PP_HEADER_PSPANID]) || array_key_exists(PP_HEADER_PSPANID, $_SERVER)) {
-            $this->psid = $_SERVER[PP_HEADER_PSPANID];
-            pinpoint_add_clue(PP_PARENT_SPAN_ID, $this->psid);
-        }
-
-        if (isset($_SERVER[PP_HEADER_SPANID]) || array_key_exists(PP_HEADER_SPANID, $_SERVER)) {
-            $this->sid = $_SERVER[PP_HEADER_SPANID];
-        } else {
-            $this->sid = $this->generateSpanID();
-        }
-
-        if (isset($_SERVER[PP_HEADER_TRACEID]) || array_key_exists(PP_HEADER_TRACEID, $_SERVER)) {
-            $this->tid = $_SERVER[PP_HEADER_TRACEID];
-        } else {
-            $this->tid = $this->generateTransactionID();
-        }
-
-        if (isset($_SERVER[PP_HEADER_PAPPNAME]) || array_key_exists(PP_HEADER_PAPPNAME, $_SERVER)) {
-            $this->pname = $_SERVER[PP_HEADER_PAPPNAME];
-            pinpoint_add_clue(PP_PARENT_NAME, $this->pname);
-        }
-
-        if (isset($_SERVER[PP_HEADER_PAPPTYPE]) || array_key_exists(PP_HEADER_PAPPTYPE, $_SERVER)) {
-            $this->ptype = $_SERVER[PP_HEADER_PAPPTYPE];
-            pinpoint_add_clue(PP_PARENT_TYPE, $this->ptype);
-        }
-
-        if (isset($_SERVER[PP_HEADER_PINPOINT_HOST]) || array_key_exists(PP_HEADER_PINPOINT_HOST, $_SERVER)) {
-            $this->ah = $_SERVER[PP_HEADER_PINPOINT_HOST];
-            pinpoint_add_clue(PP_PARENT_HOST, $this->ah);
-        }
-
-        if (isset($_SERVER[PP_HEADER_NGINX_PROXY]) || array_key_exists(PP_HEADER_NGINX_PROXY, $_SERVER)) {
-            pinpoint_add_clue(PP_NGINX_PROXY, $_SERVER[PP_HEADER_NGINX_PROXY]);
-        }
-
-        if (isset($_SERVER[PP_HEADER_APACHE_PROXY]) || array_key_exists(PP_HEADER_APACHE_PROXY, $_SERVER)) {
-            pinpoint_add_clue(PP_APACHE_PROXY, $_SERVER[PP_HEADER_APACHE_PROXY]);
-        }
-
-        pinpoint_set_context("Pinpoint-Sampled", PP_SAMPLED);
-        if (((isset($_SERVER[PP_HEADER_SAMPLED]) || array_key_exists(PP_HEADER_SAMPLED, $_SERVER)) && ($_SERVER[PP_HEADER_SAMPLED] == PP_NOT_SAMPLED)) or pinpoint_tracelimit()) {
-            $this->isLimit = true;
-            //drop this request. collector could not receive any thing
-            pinpoint_set_context("Pinpoint-Sampled", PP_NOT_SAMPLED);
-            pinpoint_drop_trace();
-        }
-
-        pinpoint_add_clue(PP_TRANSCATION_ID, $this->tid);
-        pinpoint_add_clue(PP_SPAN_ID, $this->sid);
-        pinpoint_set_context(PP_TRANSCATION_ID, $this->tid);
-        pinpoint_set_context(PP_SPAN_ID, (string)$this->sid);
-    }
-
-    public function __destruct()
-    {
-        // reset limit
-        $this->isLimit = false;
-        if(defined('PP_REPORT_MEMORY_USAGE') && PP_REPORT_MEMORY_USAGE === '1') {
-            $memory_usage = (memory_get_peak_usage() - $this->mem_start) / 1024;
-            pinpoint_add_clues(PP_MEMORY_USAGE, "$memory_usage KB");
-        }
-
-        if (is_int($http_response_code = http_response_code())) {
-            pinpoint_add_clues(PP_HTTP_STATUS_CODE, $http_response_code);
-            if (strpos($http_response_code, '5') === 0
-                && function_exists('pinpoint_mark_as_error'))
-            {
-                pinpoint_mark_as_error('Internal server error', __FILE__);
-            }
-        }
-        pinpoint_end_trace();
-    }
-
-    public function generateSpanID()
-    {
-        try {
-            $this->curNextSpanId = mt_rand(); //random_int(-99999999,99999999);
-            return $this->curNextSpanId;
-        } catch (\Exception $e) {
-            return rand();
-        }
-    }
-
-    public function getCurNextSpanId()
-    {
-        return $this->curNextSpanId;
-    }
-
-    public function generateTransactionID()
-    {
-        return  $this->app_id . '^' . strval(pinpoint_start_time()) . '^' . strval(pinpoint_unique_id());
-    }
-}
diff --git a/plugins/PHP/Plugins/Readme.md b/plugins/PHP/Plugins/Readme.md
deleted file mode 100644
index e2b555df0..000000000
--- a/plugins/PHP/Plugins/Readme.md
+++ /dev/null
@@ -1,7 +0,0 @@
-## Configuration
-
-Name|Use|Optional|Example
----|----|----|----
-PP_REPORT_MEMORY_USAGE|report memory usage by memory_get_usage\|memory_get_peak_usage|Yes|define('PP_REPORT_MEMORY_USAGE','1'); ## enable 
-PINPOINT_USE_CACHE| Use the cached class (within `AOP_CACHE_DIR`)|Yes| define('PINPOINT_USE_CACHE','YES'); <br> strongly recommend `Yes` for real env.
-PP_REQ_PLUGINS|Per request class name|Yes | define('PP_REQ_PLUGINS', '\Plugins\PerRequestPlugins');
diff --git a/plugins/PHP/Plugins/Sys/Memcached/MemAddPlugin.php b/plugins/PHP/Plugins/Sys/Memcached/MemAddPlugin.php
deleted file mode 100644
index d7be1b770..000000000
--- a/plugins/PHP/Plugins/Sys/Memcached/MemAddPlugin.php
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-namespace Plugins\Sys\Memcached;
-
-
-use Plugins\Common\Candy;
-
-class MemAddPlugin extends Candy
-{
-
-    function onBefore()
-    {
-        pinpoint_add_clue(PP_SERVER_TYPE,PP_MEMCACHED);
-        $key =  $this->args[0];
-        $value =  $this->args[1];
-        pinpoint_add_clues(PP_PHP_ARGS,"$key:$value");
-    }
-
-    function onEnd(&$ret)
-    {
-
-    }
-}
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Sys/Memcached/MemAddServerPlugin.php b/plugins/PHP/Plugins/Sys/Memcached/MemAddServerPlugin.php
deleted file mode 100644
index 0f3dd63ad..000000000
--- a/plugins/PHP/Plugins/Sys/Memcached/MemAddServerPlugin.php
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-/*
- * User: eeliu
- * Date: 11/5/20
- * Time: 3:05 PM
- */
-
-namespace Plugins\Sys\Memcached;
-
-
-use Plugins\Common\Candy;
-
-class MemAddServerPlugin extends Candy
-{
-
-    function onBefore()
-    {
-
-        $host = $this->args[0];
-        $port = $this->args[1];
-        pinpoint_add_clue(PP_SERVER_TYPE,PP_MEMCACHED);
-        pinpoint_add_clue(PP_DESTINATION,"$host:$port");
-    }
-
-    function onEnd(&$ret)
-    {
-        // TODO: Implement onEnd() method.
-    }
-}
diff --git a/plugins/PHP/Plugins/Sys/Memcached/MemAddServersPlugin.php b/plugins/PHP/Plugins/Sys/Memcached/MemAddServersPlugin.php
deleted file mode 100644
index 5bf389012..000000000
--- a/plugins/PHP/Plugins/Sys/Memcached/MemAddServersPlugin.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-/*
- * User: eeliu
- * Date: 11/5/20
- * Time: 3:09 PM
- */
-
-namespace Plugins\Sys\Memcached;
-use Plugins\Common\Candy;
-
-class MemAddServersPlugin extends Candy
-{
-
-    function onBefore()
-    {
-        $servers = $this->args[0];
-        $url ='';
-        foreach ($servers as $server)
-        {
-            $url.= sprintf("%s:%d ",$server[0],$server[1]);
-        }
-        pinpoint_add_clue(PP_SERVER_TYPE,PP_MEMCACHED);
-        pinpoint_add_clue(PP_DESTINATION,$url);
-    }
-
-    function onEnd(&$ret)
-    {
-        // TODO: Implement onEnd() method.
-    }
-}
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Sys/Memcached/MemGetPlugin.php b/plugins/PHP/Plugins/Sys/Memcached/MemGetPlugin.php
deleted file mode 100644
index 141845a5d..000000000
--- a/plugins/PHP/Plugins/Sys/Memcached/MemGetPlugin.php
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-namespace Plugins\Sys\Memcached;
-
-use Plugins\Common\Candy;
-
-class MemGetPlugin extends Candy
-{
-
-    function onBefore()
-    {
-        $key =  $this->args[0];
-        pinpoint_add_clue(PP_SERVER_TYPE,PP_MEMCACHED);
-        pinpoint_add_clues(PP_PHP_ARGS,"$key");
-    }
-
-    function onEnd(&$ret)
-    {
-
-    }
-}
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Sys/Memcached/Memcached.php b/plugins/PHP/Plugins/Sys/Memcached/Memcached.php
deleted file mode 100644
index efee9d60e..000000000
--- a/plugins/PHP/Plugins/Sys/Memcached/Memcached.php
+++ /dev/null
@@ -1,69 +0,0 @@
-<?php
-namespace Plugins\Sys\Memcached;
-
-class Memcached extends \Memcached
-{
-    public function add ($key, $value, $expiration = 0)
-    {
-        $p = new MemAddPlugin("Memcached::".__FUNCTION__,$this,$key,$value,$expiration);
-        try{
-            $p->onBefore();
-            $r = parent::add($key, $value, $expiration);
-            $p->onEnd($r);
-            return $r;
-        }catch (\Exception $e)
-        {
-            $p->onException($e);
-            throw $e;
-        }
-    }
-
-    public function addServer ($host, $port, $weight = 0)
-    {
-        $p = new MemAddServerPlugin("Memcached::".__FUNCTION__,$this,$host,$port,$weight);
-        try{
-            $p->onBefore();
-            $r = parent::addServer($host,$port,$weight);
-            $p->onEnd($r);
-            return $r;
-        }catch (\Exception $e)
-        {
-            $p->onException($e);
-            throw $e;
-        }
-    }
-
-
-    public function addServers ($servers)
-    {
-        $p = new MemAddServersPlugin("Memcached::".__FUNCTION__,$this,$servers);
-        try{
-            $p->onBefore();
-            $r = parent::addServers($servers);
-            $p->onEnd($r);
-            return $r;
-        }catch (\Exception $e)
-        {
-            $p->onException($e);
-            throw $e;
-        }
-    }
-
-    public function get($key, $cache_cb = null, $flags = 0)
-    {
-        $p = new MemGetPlugin("Memcached::".__FUNCTION__,$this,$key,$cache_cb,$flags);
-        try{
-            $p->onBefore();
-            $r = parent::get($key,$cache_cb,$flags);
-            $p->onEnd($r);
-            return $r;
-        }catch (\Exception $e)
-        {
-            $p->onException($e);
-            throw $e;
-        }
-    }
-
-
-
-}
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Sys/PDO/PDO.php b/plugins/PHP/Plugins/Sys/PDO/PDO.php
deleted file mode 100644
index 87a34e56c..000000000
--- a/plugins/PHP/Plugins/Sys/PDO/PDO.php
+++ /dev/null
@@ -1,80 +0,0 @@
-<?php
-/******************************************************************************
- * Copyright 2020 NAVER Corp.                                                 *
- *                                                                            *
- * Licensed under the Apache License, Version 2.0 (the "License");            *
- * you may not use this file except in compliance with the License.           *
- * You may obtain a copy of the License at                                    *
- *                                                                            *
- *     http://www.apache.org/licenses/LICENSE-2.0                             *
- *                                                                            *
- * Unless required by applicable law or agreed to in writing, software        *
- * distributed under the License is distributed on an "AS IS" BASIS,          *
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
- * See the License for the specific language governing permissions and        *
- * limitations under the License.                                             *
- ******************************************************************************/
-namespace Plugins\Sys\PDO;
-
-class PDO extends \PDO
-{
-    public $dsn;
-
-    public function __construct ($dsn, $username=null, $passwd=null, $options=[])
-    {
-        $this->dsn = $dsn;
-        parent::__construct($dsn, $username, $passwd, $options);
-    }
-
-    private function doPDOQuery($statement, $mode = \PDO::ATTR_DEFAULT_FETCH_MODE, $arg3 = null, array $ctorargs = array())
-    {
-        $args = \pinpoint_get_func_ref_args();
-        $var = new PreparePlugin("PDO::query",$this,...$args);
-        try{
-            $var->onBefore();
-            $ret = parent::query(...$args);
-            $var->onEnd($ret);
-            return $ret;
-        }catch (\Exception $e){
-            $var->onException($e);
-            throw new \Exception($e);
-        }
-
-    }
-
-    public function query()
-    {
-        return $this->doPDOQuery(...\pinpoint_get_func_ref_args());
-    }
-
-
-    public function exec($statement)
-    {
-        $var = new PDOExec("PDO::exec",$this,$statement);
-        try{
-            $var->onBefore();
-            $ret = parent::exec($statement);
-            $var->onEnd($ret);
-            return $ret;
-        }catch (\Exception $e){
-            $var->onException($e);
-            throw new \Exception($e);
-        }
-    }
-
-
-    public function prepare($statement,  $driver_options = array())
-    {
-        $var = new PreparePlugin("PDO::prepare",$this,$statement,$driver_options);
-        try{
-            $var->onBefore();
-            $ret = parent::prepare($statement,$driver_options);
-            $var->onEnd($ret);
-            return $ret;
-        }catch (\Exception $e){
-            $var->onException($e);
-            throw new \Exception($e);
-        }
-    }
-
-}
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Sys/PDO/PDOExec.php b/plugins/PHP/Plugins/Sys/PDO/PDOExec.php
deleted file mode 100644
index 9ca6cdd6b..000000000
--- a/plugins/PHP/Plugins/Sys/PDO/PDOExec.php
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-/******************************************************************************
- * Copyright 2020 NAVER Corp.                                                 *
- *                                                                            *
- * Licensed under the Apache License, Version 2.0 (the "License");            *
- * you may not use this file except in compliance with the License.           *
- * You may obtain a copy of the License at                                    *
- *                                                                            *
- *     http://www.apache.org/licenses/LICENSE-2.0                             *
- *                                                                            *
- * Unless required by applicable law or agreed to in writing, software        *
- * distributed under the License is distributed on an "AS IS" BASIS,          *
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
- * See the License for the specific language governing permissions and        *
- * limitations under the License.                                             *
- ******************************************************************************/
-namespace Plugins\Sys\PDO;
-
-use Plugins\Common\Candy;
-
-class PDOExec extends Candy
-{
-
-    function onBefore()
-    {
-        pinpoint_add_clues(PP_PHP_ARGS, sprintf("%s",$this->args[0][0]));
-    }
-
-    function onEnd(&$ret)
-    {
-        pinpoint_add_clues(PP_PHP_RETURN,"$ret");
-    }
-
-    function onException($e)
-    {
-        // TODO: Implement onException() method.
-    }
-}
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Sys/PDO/PDOGlueStatement.php b/plugins/PHP/Plugins/Sys/PDO/PDOGlueStatement.php
deleted file mode 100644
index 05621711a..000000000
--- a/plugins/PHP/Plugins/Sys/PDO/PDOGlueStatement.php
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-/******************************************************************************
- * Copyright 2020 NAVER Corp.                                                 *
- *                                                                            *
- * Licensed under the Apache License, Version 2.0 (the "License");            *
- * you may not use this file except in compliance with the License.           *
- * You may obtain a copy of the License at                                    *
- *                                                                            *
- *     http://www.apache.org/licenses/LICENSE-2.0                             *
- *                                                                            *
- * Unless required by applicable law or agreed to in writing, software        *
- * distributed under the License is distributed on an "AS IS" BASIS,          *
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
- * See the License for the specific language governing permissions and        *
- * limitations under the License.                                             *
- ******************************************************************************/
-namespace Plugins\Sys\PDO;
-
-use Plugins\Common\Candy;
-use Plugins\Sys\PDO\ProfilerPDOStatement;
-class PDOGlueStatement extends Candy
-
-{
-    function onBefore()
-    {
-        // todo stp, should follow the dsn
-        $dbInfo = $this->parseDb($this->who->dsn);
-        pinpoint_add_clue(PP_SERVER_TYPE,PP_MYSQL);
-        pinpoint_add_clue(PP_SQL_FORMAT, sprintf("%s",$this->args[0]));
-        pinpoint_add_clue(PP_DESTINATION,$dbInfo['host']);
-    }
-    function onEnd(&$ret)
-    {
-        $origin = $ret;
-        $ret = new ProfilerPDOStatement($origin);
-    }
-
-    function onException($e)
-    {
-        pinpoint_add_clue(PP_ADD_EXCEPTION,$e->getMessage());
-    }
-
-    function parseDb($dsn){
-
-        $db_url =  parse_url($dsn);
-        parse_str(str_replace(';','&',$db_url['path']),$dbInfo);
-
-        if($db_url['scheme'] == 'sqlite'){ // treat sqllite as mysql
-            $dbInfo['host'] = 'localhost-sqlite';
-        }
-
-        $dbInfo['scheme']= $db_url['scheme'];
-
-        return $dbInfo;
-    }
-}
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Sys/PDO/PreparePlugin.php b/plugins/PHP/Plugins/Sys/PDO/PreparePlugin.php
deleted file mode 100644
index 7cffe630b..000000000
--- a/plugins/PHP/Plugins/Sys/PDO/PreparePlugin.php
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-/******************************************************************************
- * Copyright 2020 NAVER Corp.                                                 *
- *                                                                            *
- * Licensed under the Apache License, Version 2.0 (the "License");            *
- * you may not use this file except in compliance with the License.           *
- * You may obtain a copy of the License at                                    *
- *                                                                            *
- *     http://www.apache.org/licenses/LICENSE-2.0                             *
- *                                                                            *
- * Unless required by applicable law or agreed to in writing, software        *
- * distributed under the License is distributed on an "AS IS" BASIS,          *
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
- * See the License for the specific language governing permissions and        *
- * limitations under the License.                                             *
- ******************************************************************************/
-namespace Plugins\Sys\PDO;
-
-use Plugins\Common\Candy;
-
-class PreparePlugin extends Candy
-
-{
-    function onBefore()
-    {
-        // todo stp, should follow the dsn
-        $dbInfo = $this->parseDb($this->who->dsn);
-        pinpoint_add_clue(PP_SERVER_TYPE,PP_MYSQL);
-        pinpoint_add_clue(PP_SQL_FORMAT, $this->args[0]);
-        pinpoint_add_clue(PP_DESTINATION,$dbInfo['host']);
-    }
-    function onEnd(&$ret)
-    {
-        $origin = $ret;
-        $ret = new ProfilerPDOStatement($origin);
-    }
-
-    function onException($e)
-    {
-        pinpoint_add_clue(PP_ADD_EXCEPTION,$e->getMessage());
-    }
-
-    function parseDb($dsn){
-
-        $db_url =  parse_url($dsn);
-        parse_str(str_replace(';','&',$db_url['path']),$dbInfo);
-
-        if($db_url['scheme'] == 'sqlite'){ // treat sqllite as mysql
-            $dbInfo['host'] = 'localhost-sqlite';
-        }
-
-        $dbInfo['scheme']= $db_url['scheme'];
-
-        return $dbInfo;
-    }
-}
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Sys/PDO/ProfilerPDOStatement.php b/plugins/PHP/Plugins/Sys/PDO/ProfilerPDOStatement.php
deleted file mode 100644
index 503143183..000000000
--- a/plugins/PHP/Plugins/Sys/PDO/ProfilerPDOStatement.php
+++ /dev/null
@@ -1,193 +0,0 @@
-<?php
-/******************************************************************************
- * Copyright 2020 NAVER Corp.                                                 *
- *                                                                            *
- * Licensed under the Apache License, Version 2.0 (the "License");            *
- * you may not use this file except in compliance with the License.           *
- * You may obtain a copy of the License at                                    *
- *                                                                            *
- *     http://www.apache.org/licenses/LICENSE-2.0                             *
- *                                                                            *
- * Unless required by applicable law or agreed to in writing, software        *
- * distributed under the License is distributed on an "AS IS" BASIS,          *
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
- * See the License for the specific language governing permissions and        *
- * limitations under the License.                                             *
- ******************************************************************************/
-
-
-
-namespace Plugins\Sys\PDO;
-use function GuzzleHttp\Psr7\normalize_header;
-use PDO;
-use Plugins\Common\InstancePlugins;
-
-class ProfilerPDOStatement extends \PDOStatement
-{
-    protected $_instance ;
-    protected $_name_list;
-    protected $name;
-    public function __construct(&$instance)
-    {
-        $this->_instance = &$instance;
-        $this->_name_list=[
-            'fetchAll','fetch','nextRowset','getColumnMeta','fetchObject','execute'
-        ];
-    }
-
-    protected function onBefore()
-    {
-        pinpoint_start_trace();
-        pinpoint_add_clue(PP_INTERCEPTOR_NAME,$this->name);
-    }
-
-    protected function onEnd(&$ret)
-    {
-        pinpoint_end_trace();
-    }
-
-    protected function onException($e)
-    {
-        pinpoint_add_clue(PP_ADD_EXCEPTION,$e->getMessage());
-    }
-
-
-    public function bindValue($parameter, $value, $data_type = PDO::PARAM_STR)
-    {
-        $args = \pinpoint_get_func_ref_args();
-        return $this->profiler(__FUNCTION__,$args);
-    }
-
-    public function closeCursor()
-    {
-        $args = \pinpoint_get_func_ref_args();
-        return $this->profiler(__FUNCTION__,$args);
-    }
-
-    public function columnCount()
-    {
-       $args = \pinpoint_get_func_ref_args();
-       return $this->profiler(__FUNCTION__,$args);
-    }
-
-    public function debugDumpParams()
-    {
-       $args = \pinpoint_get_func_ref_args();
-       return $this->profiler(__FUNCTION__,$args);
-    }
-
-    public function errorCode()
-    {
-       $args = \pinpoint_get_func_ref_args();
-       return $this->profiler(__FUNCTION__,$args);
-    }
-
-    public function errorInfo()
-    {
-       $args = \pinpoint_get_func_ref_args();
-       return $this->profiler(__FUNCTION__,$args);
-    }
-
-    public function execute($input_parameters = null)
-    {
-        $args = \pinpoint_get_func_ref_args();
-        return $this->profiler(__FUNCTION__,$args);
-    }
-
-    public function fetch($fetch_style = null, $cursor_orientation = PDO::FETCH_ORI_NEXT, $cursor_offset = 0)
-    {
-        $args = \pinpoint_get_func_ref_args();
-        return $this->profiler(__FUNCTION__,$args);
-    }
-
-    public function fetchAll($how = PDO::FETCH_CLASS, $class_name = null, $ctor_args = null)
-    {
-        $args = \pinpoint_get_func_ref_args();
-        return $this->profiler(__FUNCTION__,$args);
-    }
-
-    public function fetchColumn($column_number = 0)
-    {
-       $args = \pinpoint_get_func_ref_args();
-       return $this->profiler(__FUNCTION__,$args);
-    }
-
-    public function fetchObject($class_name = "stdClass", $ctor_args = null)
-    {
-       $args = \pinpoint_get_func_ref_args();
-       return $this->profiler(__FUNCTION__,$args);
-    }
-
-    public function getAttribute($attribute)
-    {
-       $args = \pinpoint_get_func_ref_args();
-       return $this->profiler(__FUNCTION__,$args);
-    }
-
-    public function getColumnMeta($column)
-    {
-       $args = \pinpoint_get_func_ref_args();
-       return $this->profiler(__FUNCTION__,$args);
-    }
-
-    public function nextRowset()
-    {
-       $args = \pinpoint_get_func_ref_args();
-       return $this->profiler(__FUNCTION__,$args);
-    }
-
-    public function rowCount()
-    {
-       $args = \pinpoint_get_func_ref_args();
-       return $this->profiler(__FUNCTION__,$args);
-    }
-
-    public function setAttribute($attribute, $value)
-    {
-       $args = \pinpoint_get_func_ref_args();
-       return $this->profiler(__FUNCTION__,$args);
-    }
-
-    public function setFetchMode($mode,$parames=null)
-    {
-       $args = \pinpoint_get_func_ref_args();
-       return $this->profiler(__FUNCTION__,$args);
-    }
-
-
-    public function bindParam ($parameter, &$variable, $data_type = PDO::PARAM_STR, $length = null, $driver_options = null)
-    {
-       $args = \pinpoint_get_func_ref_args();
-       return $this->profiler(__FUNCTION__,$args);
-    }
-
-    public function bindColumn ($column, &$param, $type = null, $maxlen = null, $driverdata = null)
-    {
-       $args = \pinpoint_get_func_ref_args();
-       return $this->profiler(__FUNCTION__,$args);
-    }
-
-    private function profiler($name,&$arguments)
-    {
-        if(!in_array($name ,$this->_name_list))
-        {
-            return call_user_func_array([$this->_instance,$name],$arguments);
-        }else{
-            try{
-                $this->name = "PDOStatement::".$name;
-                $this->args = &$arguments;
-                $this->onBefore();
-                $ret = call_user_func_array([$this->_instance,$name],$arguments);
-                $this->onEnd($ret);
-                return $ret;
-            }catch (\Exception $e){
-                $this->onException($e);
-                $ret = null;
-                $this->onEnd($ret);
-                throw $e;
-            }
-        }
-
-    }
-
-}
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Sys/RdKafka/ProducePlugin.php b/plugins/PHP/Plugins/Sys/RdKafka/ProducePlugin.php
deleted file mode 100644
index 976800d19..000000000
--- a/plugins/PHP/Plugins/Sys/RdKafka/ProducePlugin.php
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-/*
- * User: eeliu
- * Date: 11/6/20
- * Time: 4:54 PM
- */
-
-namespace Plugins\Sys\RdKafka;
-
-
-use Plugins\Common\Candy;
-
-class ProducePlugin extends Candy
-{
-
-    function onBefore()
-    {
-        $blocker_list = $this->who->blocker_list;
-        $topic = $this->who->topic;
-        pinpoint_add_clue(PP_SERVER_TYPE,PP_KAFKA);
-        pinpoint_add_clues(PP_KAFKA_TOPIC,$topic);
-        pinpoint_add_clue(PP_DESTINATION,$blocker_list);
-    }
-
-    function onEnd(&$ret)
-    {
-        // TODO: Implement onEnd() method.
-    }
-}
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Sys/RdKafka/Producer.php b/plugins/PHP/Plugins/Sys/RdKafka/Producer.php
deleted file mode 100644
index fc243f98c..000000000
--- a/plugins/PHP/Plugins/Sys/RdKafka/Producer.php
+++ /dev/null
@@ -1,24 +0,0 @@
-<?php
-/*
- * User: eeliu
- * Date: 11/6/20
- * Time: 11:02 AM
- */
-
-namespace Plugins\Sys\RdKafka;
-
-class Producer extends \RdKafka\Producer
-{
-    public $blocker_list;
-    public function addBrokers($blocker_list)
-    {
-        $this->blocker_list = $blocker_list;
-        return parent::addBrokers($blocker_list);
-    }
-
-    public  function newTopic($topic,$topic_conf=NULL)
-    {
-        return new ProfilerNewTopic(parent::newTopic($topic,$topic_conf),$this->blocker_list,$topic);
-    }
-
-}
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Sys/RdKafka/ProfilerNewTopic.php b/plugins/PHP/Plugins/Sys/RdKafka/ProfilerNewTopic.php
deleted file mode 100644
index 7cf256376..000000000
--- a/plugins/PHP/Plugins/Sys/RdKafka/ProfilerNewTopic.php
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-/*
- * User: eeliu
- * Date: 11/6/20
- * Time: 4:55 PM
- */
-
-namespace Plugins\Sys\RdKafka;
-
-
-class ProfilerNewTopic
-{
-    protected $_instance;
-    public $blocker_list;
-    public $topic;
-    public function __construct($instance,$blocker_list,$topic)
-    {
-        $this->_instance = &$instance;
-        $this->blocker_list = $blocker_list;
-        $this->topic = $topic;
-    }
-
-    public function __call($name, $arguments)
-    {
-        return call_user_func_array([$this->_instance,$name],$arguments);
-    }
-
-    public function produce($partition,$msgflags,$payload,$key=null)
-    {
-        $param = \pinpoint_get_func_ref_args();
-
-        $plugin = new ProducePlugin("Topic::produce",$this,$param);
-        try{
-            $plugin->onBefore();
-            $ret =  call_user_func_array([$this->_instance,'produce'],$param);
-            $plugin->onEnd($ret);
-            return $ret;
-        }catch (\Exception $e)
-        {
-            $plugin->onException($e);
-        }
-    }
-}
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Sys/curl/CurlExecPlugin.php b/plugins/PHP/Plugins/Sys/curl/CurlExecPlugin.php
deleted file mode 100644
index 0f07a3bc2..000000000
--- a/plugins/PHP/Plugins/Sys/curl/CurlExecPlugin.php
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-/******************************************************************************
- * Copyright 2020 NAVER Corp.                                                 *
- *                                                                            *
- * Licensed under the Apache License, Version 2.0 (the "License");            *
- * you may not use this file except in compliance with the License.           *
- * You may obtain a copy of the License at                                    *
- *                                                                            *
- *     http://www.apache.org/licenses/LICENSE-2.0                             *
- *                                                                            *
- * Unless required by applicable law or agreed to in writing, software        *
- * distributed under the License is distributed on an "AS IS" BASIS,          *
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
- * See the License for the specific language governing permissions and        *
- * limitations under the License.                                             *
- ******************************************************************************/
-
-namespace Plugins\Sys\curl;
-
-use Plugins\Common\Candy;
-
-class CurlExecPlugin extends Candy
-{
-
-    function onBefore()
-    {
-
-    }
-
-    function onEnd(&$url)
-    {
-        pinpoint_add_clue(PP_DESTINATION, CurlUtil::getHostFromURL($url));
-        pinpoint_add_clue(PP_SERVER_TYPE,PP_PHP_REMOTE);
-        pinpoint_add_clue(PP_NEXT_SPAN_ID,pinpoint_get_context(PP_NEXT_SPAN_ID));
-        pinpoint_add_clues(PP_HTTP_URL,$url);
-        $code = curl_getinfo($this->args[0],CURLINFO_HTTP_CODE);
-        if($code == 404){
-            pinpoint_add_clue(PP_ADD_EXCEPTION," 404 file not found");
-        }
-        pinpoint_add_clues(PP_HTTP_STATUS_CODE,$code);
-
-    }
-
-    function onException($e)
-    {
-
-    }
-}
diff --git a/plugins/PHP/Plugins/Sys/curl/CurlUtil.php b/plugins/PHP/Plugins/Sys/curl/CurlUtil.php
deleted file mode 100644
index a60b43563..000000000
--- a/plugins/PHP/Plugins/Sys/curl/CurlUtil.php
+++ /dev/null
@@ -1,121 +0,0 @@
-<?php
-/******************************************************************************
- * Copyright 2020 NAVER Corp.                                                 *
- *                                                                            *
- * Licensed under the Apache License, Version 2.0 (the "License");            *
- * you may not use this file except in compliance with the License.           *
- * You may obtain a copy of the License at                                    *
- *                                                                            *
- *     http://www.apache.org/licenses/LICENSE-2.0                             *
- *                                                                            *
- * Unless required by applicable law or agreed to in writing, software        *
- * distributed under the License is distributed on an "AS IS" BASIS,          *
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
- * See the License for the specific language governing permissions and        *
- * limitations under the License.                                             *
- ******************************************************************************/
-namespace Plugins\Sys\curl;
-use Plugins\Util\Trace;
-
-class CurlUtil
-{
-//    public static function appendPinpointHeader($ch, &$headers)
-//    {
-//        if(pinpoint_get_context('Pinpoint-Sampled')==PP_NOT_SAMPLED){
-//            $headers[] = 'Pinpoint-Sampled:s0';
-//            return ;
-//        }
-//
-//        $headers[] ='Pinpoint-Sampled:s1';
-//        $headers[] ='Pinpoint-Flags:0';
-//        $headers[] ='Pinpoint-Papptype:1500';
-//        $headers[] ='Pinpoint-Pappname:'.APPLICATION_NAME;
-//
-//        $headers[] = 'Pinpoint-Host:'.static::getHostFromURL(curl_getinfo($ch,CURLINFO_EFFECTIVE_URL));
-//
-//        $headers[] ='Pinpoint-Traceid:'.pinpoint_get_context(PP_TRANSCATION_ID);
-//        $headers[] ='Pinpoint-Pspanid:'.pinpoint_get_context(PP_SPAN_ID);
-//        $nsid =  Trace::generateSpanID();
-//        $headers[] ='Pinpoint-Spanid:'.$nsid;
-//        pinpoint_set_context(PP_NEXT_SPAN_ID, (string)$nsid);
-//    }
-
-    public static function getPinpointHeader($url)
-    {
-        if(pinpoint_get_context('Pinpoint-Sampled')==PP_NOT_SAMPLED){
-            return ["Pinpoint-Sampled:s0"];
-        }
-
-        $nsid = Trace::generateSpanID();
-        $header = [
-            'Pinpoint-Sampled:s1',
-            'Pinpoint-Flags:0',
-            'Pinpoint-Papptype:1500',
-            'Pinpoint-Pappname:'.APPLICATION_NAME,
-            'Pinpoint-Host:'.  static::getHostFromURL($url),
-            'Pinpoint-Traceid:'.pinpoint_get_context(PP_TRANSCATION_ID),
-            'Pinpoint-Pspanid:'.pinpoint_get_context(PP_SPAN_ID),
-            'Pinpoint-Spanid:'.$nsid
-        ];
-        pinpoint_set_context(PP_NEXT_SPAN_ID, (string)$nsid);
-        return $header;
-    }
-
-    // for GuzzleHttp header
-    public static function getPPHeader($url)
-    {
-        if(pinpoint_get_context('Pinpoint-Sampled')==PP_NOT_SAMPLED){
-            return ["Pinpoint-Sampled"=>"s0"];
-        }
-
-        $nsid = Trace::generateSpanID();
-        $header = [
-            'Pinpoint-Sampled'=>'s1',
-            'Pinpoint-Flags'=>'0',
-            'Pinpoint-Papptype'=>'1500',
-            'Pinpoint-Pappname'=>APPLICATION_NAME,
-            'Pinpoint-Host'=>static::getHostFromURL($url),
-            'Pinpoint-Traceid'=>pinpoint_get_context(PP_TRANSCATION_ID),
-            'Pinpoint-Pspanid'=>pinpoint_get_context(PP_SPAN_ID),
-            'Pinpoint-Spanid'=>$nsid
-        ];
-        pinpoint_set_context(PP_NEXT_SPAN_ID, (string)$nsid);
-        return $header;
-    }
-
-    /**
-     *
-     * url is very funny
-     * example.com
-     * www.example.com:8000
-     * www.example.com
-     * http://www.example.com
-     *  total must be accept
-     *
-     * @param string $url
-     * @return string
-     */
-    public static function getHostFromURL(string $url)
-    {
-        $urlAr   = parse_url($url);
-        $retUrl = '';
-
-        if(isset($urlAr['host'])) // got the host and return
-        {
-            $retUrl.=$urlAr['host'];
-        }
-
-        if(isset($urlAr['path']))
-        {
-            $retUrl.= $urlAr['path'];
-        }
-
-        if(isset($urlAr['port'])) // an optional setting
-        {
-            $retUrl .= ":".$urlAr['port'];
-        }
-
-        return $retUrl;
-    }
-
-}
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Sys/curl/curl.php b/plugins/PHP/Plugins/Sys/curl/curl.php
deleted file mode 100644
index 467fc795d..000000000
--- a/plugins/PHP/Plugins/Sys/curl/curl.php
+++ /dev/null
@@ -1,106 +0,0 @@
-<?php
-/******************************************************************************
- * Copyright 2020 NAVER Corp.                                                 *
- *                                                                            *
- * Licensed under the Apache License, Version 2.0 (the "License");            *
- * you may not use this file except in compliance with the License.           *
- * You may obtain a copy of the License at                                    *
- *                                                                            *
- *     http://www.apache.org/licenses/LICENSE-2.0                             *
- *                                                                            *
- * Unless required by applicable law or agreed to in writing, software        *
- * distributed under the License is distributed on an "AS IS" BASIS,          *
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
- * See the License for the specific language governing permissions and        *
- * limitations under the License.                                             *
- ******************************************************************************/
-namespace Plugins\Sys\curl;
-
-static $curlChAr= [];
-const CH_URL="url";
-const CH_HEADRR="header";
-function curl_init($url = null)
-{
-    $ch = \curl_init($url);
-    global $curlChAr;
-    if($url){
-        $curlChAr[strval($ch)] = [CH_URL=>$url,CH_HEADRR=>[]];
-    }else{
-        $curlChAr[strval($ch)] = [CH_URL=>"",CH_HEADRR=>[]];
-    }
-    return $ch;
-}
-
-
-function curl_setopt($ch, $option, $value)
-{
-    if($option == CURLOPT_HTTPHEADER)
-    {
-        global $curlChAr;
-        $curlChAr[strval($ch)][CH_HEADRR] = $value;
-
-    }elseif ($option == CURLOPT_URL ){
-        global $curlChAr;
-        $curlChAr[strval($ch)][CH_URL]=$value;
-    }
-
-    return \curl_setopt($ch, $option, $value);
-}
-
-function curl_setopt_array($ch, array $options)
-{
-    global $curlChAr;
-    if(isset($options[CURLOPT_URL]))
-    {
-
-        $curlChAr[strval($ch)][CH_URL] = $options[CURLOPT_URL];
-    }
-
-    if(isset($options[CURLOPT_HTTPHEADER]))
-    {
-
-        $curlChAr[strval($ch)][CH_HEADRR] = $options[CURLOPT_HTTPHEADER];
-    }
-
-    return \curl_setopt_array($ch,$options);
-}
-
-
-function set_pinpoint_header($ch,$url,$userHeader)
-{
-    $ppHeader = CurlUtil::getPinpointHeader($url);
-    $header= array_merge($userHeader,$ppHeader);
-    \curl_setopt($ch,CURLOPT_HTTPHEADER,$header);
-}
-
-
-function curl_exec($ch)
-{
-    global $curlChAr;
-    $chAr= $curlChAr[strval($ch)];
-    $plugin = new CurlExecPlugin('curl_exec', null, $ch);
-    try {
-        $plugin->onBefore();
-        set_pinpoint_header($ch,$chAr[CH_URL],$chAr[CH_HEADRR]);
-        $ret= \curl_exec($ch);
-        $plugin->onEnd($chAr[CH_URL]);
-        return $ret;
-    } catch (\Exception $e) {
-        $plugin->onException($e);
-        throw $e;
-    }
-}
-
-function curl_close($ch)
-{
-    global $curlChAr;
-    unset($curlChAr[strval($ch)] );
-    \curl_close($ch);
-}
-
-function curl_reset($ch)
-{
-    global $ch_arr;
-    $ch_arr[strval($ch)] = [];
-    \curl_reset($ch);
-}
diff --git a/plugins/PHP/Plugins/Sys/date/date.php b/plugins/PHP/Plugins/Sys/date/date.php
deleted file mode 100644
index f225957d0..000000000
--- a/plugins/PHP/Plugins/Sys/date/date.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-/******************************************************************************
- * Copyright 2020 NAVER Corp.                                                 *
- *                                                                            *
- * Licensed under the Apache License, Version 2.0 (the "License");            *
- * you may not use this file except in compliance with the License.           *
- * You may obtain a copy of the License at                                    *
- *                                                                            *
- *     http://www.apache.org/licenses/LICENSE-2.0                             *
- *                                                                            *
- * Unless required by applicable law or agreed to in writing, software        *
- * distributed under the License is distributed on an "AS IS" BASIS,          *
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
- * See the License for the specific language governing permissions and        *
- * limitations under the License.                                             *
- ******************************************************************************/
-namespace Plugins\Sys\date;
-use Plugins\Common\CommonPlugin;
-
-function date () {
-    $args = \pinpoint_get_func_ref_args();
-
-    $plugins = new CommonPlugin('date', null, $args);
-    try {
-        $plugins->onBefore();
-        $ret = call_user_func_array('date', $args);
-        $plugins->onEnd($ret);
-        return $ret;
-    } catch (\Exception $e) {
-        $plugins->onException($e);
-        throw $e;
-    }
-
-}
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Sys/mysqli/MysqliPreparePlugin.php b/plugins/PHP/Plugins/Sys/mysqli/MysqliPreparePlugin.php
deleted file mode 100644
index 7c88cf303..000000000
--- a/plugins/PHP/Plugins/Sys/mysqli/MysqliPreparePlugin.php
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-
-namespace Plugins\Sys\mysqli;
-
-
-use Plugins\Common\Candy;
-
-class MysqliPreparePlugin extends Candy
-{
-    function onBefore()
-    {
-        $myqli = $this->who;
-        pinpoint_add_clue(PP_SERVER_TYPE,PP_MYSQL);
-        pinpoint_add_clue(PP_SQL_FORMAT, $this->args[0]);
-        pinpoint_add_clue(PP_DESTINATION,$myqli->host_info);
-    }
-
-    function onEnd(&$ret)
-    {
-        $origin = $ret;
-        $ret = new ProfilerMysqli_Stmt($origin);
-    }
-}
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Sys/mysqli/MysqliQueryPlugin.php b/plugins/PHP/Plugins/Sys/mysqli/MysqliQueryPlugin.php
deleted file mode 100644
index de297e45e..000000000
--- a/plugins/PHP/Plugins/Sys/mysqli/MysqliQueryPlugin.php
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php
-/******************************************************************************
- * Copyright 2020 NAVER Corp.                                                 *
- *                                                                            *
- * Licensed under the Apache License, Version 2.0 (the "License");            *
- * you may not use this file except in compliance with the License.           *
- * You may obtain a copy of the License at                                    *
- *                                                                            *
- *     http://www.apache.org/licenses/LICENSE-2.0                             *
- *                                                                            *
- * Unless required by applicable law or agreed to in writing, software        *
- * distributed under the License is distributed on an "AS IS" BASIS,          *
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
- * See the License for the specific language governing permissions and        *
- * limitations under the License.                                             *
- ******************************************************************************/
-namespace Plugins\Sys\mysqli;
-
-
-use Plugins\Common\Candy;
-
-class MysqliQueryPlugin extends Candy
-{
-
-    function onBefore()
-    {
-        $myqli = $this->who;
-        pinpoint_add_clue(PP_SERVER_TYPE,PP_MYSQL);
-        pinpoint_add_clue(PP_SQL_FORMAT,$this->args[0]);
-        pinpoint_add_clue(PP_DESTINATION,$myqli->host_info);
-    }
-
-    function onEnd(&$ret)
-    {
-
-    }
-}
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Sys/mysqli/ProfilerMysqliResult.php b/plugins/PHP/Plugins/Sys/mysqli/ProfilerMysqliResult.php
deleted file mode 100644
index d721c6b69..000000000
--- a/plugins/PHP/Plugins/Sys/mysqli/ProfilerMysqliResult.php
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
-
-namespace Plugins\Sys\mysqli;
-
-class ProfilerMysqliResult
-{
-    protected $_instance;
-    public function __construct(&$instance)
-    {
-        $this->_instance = &$instance;
-    }
-
-    public function __call($name, $arguments)
-    {
-        return call_user_func_array([&$this->_instance,$name],$arguments);
-    }
-
-}
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Sys/mysqli/ProfilerMysqli_Stmt.php b/plugins/PHP/Plugins/Sys/mysqli/ProfilerMysqli_Stmt.php
deleted file mode 100644
index c8d9c3647..000000000
--- a/plugins/PHP/Plugins/Sys/mysqli/ProfilerMysqli_Stmt.php
+++ /dev/null
@@ -1,53 +0,0 @@
-<?php
-/*
- * User: eeliu
- * Date: 11/5/20
- * Time: 5:32 PM
- */
-
-namespace Plugins\Sys\mysqli;
-
-
-class ProfilerMysqli_Stmt
-{
-    protected $_instance;
-    public function __construct(&$instance)
-    {
-        $this->_instance = &$instance;
-    }
-
-    public function __call($name, $arguments)
-    {
-        return call_user_func_array([&$this->_instance,$name],$arguments);
-    }
-
-    public function bind_param ($types, &$var1, &...$_)
-    {
-        $param = \pinpoint_get_func_ref_args();
-        return call_user_func_array([$this->_instance,'bind_param'],$param);
-
-    }
-
-    public function bind_result (&$var1, &...$_)
-    {
-        $param = \pinpoint_get_func_ref_args();
-        return call_user_func_array([$this->_instance,'bind_result'],$param);
-    }
-
-    public function execute()
-    {
-        $plugin = new StmtExecutePlugin("Stmt::execute",$this);
-        try{
-            $plugin->onBefore();
-            $ret =  call_user_func_array([$this->_instance,'execute'],[]);
-            $plugin->onEnd($ret);
-            return $ret;
-
-        }catch (\Exception $e)
-        {
-            $plugin->onException($e);
-        }
-    }
-
-
-}
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Sys/mysqli/StmtExecutePlugin.php b/plugins/PHP/Plugins/Sys/mysqli/StmtExecutePlugin.php
deleted file mode 100644
index b18336407..000000000
--- a/plugins/PHP/Plugins/Sys/mysqli/StmtExecutePlugin.php
+++ /dev/null
@@ -1,25 +0,0 @@
-<?php
-/*
- * User: eeliu
- * Date: 11/5/20
- * Time: 5:39 PM
- */
-
-namespace Plugins\Sys\mysqli;
-
-
-use Plugins\Common\Candy;
-
-class StmtExecutePlugin extends Candy
-{
-
-    function onBefore()
-    {
-        // TODO: Implement onBefore() method.
-    }
-
-    function onEnd(&$ret)
-    {
-        // TODO: Implement onEnd() method.
-    }
-}
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Sys/mysqli/mysqli.php b/plugins/PHP/Plugins/Sys/mysqli/mysqli.php
deleted file mode 100644
index e77e7eb9f..000000000
--- a/plugins/PHP/Plugins/Sys/mysqli/mysqli.php
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php
-/******************************************************************************
- * Copyright 2020 NAVER Corp.                                                 *
- *                                                                            *
- * Licensed under the Apache License, Version 2.0 (the "License");            *
- * you may not use this file except in compliance with the License.           *
- * You may obtain a copy of the License at                                    *
- *                                                                            *
- *     http://www.apache.org/licenses/LICENSE-2.0                             *
- *                                                                            *
- * Unless required by applicable law or agreed to in writing, software        *
- * distributed under the License is distributed on an "AS IS" BASIS,          *
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
- * See the License for the specific language governing permissions and        *
- * limitations under the License.                                             *
- ******************************************************************************/
-namespace Plugins\Sys\mysqli;
-
-class Mysqli extends \mysqli
-{
-    public function prepare ($query)
-    {
-        $plugin = new MysqliPreparePlugin("Mysqli::prepare",$this,$query);
-        try{
-            $plugin->onBefore();
-            $ret = parent::prepare($query);
-            $plugin->onEnd($ret);
-            return $ret;
-
-        }catch (\Exception $e)
-        {
-            $plugin->onException($e);
-        }
-    }
-
-    public function query ($query, $resultmode = MYSQLI_STORE_RESULT)
-    {
-        $plugin = new MysqliQueryPlugin("Mysqli::query",$this,$query, $resultmode);
-        try{
-            $plugin->onBefore();
-            $ret = parent::query($query,$resultmode);
-            $plugin->onEnd($ret);
-            return $ret;
-//            return  new ProfilerMysqliResult($ret);
-
-        }catch (\Exception $e)
-        {
-            $plugin->onException($e);
-        }
-    }
-}
-
-function mysqli_init() {
-    return new Mysqli();
-}
diff --git a/plugins/PHP/Plugins/Sys/phpredis/ConnectPlugin.php b/plugins/PHP/Plugins/Sys/phpredis/ConnectPlugin.php
deleted file mode 100644
index 291016ac7..000000000
--- a/plugins/PHP/Plugins/Sys/phpredis/ConnectPlugin.php
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-/*
- * User: eeliu
- * Date: 11/5/20
- * Time: 4:18 PM
- */
-
-namespace Plugins\Sys\phpredis;
-
-
-use Plugins\Common\Candy;
-
-class ConnectPlugin extends  Candy
-{
-
-    function onBefore()
-    {
-        $host = $this->args[0];
-        $port = $this->args[1];
-        pinpoint_add_clue(PP_SERVER_TYPE,PP_REDIS);
-        pinpoint_add_clue(PP_DESTINATION,"$host:$port");
-    }
-
-    function onEnd(&$ret)
-    {
-        // TODO: Implement onEnd() method.
-    }
-}
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Sys/phpredis/GetPlugin.php b/plugins/PHP/Plugins/Sys/phpredis/GetPlugin.php
deleted file mode 100644
index 0c0dfd01c..000000000
--- a/plugins/PHP/Plugins/Sys/phpredis/GetPlugin.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-/*
- * User: eeliu
- * Date: 11/5/20
- * Time: 4:32 PM
- */
-
-namespace Plugins\Sys\phpredis;
-
-
-use Plugins\Common\Candy;
-
-class GetPlugin extends Candy
-{
-
-    function onBefore()
-    {
-        $key = $this->args[0];
-        pinpoint_add_clue(PP_SERVER_TYPE,PP_REDIS);
-        pinpoint_add_clues(PP_PHP_ARGS,"$key");
-    }
-
-    function onEnd(&$ret)
-    {
-        // TODO: Implement onEnd() method.
-    }
-}
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Sys/phpredis/Redis.php b/plugins/PHP/Plugins/Sys/phpredis/Redis.php
deleted file mode 100644
index 31f9875f0..000000000
--- a/plugins/PHP/Plugins/Sys/phpredis/Redis.php
+++ /dev/null
@@ -1,61 +0,0 @@
-<?php
-/*
- * User: eeliu
- * Date: 11/5/20
- * Time: 4:17 PM
- */
-
-namespace Plugins\Sys\phpredis;
-
-
-class Redis extends \Redis
-{
-    public function connect( $host, $port = 6379, $timeout = 0.0, $reserved = null, $retry_interval = 0 )
-    {
-        $p = new ConnectPlugin("Redis::".__FUNCTION__,$this,$host, $port, $timeout, $reserved, $retry_interval);
-        try{
-            $p->onBefore();
-            $r = parent::connect($host, $port, $timeout, $reserved, $retry_interval);
-            $p->onEnd($r);
-            return $r;
-        }catch (\Exception $e)
-        {
-            $p->onException($e);
-            throw $e;
-        }
-
-    }
-
-    public function get( $key )
-    {
-        $p = new GetPlugin("Redis::".__FUNCTION__,$this,$key);
-        try{
-            $p->onBefore();
-            $r = parent::get($key);
-            $p->onEnd($r);
-            return $r;
-        }catch (\Exception $e)
-        {
-            $p->onException($e);
-            throw $e;
-        }
-    }
-
-    public function set($key, $value, $timeout = null)
-    {
-
-        $p = new SetPlugin("Redis::".__FUNCTION__,$this,$key, $value, $timeout);
-        try{
-            $p->onBefore();
-            $r = parent::set($key, $value, $timeout);
-            $p->onEnd($r);
-            return $r;
-        }catch (\Exception $e)
-        {
-            $p->onException($e);
-            throw $e;
-        }
-
-    }
-
-}
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Sys/phpredis/SetPlugin.php b/plugins/PHP/Plugins/Sys/phpredis/SetPlugin.php
deleted file mode 100644
index 0b25740d5..000000000
--- a/plugins/PHP/Plugins/Sys/phpredis/SetPlugin.php
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-/*
- * User: eeliu
- * Date: 11/5/20
- * Time: 4:32 PM
- */
-
-namespace Plugins\Sys\phpredis;
-
-
-use Plugins\Common\Candy;
-
-class SetPlugin extends Candy
-{
-
-    function onBefore()
-    {
-        $key = $this->args[0];
-        $value = $this->args[1];
-        pinpoint_add_clue(PP_SERVER_TYPE,PP_REDIS);
-        pinpoint_add_clues(PP_PHP_ARGS,"$key:$value");
-    }
-
-    function onEnd(&$ret)
-    {
-        // TODO: Implement onEnd() method.
-    }
-}
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/Util/Trace.php b/plugins/PHP/Plugins/Util/Trace.php
deleted file mode 100644
index 094c44b2c..000000000
--- a/plugins/PHP/Plugins/Util/Trace.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-/******************************************************************************
- * Copyright 2020 NAVER Corp.                                                 *
- *                                                                            *
- * Licensed under the Apache License, Version 2.0 (the "License");            *
- * you may not use this file except in compliance with the License.           *
- * You may obtain a copy of the License at                                    *
- *                                                                            *
- *     http://www.apache.org/licenses/LICENSE-2.0                             *
- *                                                                            *
- * Unless required by applicable law or agreed to in writing, software        *
- * distributed under the License is distributed on an "AS IS" BASIS,          *
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
- * See the License for the specific language governing permissions and        *
- * limitations under the License.                                             *
- ******************************************************************************/
-namespace Plugins\Util;
-
-class Trace{
-
-    public static function generateSpanID()
-    {
-        try {
-            return mt_rand();
-        } catch (\Exception $e) {
-            return rand();
-        }
-    }
-
-}
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/__init__.php b/plugins/PHP/Plugins/__init__.php
deleted file mode 100644
index d874a17bd..000000000
--- a/plugins/PHP/Plugins/__init__.php
+++ /dev/null
@@ -1,31 +0,0 @@
-<?php
-/******************************************************************************
- * Copyright 2020 NAVER Corp.                                                 *
- *                                                                            *
- * Licensed under the Apache License, Version 2.0 (the "License");            *
- * you may not use this file except in compliance with the License.           *
- * You may obtain a copy of the License at                                    *
- *                                                                            *
- *     http://www.apache.org/licenses/LICENSE-2.0                             *
- *                                                                            *
- * Unless required by applicable law or agreed to in writing, software        *
- * distributed under the License is distributed on an "AS IS" BASIS,          *
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
- * See the License for the specific language governing permissions and        *
- * limitations under the License.                                             *
- ******************************************************************************/
-require_once "Common/PluginsDefines.php";
-
-// intercept all date_xxxx, part of php core
-require_once "Sys/date/date.php";
-
-// intercept all curl_xxxx, if curl extension is available
-if (function_exists('curl_exec'))
-{
-    require_once "Sys/curl/curl.php";
-}
-
-if (function_exists('mysqli_connect'))
-{
-    require_once "Sys/mysqli/mysqli.php";
-}
\ No newline at end of file
diff --git a/plugins/PHP/Plugins/composer.json b/plugins/PHP/Plugins/composer.json
deleted file mode 100644
index c3e289589..000000000
--- a/plugins/PHP/Plugins/composer.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
-	"autoload": {
-        "psr-4": {
-          "Plugins\\":"Plugins/"
-        }
-    },
-    "require": {
-
-        "pinpoint-apm/pinpoint-php-aop": "v2.0.1"
-    }
-}
diff --git a/plugins/PHP/Readme.md b/plugins/PHP/Readme.md
index 51e5de34a..e684d07ba 100644
--- a/plugins/PHP/Readme.md
+++ b/plugins/PHP/Readme.md
@@ -1,34 +1,77 @@
-## How to use?
+# welcome to use pinpoint-php
+## How to write your own plugins 
 
-## app
-Goto [app](../../testapps/PHP)
+### Tutorial
 
-### EasySwoole/Swoole
-Goto [pinpoint-in-swoole](https://github.com/eeliu/pinpoint-in-swoole)
+1. First, you need to know how to use [ pinpoint-php-aop ☚](https://github.com/pinpoint-apm/pinpoint-php-aop) and how it works. 
+2. Write your own XXXPlugin.php class.
+   
+   ```php
+    use Pinpoint\Plugins\Common\PinTrace;
+    class XXXPlugins extends PinTrace
+    {
+        public function onBefore(){
+            pinpoint_add_clue("stp",PHP_METHOD);
+            pinpoint_add_clues(PHP_ARGS,"fetch data from $this->args");
+        }
 
-### Workerman [experimentation]
-Goto [pinpoint-in-workerman](https://github.com/eeliu/pinpoint-in-workerman)
+        public function onEnd(&$ret){
+            pinpoint_add_clues(PHP_RETURN,"parse data from $ret");
+        }
 
-### CakePHP
-Goto [pinpoint-in-cakephp](https://github.com/eeliu/pinpoint-in-cakephp)
+        public function onException($e){
+            pinpoint_add_clue("EXP",$e->getMessage());
+        }
+    }
+   ```
+   > You could find some out of box plugins in [[Plugins Example](../../testapp/PHP/Plugins/AutoGen/app)].
+    When you add clue(clues), DO NOT assignment with large string or string included some special characters(https://www.freeformatter.com/json-escape.html)
+3. Add the function that you care about such as "///@hook:app\User::adduser" before ClassName(XXXPlugins), onBefore, onEnd or onException. If you care about all cases, please call before&after&around function.
 
-### yii2
-Goto [pinpoint-in-yii2](https://github.com/eeliu/pinpoint-in-yii2)
+4. Remove the "__class_index_table" file under AOP_CACHE_DIR.
 
-### ThinkPHP
+5. Copy your plugins files into source tree/plugins_dir, and add this directory into composer.json{"autoload"}.
+   
+    ```
+    "autoload": {
+            "psr-4": {
+                ......
+                "Plugins\\": "your source tree/plugins_dir"
+            }
+        },
+    ```
+    
+6. Update your autoload. $ composer update.
+7. Enjoy the pinpoint-php-aop.
+## Protocol
 
-Goto [pinpoint-in-thinkphp](https://github.com/eeliu/pinpoint-in-thinkphp)
+> Json -> Thrift/GRPC
 
-### Ci4
+```
+                   +------------------+
+                   |  php-fpm         |
+                   |  pinpoint_php.so |
+                   +------------------+
+                           |
+                json       |
+            unix:socket    |
+                           v
+                    +----------------+
+                    |collector-agent |
+                    |                |
+                    +----------------+
+                           |
+                           |    thrift TCP&UDP
+                           |    GRPC
+                           v
+                  +----------------------+
+                  |  pinpoint collector  |
+                  +----------------------+
 
-Goto [pinpoint-in-codeIgniter](https://github.com/eeliu/pinpoint-in-codeIgniter)
-
-### symfony
-Goto [pinpoint-in-symfony](https://github.com/eeliu/pinpoint-in-symfony)
-
-
-### laravel
-Goto [pinpoint-in-laravel](https://github.com/eeliu/pinpoint-in-laravel)
+```
 
+## API of Pinpoint_php_ext
+[Goto pinpoint_ext_api ☚](../../src/PHP/pinpoint_php_api.php)
 
 
+# 欢迎使用pinpoint-php 监控的你PHP应用
\ No newline at end of file
diff --git a/plugins/PHP/composer_example.json b/plugins/PHP/composer_example.json
deleted file mode 100644
index 9b88040b5..000000000
--- a/plugins/PHP/composer_example.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
-
-    "autoload": {
-        "psr-4": {
-
-            "Plugins\\":"Plugins/"
-        }
-    },
-    "require": {
-
-        "pinpoint-apm/pinpoint-php-aop": "v2.0.1"
-    }
-}
diff --git a/plugins/PY/Readme.md b/plugins/PY/Readme.md
deleted file mode 100644
index dac4baca3..000000000
--- a/plugins/PY/Readme.md
+++ /dev/null
@@ -1,116 +0,0 @@
-## How to use 
-### 1. Import your framework's entry file
-
-> export PYTHONPYTH="where's pinpoint-python-plugins"
-#### 1.1 Flask
-
-> include middleware
-
-```
-app = Flask(__name__)
-app.wsgi_app = PinPointMiddleWare(app,app.wsgi_app)
-```
-
-#### 1.2 Django
-
-> append into django middleware
-
-
-settings.py
-
-```python
-
-MIDDLEWARE = [
-    'pinpoint.Django.DjangoMiddleWare',
-    ...
-    ]
-
-```
-#### 1.3 Tornado
-
-```python
-from pinpoint.tornado  import RequestPlugin as PinpointHTTPRequestPlugins,\
-    CommonPlugin as PinpointCommonPlugin
-
-class MainHandler(tornado.web.RequestHandler):
-    @PinpointHTTPRequestPlugins('tornado.web.RequestHandler')
-    async def get(self):
-        await self.get_1()
-        self.write("Hello, world")
-
-    @PinpointCommonPlugin('get_1')
-    async def get_1(self,t = 2):
-        await gen.sleep(0.01)
-        if t == 0:
-            return
-        else:
-            t-=1
-            await self.get_1(t)
-```
-
-#### 1.4 pyramid
-
-> Add pinpoint_tween middleware
-
-```python
-
-    config = Configurator(settings=settings, root_factory="conduit.auth.RootFactory")
-    config.add_tween('pinpoint.pyramid.tween.pinpoint_tween')
-
-```
-
-Example [pinpoint-in-pyramid](https://github.com/eeliu/pinpoint-in-pyramid)
-
-#### 1.5 bottle
-
-> Loading pinpint.Bottle before application run
-
-Example [pinpoint-in-bottle](https://github.com/eeliu/pinpoint-in-bottle)
-
-#### 1.6 aiohttp
-
-Todo....
-
-#### 1.7 web.py
-
-> Add pinpoint middleware
-
-> Example [py-web](https://github.com/eeliu/pinpoint-in-pyweb)
-
-
-#### 1.8 web2.py (syn)
-
-> Add pinpoint middleware
-
-> Example [py-web2](https://github.com/eeliu/pinpoint-in-pyweb2)
-
-
-### 2. Configuration
-
- [settings.py](./pinpoint/settings.py)
-
-```
-###############################################################
-
-# 1. APP_ID: Agent ID.
-# 2. APP_NAME: Application name.
-# 3. COLLECTOR_HOST: Collector-Agent's address.
-# 4. pinpointPy.enable_debug(None): DEBUG agent, pinpoint infomation will print in concole. 
-
-APP_ID ='python-agent' # application id
-APP_NAME ='PYTHON-AGNNT' # application name
-# COLLECTOR_HOST='unix:/tmp/collector-agent.sock'
-COLLECTOR_HOST='tcp:dev-collector:9999'
-APP_SUB_ID='1'
-###############################################################
-pinpointPy.set_agent(collector_host=COLLECTOR_HOST,trace_limit=-1)
-pinpointPy.enable_debug(None) # None for console output
-# 
-# if you want to log the debug message from pinpointPy
-# def output(msg):
-#     logging.debug(msg)
-# pinpointPy.enable_debug(output) 
-# 
-
-```
-
diff --git a/plugins/PY/__init__.py b/plugins/PY/__init__.py
deleted file mode 100644
index cc06ab726..000000000
--- a/plugins/PY/__init__.py
+++ /dev/null
@@ -1,19 +0,0 @@
-# ******************************************************************************
-#   Copyright  2020. NAVER Corp.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# ******************************************************************************
-
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-# Created by eeliu at 2/4/21
\ No newline at end of file
diff --git a/plugins/PY/pinpoint/Django/BaseDjangoRequestPlugins.py b/plugins/PY/pinpoint/Django/BaseDjangoRequestPlugins.py
deleted file mode 100644
index 29b83c789..000000000
--- a/plugins/PY/pinpoint/Django/BaseDjangoRequestPlugins.py
+++ /dev/null
@@ -1,138 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-
-# ------------------------------------------------------------------------------
-#  Copyright  2020. NAVER Corp.                                                -
-#                                                                              -
-#  Licensed under the Apache License, Version 2.0 (the "License");             -
-#  you may not use this file except in compliance with the License.            -
-#  You may obtain a copy of the License at                                     -
-#                                                                              -
-#   http://www.apache.org/licenses/LICENSE-2.0                                 -
-#                                                                              -
-#  Unless required by applicable law or agreed to in writing, software         -
-#  distributed under the License is distributed on an "AS IS" BASIS,           -
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    -
-#  See the License for the specific language governing permissions and         -
-#  limitations under the License.                                              -
-# ------------------------------------------------------------------------------
-
-# Created by eeliu at 3/5/20
-
-from pinpoint.libs import monkey_patch_for_pinpoint
-monkey_patch_for_pinpoint()
-
-from pinpoint.common import *
-import pinpointPy
-
-class BaseDjangoRequestPlugins(Candy):
-    def __init__(self,name):
-        super().__init__(name)
-
-
-    def onBefore(self,*args, **kwargs):
-        super().onBefore(*args, **kwargs)
-        pinpointPy.add_clue(PP_APP_NAME,APP_NAME)
-        pinpointPy.add_clue(PP_APP_ID, APP_ID)
-        pinpointPy.set_context_key(PP_APP_NAME, APP_NAME)
-        ###############################################################
-        request = args[1]
-        headers = request.META
-
-        # assert isinstance(request,BaseHTTPRequestHandler)
-        pinpointPy.add_clue(PP_INTERCEPTOR_NAME, 'BaseDjangoRequest request')
-        pinpointPy.add_clue(PP_REQ_URI,request.path)
-        # print(headers)
-        pinpointPy.add_clue(PP_REQ_CLIENT,headers['REMOTE_ADDR'])
-        pinpointPy.add_clue(PP_REQ_SERVER,request.get_host())
-        pinpointPy.add_clue(PP_SERVER_TYPE,PYTHON)
-        pinpointPy.set_context_key(PP_SERVER_TYPE, PYTHON)
-        # nginx add http
-        if PP_HTTP_PINPOINT_PSPANID in headers:
-            pinpointPy.add_clue(PP_PARENT_SPAN_ID, headers[PP_HTTP_PINPOINT_PSPANID])
-
-        if PP_HTTP_PINPOINT_SPANID in headers:
-            self.sid = headers[PP_HTTP_PINPOINT_SPANID]
-        elif PP_HEADER_PINPOINT_SPANID in headers:
-            self.sid = headers[PP_HEADER_PINPOINT_SPANID]
-        else:
-            self.sid = generateSid()
-        pinpointPy.set_context_key(PP_SPAN_ID,self.sid)
-
-
-        if PP_HTTP_PINPOINT_TRACEID in headers:
-            self.tid = headers[PP_HTTP_PINPOINT_TRACEID]
-        elif PP_HEADER_PINPOINT_TRACEID in headers:
-            self.tid = headers[PP_HEADER_PINPOINT_TRACEID]
-        else:
-            self.tid = generateTid()
-        pinpointPy.set_context_key(PP_TRANSCATION_ID,self.tid)
-
-        if PP_HTTP_PINPOINT_PAPPNAME in headers:
-            self.pname = headers[PP_HTTP_PINPOINT_PAPPNAME]
-            pinpointPy.set_context_key(PP_PARENT_NAME,self.pname)
-            pinpointPy.add_clue(PP_PARENT_NAME,self.pname)
-
-        if PP_HTTP_PINPOINT_PAPPTYPE in headers:
-            self.ptype = headers[PP_HTTP_PINPOINT_PAPPTYPE]
-            pinpointPy.set_context_key(PP_PARENT_TYPE,self.ptype)
-            pinpointPy.add_clue(PP_PARENT_TYPE,self.ptype)
-
-        if PP_HTTP_PINPOINT_HOST in headers:
-            self.Ah = headers[PP_HTTP_PINPOINT_HOST]
-            pinpointPy.set_context_key(PP_PARENT_HOST, self.Ah)
-            pinpointPy.add_clue(PP_PARENT_HOST, self.Ah)
-
-        if PP_HTTP_PINPOINT_PSPANID in headers:
-            pinpointPy.add_clue(PP_PARENT_SPAN_ID, headers[PP_HTTP_PINPOINT_PSPANID])
-
-        if PP_HEADER_PINPOINT_PAPPNAME in headers:
-            self.pname = headers[PP_HEADER_PINPOINT_PAPPNAME]
-            pinpointPy.set_context_key(PP_PARENT_NAME, self.pname)
-            pinpointPy.add_clue(PP_PARENT_NAME, self.pname)
-
-        if PP_HEADER_PINPOINT_PAPPTYPE in headers:
-            self.ptype = headers[PP_HEADER_PINPOINT_PAPPTYPE]
-            pinpointPy.set_context_key(PP_PARENT_TYPE, self.ptype)
-            pinpointPy.add_clue(PP_PARENT_TYPE, self.ptype)
-
-        if PP_HEADER_PINPOINT_HOST in headers:
-            self.Ah = headers[PP_HEADER_PINPOINT_HOST]
-            pinpointPy.set_context_key(PP_PARENT_HOST, self.Ah)
-            pinpointPy.add_clue(PP_PARENT_HOST, self.Ah)
-
-        
-        if PP_NGINX_PROXY in headers:
-            pinpointPy.add_clue(PP_APACHE_PROXY,headers[PP_NGINX_PROXY])
-
-        if PP_APACHE_PROXY in headers:
-            pinpointPy.add_clue(PP_APACHE_PROXY,headers[PP_APACHE_PROXY])
-
-        pinpointPy.set_context_key(PP_HEADER_PINPOINT_SAMPLED, "s1")
-        if (PP_HTTP_PINPOINT_SAMPLED in headers and headers[PP_HTTP_PINPOINT_SAMPLED] == PP_NOT_SAMPLED) or pinpointPy.check_tracelimit():
-            pinpointPy.drop_trace()
-            pinpointPy.set_context_key(PP_HEADER_PINPOINT_SAMPLED, "s0")
-
-        pinpointPy.add_clue(PP_TRANSCATION_ID,self.tid)
-        pinpointPy.add_clue(PP_SPAN_ID,self.sid)
-        pinpointPy.set_context_key(PP_TRANSCATION_ID, self.tid)
-        pinpointPy.set_context_key(PP_SPAN_ID, self.sid)
-        pinpointPy.add_clues(PP_HTTP_METHOD,headers["REQUEST_METHOD"])
-
-        ###############################################################
-        return args, kwargs
-
-    def onEnd(self,ret):
-        ###############################################################
-        if ret:
-            pinpointPy.add_clues(PP_HTTP_STATUS_CODE, str(ret.status_code))
-        ###############################################################
-        super().onEnd(ret)
-        return ret
-
-    def onException(self, e):
-        pinpointPy.mark_as_error(str(e),"",0)
-        raise e
-
-
-
diff --git a/plugins/PY/pinpoint/Fastapi/AsyCommonPlugin.py b/plugins/PY/pinpoint/Fastapi/AsyCommonPlugin.py
deleted file mode 100644
index d4b721011..000000000
--- a/plugins/PY/pinpoint/Fastapi/AsyCommonPlugin.py
+++ /dev/null
@@ -1,56 +0,0 @@
-﻿# ------------------------------------------------------------------------------
-#  Copyright  2020. NAVER Corp.                                                -
-#                                                                              -
-#  Licensed under the Apache License, Version 2.0 (the "License");             -
-#  you may not use this file except in compliance with the License.            -
-#  You may obtain a copy of the License at                                     -
-#                                                                              -
-#   http://www.apache.org/licenses/LICENSE-2.0                                 -
-#                                                                              -
-#  Unless required by applicable law or agreed to in writing, software         -
-#  distributed under the License is distributed on an "AS IS" BASIS,           -
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    -
-#  See the License for the specific language governing permissions and         -
-#  limitations under the License.                                              -
-# ------------------------------------------------------------------------------
-
-
-from .AsyCommon import AsyCandy
-from pinpoint.common.Defines import *
-import pinpointPy
-
-class CommonPlugin(AsyCandy):
-
-    def onBefore(self,*args, **kwargs):
-        super().onBefore(*args, **kwargs)
-        ###############################################################
-        pinpointPy.add_clue(PP_INTERCEPTOR_NAME, self.getFuncUniqueName(), self.traceId)
-        pinpointPy.add_clue(PP_SERVER_TYPE, PP_REMOTE_METHOD, self.traceId)
-        arg = self.get_arg(*args, **kwargs)
-        pinpointPy.add_clues(PP_ARGS, arg, self.traceId)
-        ###############################################################
-        # print( threading.currentThread().ident)
-        return args,kwargs
-
-    def onEnd(self,ret):
-        ###############################################################
-        pinpointPy.add_clues(PP_RETURN, str(ret), self.traceId)
-        ###############################################################
-        super().onEnd(ret)
-        return ret
-
-    def onException(self, e):
-        pinpointPy.add_clue(PP_ADD_EXCEPTION, str(e), self.traceId)
-
-    def get_arg(self, *args, **kwargs):
-        args_tmp = {}
-        j = 0
-
-        for i in args:
-            args_tmp["arg["+str(j)+"]"] = (str(i))
-            j += 1
-
-        for k in kwargs:
-            args_tmp[k] = kwargs[k]
-
-        return str(args_tmp)
diff --git a/plugins/PY/pinpoint/Fastapi/AsyRequestPlugin.py b/plugins/PY/pinpoint/Fastapi/AsyRequestPlugin.py
deleted file mode 100644
index 59d923562..000000000
--- a/plugins/PY/pinpoint/Fastapi/AsyRequestPlugin.py
+++ /dev/null
@@ -1,127 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-
-# ------------------------------------------------------------------------------
-#  Copyright  2020. NAVER Corp.                                                -
-#                                                                              -
-#  Licensed under the Apache License, Version 2.0 (the "License");             -
-#  you may not use this file except in compliance with the License.            -
-#  You may obtain a copy of the License at                                     -
-#                                                                              -
-#   http://www.apache.org/licenses/LICENSE-2.0                                 -
-#                                                                              -
-#  Unless required by applicable law or agreed to in writing, software         -
-#  distributed under the License is distributed on an "AS IS" BASIS,           -
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    -
-#  See the License for the specific language governing permissions and         -
-#  limitations under the License.                                              -
-# ------------------------------------------------------------------------------
-
-
-
-
-from .AsyCommon import AsyCandy
-from pinpoint.common.Defines import *
-from pinpoint.common.Span import *
-import pinpointPy
-
-class AsyRequestPlugin(AsyCandy):
-    def __init__(self,name):
-        super().__init__(name)
-
-    def onBefore(self,*args, **kwargs):
-        super().onBefore(*args, **kwargs)
-        pinpointPy.add_clue(PP_APP_NAME, APP_NAME, self.traceId)
-        pinpointPy.add_clue(PP_APP_ID, APP_ID, self.traceId)
-        pinpointPy.set_context_key(PP_APP_NAME, APP_NAME, self.traceId)
-        ###############################################################
-        request = args[0]
-        # pinpointPy.add_clue(PP_INTERCEPTOR_NAME, 'tornado.web.RequestHandler',self.node_id)
-        # pinpointPy.add_clue(PP_REQ_URI, request.uri, self.traceId)
-        # pinpointPy.add_clue(PP_REQ_CLIENT, request.remote_ip, self.traceId)
-        # pinpointPy.add_clue(PP_REQ_SERVER, request.host_name, self.traceId)
-        pinpointPy.add_clue(PP_SERVER_TYPE, PYTHON, self.traceId)
-        pinpointPy.set_context_key(PP_SERVER_TYPE, PYTHON, self.traceId)
-
-        # nginx add http
-        if PP_HTTP_PINPOINT_PSPANID in request.headers:
-            pinpointPy.add_clue(PP_PARENT_SPAN_ID, request.headers[PP_HTTP_PINPOINT_PSPANID], self.traceId)
-        if PP_HTTP_PINPOINT_SPANID in request.headers:
-            self.sid = request.headers[PP_HTTP_PINPOINT_SPANID]
-        elif PP_HEADER_PINPOINT_SPANID in request.headers:
-            self.sid = request.headers[PP_HEADER_PINPOINT_SPANID]
-        else:
-            self.sid = generateSid()
-        pinpointPy.set_context_key(PP_SPAN_ID, self.sid, self.traceId)
-
-        if PP_HTTP_PINPOINT_TRACEID in request.headers:
-            self.tid = request.headers[PP_HTTP_PINPOINT_TRACEID]
-        elif PP_HEADER_PINPOINT_TRACEID in request.headers:
-            self.tid = request.headers[PP_HEADER_PINPOINT_TRACEID]
-        else:
-            self.tid = generateTid()
-        pinpointPy.set_context_key(PP_TRANSCATION_ID, self.tid, self.traceId)
-
-        if PP_HTTP_PINPOINT_PAPPNAME in request.headers:
-            self.pname = request.headers[PP_HTTP_PINPOINT_PAPPNAME]
-            pinpointPy.set_context_key(PP_PARENT_NAME, self.pname, self.traceId)
-            pinpointPy.add_clue(PP_PARENT_NAME, self.pname, self.traceId)
-
-        if PP_HTTP_PINPOINT_PAPPTYPE in request.headers:
-            self.ptype = request.headers[PP_HTTP_PINPOINT_PAPPTYPE]
-            pinpointPy.set_context_key(PP_PARENT_TYPE, self.ptype, self.traceId)
-            pinpointPy.add_clue(PP_PARENT_TYPE, self.ptype, self.traceId)
-
-        if PP_HTTP_PINPOINT_HOST in request.headers:
-            self.Ah = request.headers[PP_HTTP_PINPOINT_HOST]
-            pinpointPy.set_context_key(PP_PARENT_HOST, self.Ah, self.traceId)
-            pinpointPy.add_clue(PP_PARENT_HOST, self.Ah, self.traceId)
-
-        # Not nginx, no http
-        if PP_HEADER_PINPOINT_PSPANID in request.headers:
-            pinpointPy.add_clue(PP_PARENT_SPAN_ID, request.headers[PP_HEADER_PINPOINT_PSPANID], self.traceId)
-
-        if PP_HEADER_PINPOINT_PAPPNAME in request.headers:
-            self.pname = request.headers[PP_HEADER_PINPOINT_PAPPNAME]
-            pinpointPy.set_context_key(PP_PARENT_NAME, self.pname, self.traceId)
-            pinpointPy.add_clue(PP_PARENT_NAME, self.pname, self.traceId)
-
-        if PP_HEADER_PINPOINT_PAPPTYPE in request.headers:
-            self.ptype = request.headers[PP_HEADER_PINPOINT_PAPPTYPE]
-            pinpointPy.set_context_key(PP_PARENT_TYPE, self.ptype, self.traceId)
-            pinpointPy.add_clue(PP_PARENT_TYPE, self.ptype, self.traceId)
-
-        if PP_HEADER_PINPOINT_HOST in request.headers:
-            self.Ah = request.headers[PP_HEADER_PINPOINT_HOST]
-            pinpointPy.set_context_key(PP_PARENT_HOST, self.Ah, self.traceId)
-            pinpointPy.add_clue(PP_PARENT_HOST, self.Ah, self.traceId)
-
-        if PP_NGINX_PROXY in request.headers:
-            pinpointPy.add_clue(PP_NGINX_PROXY, request.headers[PP_NGINX_PROXY], self.traceId)
-
-        if PP_APACHE_PROXY in request.headers:
-            pinpointPy.add_clue(PP_APACHE_PROXY, request.headers[PP_APACHE_PROXY], self.traceId)
-
-        pinpointPy.set_context_key("Pinpoint-Sampled", "s1", self.traceId)
-        if (PP_HEADER_PINPOINT_SAMPLED in request.headers and request.headers[PP_HEADER_PINPOINT_SAMPLED] == PP_NOT_SAMPLED) or pinpointPy.check_tracelimit():
-            if request.headers[PP_HEADER_PINPOINT_SAMPLED] == PP_NOT_SAMPLED:
-                pinpointPy.drop_trace(self.traceId)
-                pinpointPy.set_context_key("Pinpoint-Sampled", "s0", self.traceId)
-
-        pinpointPy.add_clue(PP_TRANSCATION_ID, self.tid, self.traceId)
-        pinpointPy.add_clue(PP_SPAN_ID, self.sid, self.traceId)
-        pinpointPy.set_context_key(PP_TRANSCATION_ID, self.tid, self.traceId)
-        pinpointPy.set_context_key(PP_SPAN_ID, self.sid, self.traceId)
-        return args, kwargs
-
-    def onEnd(self,ret):
-        super().onEnd(ret)
-        self.isLimit = False
-        return ret
-
-    def onException(self, e):
-        pinpointPy.mark_as_error(str(e),"", 0, self.traceId)
-        raise e
-
-
-
diff --git a/plugins/PY/pinpoint/Flask/FlaskPlugins.py b/plugins/PY/pinpoint/Flask/FlaskPlugins.py
deleted file mode 100644
index 6b12e27fc..000000000
--- a/plugins/PY/pinpoint/Flask/FlaskPlugins.py
+++ /dev/null
@@ -1,145 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-
-# ------------------------------------------------------------------------------
-#  Copyright  2020. NAVER Corp.                                                -
-#                                                                              -
-#  Licensed under the Apache License, Version 2.0 (the "License");             -
-#  you may not use this file except in compliance with the License.            -
-#  You may obtain a copy of the License at                                     -
-#                                                                              -
-#   http://www.apache.org/licenses/LICENSE-2.0                                 -
-#                                                                              -
-#  Unless required by applicable law or agreed to in writing, software         -
-#  distributed under the License is distributed on an "AS IS" BASIS,           -
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    -
-#  See the License for the specific language governing permissions and         -
-#  limitations under the License.                                              -
-# ------------------------------------------------------------------------------
-
-# Created by eeliu at 3/5/20
-
-
-
-import pinpointPy
-
-
-from flask import Flask,Request
-
-from pinpoint.common import *
-
-from pinpoint.libs import monkey_patch_for_pinpoint
-monkey_patch_for_pinpoint()
-
-from pinpoint.settings import *
-
-class BaseFlaskPlugins(Candy):
-    def __init__(self, name):
-        super().__init__(name)
-        self.isLimit = False
-
-    def isSample(self,args):
-        return True
-
-    def onBefore(self,*args, **kwargs):
-        super().onBefore(*args, **kwargs)
-        request = Request(args[1])
-        pinpointPy.add_clue(PP_APP_NAME,APP_NAME)
-        pinpointPy.add_clue(PP_APP_ID, APP_ID)
-        pinpointPy.set_context_key(PP_APP_NAME, APP_NAME)
-        ###############################################################
-        # print("------------------- call before -----------------------")
-        pinpointPy.add_clue(PP_INTERCEPTOR_NAME, 'BaseFlaskrequest')
-        pinpointPy.add_clue(PP_REQ_URI, request.path)
-        pinpointPy.add_clue(PP_REQ_CLIENT,request.remote_addr)
-        pinpointPy.add_clue(PP_REQ_SERVER, request.host)
-        pinpointPy.add_clue(PP_SERVER_TYPE, PYTHON)
-        pinpointPy.set_context_key(PP_SERVER_TYPE, PYTHON)
-
-        # nginx add http
-        if PP_HTTP_PINPOINT_PSPANID in request.headers:
-            pinpointPy.add_clue(PP_PARENT_SPAN_ID, request.headers[PP_HTTP_PINPOINT_PSPANID])
-
-        if PP_HTTP_PINPOINT_SPANID in request.headers:
-            self.sid = request.headers[PP_HTTP_PINPOINT_SPANID]
-        elif PP_HEADER_PINPOINT_SPANID in request.headers:
-            self.sid = request.headers[PP_HEADER_PINPOINT_SPANID]
-        else:
-            self.sid = generateSid()
-        pinpointPy.set_context_key(PP_SPAN_ID,self.sid)
-
-
-        if PP_HTTP_PINPOINT_TRACEID in request.headers:
-            self.tid = request.headers[PP_HTTP_PINPOINT_TRACEID]
-        elif PP_HEADER_PINPOINT_TRACEID in request.headers:
-            self.tid = request.headers[PP_HEADER_PINPOINT_TRACEID]
-        else:
-            self.tid = generateTid()
-        pinpointPy.set_context_key(PP_TRANSCATION_ID,self.tid)
-
-        if PP_HTTP_PINPOINT_PAPPNAME in request.headers:
-            self.pname = request.headers[PP_HTTP_PINPOINT_PAPPNAME]
-            pinpointPy.set_context_key(PP_PARENT_NAME,self.pname)
-            pinpointPy.add_clue(PP_PARENT_NAME,self.pname)
-
-        if PP_HTTP_PINPOINT_PAPPTYPE in request.headers:
-            self.ptype = request.headers[PP_HTTP_PINPOINT_PAPPTYPE]
-            pinpointPy.set_context_key(PP_PARENT_TYPE,self.ptype)
-            pinpointPy.add_clue(PP_PARENT_TYPE,self.ptype)
-
-        if PP_HTTP_PINPOINT_HOST in request.headers:
-            self.Ah = request.headers[PP_HTTP_PINPOINT_HOST]
-            pinpointPy.set_context_key(PP_PARENT_HOST,self.Ah)
-            pinpointPy.add_clue(PP_PARENT_HOST,self.Ah)
-
-        # Not nginx, no http
-        if PP_HEADER_PINPOINT_PSPANID in request.headers:
-            pinpointPy.add_clue(PP_PARENT_SPAN_ID, request.headers[PP_HEADER_PINPOINT_PSPANID])
-            # print("PINPOINT_PSPANID:", request.headers[PP_HEADER_PINPOINT_PSPANID])
-
-        if PP_HEADER_PINPOINT_PAPPNAME in request.headers:
-            self.pname = request.headers[PP_HEADER_PINPOINT_PAPPNAME]
-            pinpointPy.set_context_key(PP_PARENT_NAME, self.pname)
-            pinpointPy.add_clue(PP_PARENT_NAME, self.pname)
-
-        if PP_HEADER_PINPOINT_PAPPTYPE in request.headers:
-            self.ptype = request.headers[PP_HEADER_PINPOINT_PAPPTYPE]
-            pinpointPy.set_context_key(PP_PARENT_TYPE, self.ptype)
-            pinpointPy.add_clue(PP_PARENT_TYPE, self.ptype)
-
-        if PP_HEADER_PINPOINT_HOST in request.headers:
-            self.Ah = request.headers[PP_HEADER_PINPOINT_HOST]
-            pinpointPy.set_context_key(PP_PARENT_HOST, self.Ah)
-            pinpointPy.add_clue(PP_PARENT_HOST, self.Ah)
-        
-        if PP_NGINX_PROXY in request.headers:
-            pinpointPy.add_clue(PP_NGINX_PROXY, request.headers[PP_NGINX_PROXY])
-        
-        if PP_APACHE_PROXY in request.headers:
-            pinpointPy.add_clue(PP_APACHE_PROXY, request.headers[PP_APACHE_PROXY])
-
-        pinpointPy.set_context_key(PP_HEADER_PINPOINT_SAMPLED,"s1")
-        if (PP_HTTP_PINPOINT_SAMPLED in request.headers and request.headers[PP_HTTP_PINPOINT_SAMPLED] == PP_NOT_SAMPLED) or pinpointPy.check_tracelimit():
-            pinpointPy.drop_trace()
-            pinpointPy.set_context_key(PP_HEADER_PINPOINT_SAMPLED, "s0")
-
-
-        pinpointPy.add_clue(PP_TRANSCATION_ID,self.tid)
-        pinpointPy.add_clue(PP_SPAN_ID,self.sid)
-        pinpointPy.set_context_key(PP_TRANSCATION_ID, self.tid)
-        pinpointPy.set_context_key(PP_SPAN_ID, self.sid)
-        pinpointPy.add_clues(PP_HTTP_METHOD,request.method)
-        ###############################################################
-        return args, kwargs
-
-    def onEnd(self,ret):
-        ###############################################################
-
-        ###############################################################
-        super().onEnd(ret)
-        self.isLimit = False
-        return ret
-
-    def onException(self, e):
-        pinpointPy.mark_as_error(str(e),"",0)
-        raise e
diff --git a/plugins/PY/pinpoint/__init__.py b/plugins/PY/pinpoint/__init__.py
deleted file mode 100644
index cc06ab726..000000000
--- a/plugins/PY/pinpoint/__init__.py
+++ /dev/null
@@ -1,19 +0,0 @@
-# ******************************************************************************
-#   Copyright  2020. NAVER Corp.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# ******************************************************************************
-
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-# Created by eeliu at 2/4/21
\ No newline at end of file
diff --git a/plugins/PY/pinpoint/aiohttp/AioRequestPlugin.py b/plugins/PY/pinpoint/aiohttp/AioRequestPlugin.py
deleted file mode 100644
index 560763a36..000000000
--- a/plugins/PY/pinpoint/aiohttp/AioRequestPlugin.py
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-
-# ------------------------------------------------------------------------------
-#  Copyright  2020. NAVER Corp.                                                -
-#                                                                              -
-#  Licensed under the Apache License, Version 2.0 (the "License");             -
-#  you may not use this file except in compliance with the License.            -
-#  You may obtain a copy of the License at                                     -
-#                                                                              -
-#   http://www.apache.org/licenses/LICENSE-2.0                                 -
-#                                                                              -
-#  Unless required by applicable law or agreed to in writing, software         -
-#  distributed under the License is distributed on an "AS IS" BASIS,           -
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    -
-#  See the License for the specific language governing permissions and         -
-#  limitations under the License.                                              -
-# ------------------------------------------------------------------------------
-
-# Created by eeliu at 11/11/20
-
-from pinpoint.common import *
-
-
-class AioRequestPlugin(AsyRequestPlugin):
-    def onBefore(self,*args, **kwargs):
-        super().onBefore(*args, **kwargs)
-        request = args[0]
-        pinpointPy.add_clue(PP_INTERCEPTOR_NAME, 'aiohttp-middleware',self.traceId)
-        pinpointPy.add_clue(PP_REQ_URI, request.path, self.traceId)
-        pinpointPy.add_clue(PP_REQ_CLIENT, request.remote, self.traceId)
-        pinpointPy.add_clue(PP_REQ_SERVER, request.host, self.traceId)
-
-
-    def onEnd(self, ret):
-        response  = ret
-        return super().onEnd(response)
diff --git a/plugins/PY/pinpoint/aiohttp/middleware.py b/plugins/PY/pinpoint/aiohttp/middleware.py
deleted file mode 100644
index e325e3163..000000000
--- a/plugins/PY/pinpoint/aiohttp/middleware.py
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-
-# ------------------------------------------------------------------------------
-#  Copyright  2020. NAVER Corp.                                                -
-#                                                                              -
-#  Licensed under the Apache License, Version 2.0 (the "License");             -
-#  you may not use this file except in compliance with the License.            -
-#  You may obtain a copy of the License at                                     -
-#                                                                              -
-#   http://www.apache.org/licenses/LICENSE-2.0                                 -
-#                                                                              -
-#  Unless required by applicable law or agreed to in writing, software         -
-#  distributed under the License is distributed on an "AS IS" BASIS,           -
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    -
-#  See the License for the specific language governing permissions and         -
-#  limitations under the License.                                              -
-# ------------------------------------------------------------------------------
-
-# Created by eeliu at 11/11/20
-
-from aiohttp import web
-from .AioRequestPlugin import AioRequestPlugin
-
-@web.middleware
-async def PinPointMiddleWare(request, handler):
-    plugin = AioRequestPlugin("")
-    plugin.onBefore(request)
-    response = await handler(request)
-    plugin.onEnd(response)
-    return response
\ No newline at end of file
diff --git a/plugins/PY/pinpoint/common/AsyCommon.py b/plugins/PY/pinpoint/common/AsyCommon.py
deleted file mode 100644
index 38152c2e3..000000000
--- a/plugins/PY/pinpoint/common/AsyCommon.py
+++ /dev/null
@@ -1,82 +0,0 @@
-﻿#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-
-# ------------------------------------------------------------------------------
-#  Copyright  2020. NAVER Corp.                                                -
-#                                                                              -
-#  Licensed under the Apache License, Version 2.0 (the "License");             -
-#  you may not use this file except in compliance with the License.            -
-#  You may obtain a copy of the License at                                     -
-#                                                                              -
-#   http://www.apache.org/licenses/LICENSE-2.0                                 -
-#                                                                              -
-#  Unless required by applicable law or agreed to in writing, software         -
-#  distributed under the License is distributed on an "AS IS" BASIS,           -
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    -
-#  See the License for the specific language governing permissions and         -
-#  limitations under the License.                                              -
-# ------------------------------------------------------------------------------
-
-# Created by eeliu at 3/5/20
-
-
-
-import asyncio
-import pinpointPy
-import contextvars
-
-_Id_ = contextvars.ContextVar('_pinpoint_id_',default=0)
-
-class AsyCandy(object):
-
-    def __init__(self,name):
-        self.name = name
-        self.traceId = 0
-
-    def onBefore(self,*args, **kwargs):
-        global _Id_
-        id = _Id_.get()
-        traceId = pinpointPy.start_trace(id)
-        _Id_.set(traceId)
-        self.traceId = traceId
-        return (args,kwargs)
-
-    def onEnd(self,ret):
-        traceId = pinpointPy.end_trace(self.traceId)
-        global _Id_
-        _Id_.set(traceId)
-
-    def onException(self,e):
-        raise NotImplementedError()
-
-    def __call__(self, func):
-        self.func_name=func.__name__
-        async def pinpointTrace(*args, **kwargs):
-            ret = None
-            self.onBefore(*args, **kwargs)
-            try:
-                ret = await func(*args, **kwargs)
-                return ret
-            except Exception as e:
-                self.onException(e)
-                raise e
-            finally:
-                self.onEnd(ret)
-
-        return pinpointTrace
-
-    def getFuncUniqueName(self):
-        return self.name
-
-if __name__ == '__main__':
-
-    @AsyCandy('main')
-    async def run(i):
-        if i == 0:
-            return
-        print("run")
-        await asyncio.sleep(0.1)
-        await run(i-1)
-
-    asyncio.run(run(2))
-    asyncio.run(run(2))
\ No newline at end of file
diff --git a/plugins/PY/pinpoint/common/CommonPlugin.py b/plugins/PY/pinpoint/common/CommonPlugin.py
deleted file mode 100644
index 5883fa0d2..000000000
--- a/plugins/PY/pinpoint/common/CommonPlugin.py
+++ /dev/null
@@ -1,55 +0,0 @@
-﻿# ------------------------------------------------------------------------------
-#  Copyright  2020. NAVER Corp.                                                -
-#                                                                              -
-#  Licensed under the Apache License, Version 2.0 (the "License");             -
-#  you may not use this file except in compliance with the License.            -
-#  You may obtain a copy of the License at                                     -
-#                                                                              -
-#   http://www.apache.org/licenses/LICENSE-2.0                                 -
-#                                                                              -
-#  Unless required by applicable law or agreed to in writing, software         -
-#  distributed under the License is distributed on an "AS IS" BASIS,           -
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    -
-#  See the License for the specific language governing permissions and         -
-#  limitations under the License.                                              -
-# ------------------------------------------------------------------------------
-
-
-from .Common import *
-from .Defines import *
-import pinpointPy
-
-class PinpointCommonPlugin(Candy):
-
-    def onBefore(self,*args, **kwargs):
-        super().onBefore(*args, **kwargs)
-        ###############################################################
-        pinpointPy.add_clue(PP_INTERCEPTOR_NAME,self.getFuncUniqueName())
-        pinpointPy.add_clue(PP_SERVER_TYPE, PP_METHOD_CALL)
-        arg = self.get_arg(*args, **kwargs)
-        pinpointPy.add_clues(PP_ARGS, arg)
-        ###############################################################
-        return args,kwargs
-
-    def onEnd(self,ret):
-        ###############################################################
-        pinpointPy.add_clues(PP_RETURN,str(ret))
-        ###############################################################
-        super().onEnd(ret)
-        return ret
-
-    def onException(self, e):
-        pinpointPy.add_clue(PP_ADD_EXCEPTION,str(e))
-
-    def get_arg(self, *args, **kwargs):
-        args_tmp = {}
-        j = 0
-
-        for i in args:
-            args_tmp["arg["+str(j)+"]"] = (str(i))
-            j += 1
-
-        for k in kwargs:
-            args_tmp[k] = kwargs[k]
-
-        return str(args_tmp)
diff --git a/plugins/PY/pinpoint/common/RequestPlugins.py b/plugins/PY/pinpoint/common/RequestPlugins.py
deleted file mode 100644
index c606465f0..000000000
--- a/plugins/PY/pinpoint/common/RequestPlugins.py
+++ /dev/null
@@ -1,132 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-
-# ------------------------------------------------------------------------------
-#  Copyright  2020. NAVER Corp.                                                -
-#                                                                              -
-#  Licensed under the Apache License, Version 2.0 (the "License");             -
-#  you may not use this file except in compliance with the License.            -
-#  You may obtain a copy of the License at                                     -
-#                                                                              -
-#   http://www.apache.org/licenses/LICENSE-2.0                                 -
-#                                                                              -
-#  Unless required by applicable law or agreed to in writing, software         -
-#  distributed under the License is distributed on an "AS IS" BASIS,           -
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    -
-#  See the License for the specific language governing permissions and         -
-#  limitations under the License.                                              -
-# ------------------------------------------------------------------------------
-
-# Created by eeliu at 3/5/20
-
-
-from pinpoint.settings import *
-
-from .Defines import *
-from .Common import Candy
-from .Span import *
-import traceback
-import pinpointPy
-
-class RequestPlugin(Candy):
-    def __init__(self,name):
-        super().__init__(name)
-
-    def onBefore(self,*args, **kwargs):
-        super().onBefore(*args, **kwargs)
-        pinpointPy.add_clue(PP_APP_NAME,APP_NAME)
-        pinpointPy.add_clue(PP_APP_ID, APP_ID)
-        pinpointPy.set_context_key(PP_APP_NAME, APP_NAME)
-        request =args[0]
-        ###############################################################
-        # print("------------------- call before -----------------------")
-        pinpointPy.add_clue(PP_INTERCEPTOR_NAME, 'BaseFlaskrequest')
-        pinpointPy.add_clue(PP_REQ_URI, request.path)
-        pinpointPy.add_clue(PP_REQ_CLIENT, request.remote_addr)
-        pinpointPy.add_clue(PP_REQ_SERVER, request.host)
-        pinpointPy.add_clue(PP_SERVER_TYPE, PYTHON)
-        pinpointPy.set_context_key(PP_SERVER_TYPE, PYTHON)
-
-        # nginx add http
-        if PP_HTTP_PINPOINT_PSPANID in request.headers:
-            pinpointPy.add_clue(PP_PARENT_SPAN_ID, request.headers[PP_HTTP_PINPOINT_PSPANID])
-            print("PINPOINT_PSPANID:", request.headers[PP_HTTP_PINPOINT_PSPANID])
-
-        if PP_HTTP_PINPOINT_SPANID in request.headers:
-            self.sid = request.headers[PP_HTTP_PINPOINT_SPANID]
-        elif PP_HEADER_PINPOINT_SPANID in request.headers:
-            self.sid = request.headers[PP_HEADER_PINPOINT_SPANID]
-        else:
-            self.sid = generateSid()
-        pinpointPy.set_context_key(PP_SPAN_ID, self.sid)
-
-        if PP_HTTP_PINPOINT_TRACEID in request.headers:
-            self.tid = request.headers[PP_HTTP_PINPOINT_TRACEID]
-        elif PP_HEADER_PINPOINT_TRACEID in request.headers:
-            self.tid = request.headers[PP_HEADER_PINPOINT_TRACEID]
-        else:
-            self.tid = generateTid()
-        pinpointPy.set_context_key(PP_TRANSCATION_ID, self.tid)
-
-        if PP_HTTP_PINPOINT_PAPPNAME in request.headers:
-            self.pname = request.headers[PP_HTTP_PINPOINT_PAPPNAME]
-            pinpointPy.set_context_key(PP_PARENT_NAME, self.pname)
-            pinpointPy.add_clue(PP_PARENT_NAME, self.pname)
-
-        if PP_HTTP_PINPOINT_PAPPTYPE in request.headers:
-            self.ptype = request.headers[PP_HTTP_PINPOINT_PAPPTYPE]
-            pinpointPy.set_context_key(PP_PARENT_TYPE, self.ptype)
-            pinpointPy.add_clue(PP_PARENT_TYPE, self.ptype)
-
-        if PP_HTTP_PINPOINT_HOST in request.headers:
-            self.Ah = request.headers[PP_HTTP_PINPOINT_HOST]
-            pinpointPy.set_context_key(PP_PARENT_HOST, self.Ah)
-            pinpointPy.add_clue(PP_PARENT_HOST, self.Ah)
-
-        # Not nginx, no http
-        if PP_HEADER_PINPOINT_PSPANID in request.headers:
-            pinpointPy.add_clue(PP_PARENT_SPAN_ID, request.headers[PP_HEADER_PINPOINT_PSPANID])
-            # print("PINPOINT_PSPANID:", request.headers[PP_HEADER_PINPOINT_PSPANID])
-
-        if PP_HEADER_PINPOINT_PAPPNAME in request.headers:
-            self.pname = request.headers[PP_HEADER_PINPOINT_PAPPNAME]
-            pinpointPy.set_context_key(PP_PARENT_NAME, self.pname)
-            pinpointPy.add_clue(PP_PARENT_NAME, self.pname)
-
-        if PP_HEADER_PINPOINT_PAPPTYPE in request.headers:
-            self.ptype = request.headers[PP_HEADER_PINPOINT_PAPPTYPE]
-            pinpointPy.set_context_key(PP_PARENT_TYPE, self.ptype)
-            pinpointPy.add_clue(PP_PARENT_TYPE, self.ptype)
-
-        if PP_HEADER_PINPOINT_HOST in request.headers:
-            self.Ah = request.headers[PP_HEADER_PINPOINT_HOST]
-            pinpointPy.set_context_key(PP_PARENT_HOST, self.Ah)
-            pinpointPy.add_clue(PP_PARENT_HOST, self.Ah)
-
-        if PP_NGINX_PROXY in request.headers:
-            pinpointPy.add_clue(PP_NGINX_PROXY, request.headers[PP_NGINX_PROXY])
-
-        if PP_APACHE_PROXY in request.headers:
-            pinpointPy.add_clue(PP_APACHE_PROXY, request.headers[PP_APACHE_PROXY])
-
-        pinpointPy.set_context_key(PP_HEADER_PINPOINT_SAMPLED, "s1")
-        if (PP_HTTP_PINPOINT_SAMPLED in request.headers and request.headers[PP_HTTP_PINPOINT_SAMPLED] == PP_NOT_SAMPLED) or pinpointPy.check_tracelimit():
-            pinpointPy.drop_trace()
-            pinpointPy.set_context_key(PP_HEADER_PINPOINT_SAMPLED, "s0")
-
-        pinpointPy.add_clue(PP_TRANSCATION_ID, self.tid)
-        pinpointPy.add_clue(PP_SPAN_ID, self.sid)
-        pinpointPy.set_context_key(PP_TRANSCATION_ID, self.tid)
-        pinpointPy.set_context_key(PP_SPAN_ID, self.sid)
-        return args, kwargs
-
-    def onEnd(self,ret):
-        super().onEnd(ret)
-        return ret
-
-    def onException(self, e):
-        pinpointPy.mark_as_error(str(e),"",0)
-        raise e
-
-
-
diff --git a/plugins/PY/pinpoint/common/Span.py b/plugins/PY/pinpoint/common/Span.py
deleted file mode 100644
index dbbf9f221..000000000
--- a/plugins/PY/pinpoint/common/Span.py
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-
-# ------------------------------------------------------------------------------
-#  Copyright  2020. NAVER Corp.                                                -
-#                                                                              -
-#  Licensed under the Apache License, Version 2.0 (the "License");             -
-#  you may not use this file except in compliance with the License.            -
-#  You may obtain a copy of the License at                                     -
-#                                                                              -
-#   http://www.apache.org/licenses/LICENSE-2.0                                 -
-#                                                                              -
-#  Unless required by applicable law or agreed to in writing, software         -
-#  distributed under the License is distributed on an "AS IS" BASIS,           -
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    -
-#  See the License for the specific language governing permissions and         -
-#  limitations under the License.                                              -
-# ------------------------------------------------------------------------------
-
-# Created by eeliu at 8/20/20
-
-from urllib.parse import urlparse
-from pinpoint.settings import *
-from .Defines import *
-from .Common import local_host_name,local_ip
-
-import random
-import pinpointPy
-
-tid = None
-nsid = None
-sid = None
-
-def generateTid():
-    global tid
-    tid = ('%s^%s^%s') % (APP_ID, str(pinpointPy.start_time()), str(pinpointPy.unique_id()))
-    return tid
-
-def generateSid():
-    global sid
-    sid = str(random.randint(0, 2147483647))
-    return sid
-
-def generateNextSid():
-    global nsid
-    nsid = str(random.randint(0, 2147483647))
-    return nsid
-
-def generatePinpointHeader(host,headers):
-    headers[PP_HEADER_PINPOINT_SAMPLED] = PP_SAMPLED
-    headers[PP_HEADER_PINPOINT_PAPPTYPE] = pinpointPy.get_context_key(PP_SERVER_TYPE)
-    headers[PP_HEADER_PINPOINT_PAPPNAME] = pinpointPy.get_context_key(PP_APP_NAME)
-    headers['Pinpoint-Flags'] = "0"
-    headers[PP_HEADER_PINPOINT_HOST] =host
-    headers[PP_HEADER_PINPOINT_TRACEID] = pinpointPy.get_context_key(PP_TRANSCATION_ID)
-    headers[PP_HEADER_PINPOINT_PSPANID] = pinpointPy.get_context_key(PP_SPAN_ID)
-    nsid = generateSid()
-    pinpointPy.set_context_key(PP_NEXT_SPAN_ID, nsid)
-    headers[PP_HEADER_PINPOINT_SPANID] = nsid
-
-def generatePPRabbitMqHeader(func,headers):
-
-    if pinpointPy.get_context_key(PP_HEADER_PINPOINT_SAMPLED) == 's0':
-        headers[PP_HEADER_PINPOINT_SAMPLED] = PP_NOT_SAMPLED
-        return False
-    else:
-        headers[PP_HEADER_PINPOINT_SAMPLED] = PP_SAMPLED
-    headers[PP_HEADER_PINPOINT_PAPPTYPE] = pinpointPy.get_context_key(PP_SERVER_TYPE)
-    headers[PP_HEADER_PINPOINT_PAPPNAME] = pinpointPy.get_context_key(PP_APP_NAME)
-    headers['Pinpoint-Flags'] = "0"
-    headers[PP_HEADER_PINPOINT_HOST] = func
-    headers[PP_HEADER_PINPOINT_CLIENT] = local_ip
-    headers[PP_HEADER_PINPOINT_TRACEID] = pinpointPy.get_context_key(PP_TRANSCATION_ID)
-    headers[PP_HEADER_PINPOINT_PSPANID] = pinpointPy.get_context_key(PP_SPAN_ID)
-    headers[PP_HEADER_PINPOINT_SPANID] = pinpointPy.get_context_key(PP_NEXT_SPAN_ID)
-    return True
\ No newline at end of file
diff --git a/plugins/PY/pinpoint/common/Utils.py b/plugins/PY/pinpoint/common/Utils.py
deleted file mode 100644
index acd7700ae..000000000
--- a/plugins/PY/pinpoint/common/Utils.py
+++ /dev/null
@@ -1,114 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-
-# ------------------------------------------------------------------------------
-#  Copyright  2020. NAVER Corp.                                                -
-#                                                                              -
-#  Licensed under the Apache License, Version 2.0 (the "License");             -
-#  you may not use this file except in compliance with the License.            -
-#  You may obtain a copy of the License at                                     -
-#                                                                              -
-#   http://www.apache.org/licenses/LICENSE-2.0                                 -
-#                                                                              -
-#  Unless required by applicable law or agreed to in writing, software         -
-#  distributed under the License is distributed on an "AS IS" BASIS,           -
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    -
-#  See the License for the specific language governing permissions and         -
-#  limitations under the License.                                              -
-# ------------------------------------------------------------------------------
-
-# Created by eeliu at 11/10/20
-
-import pinpointPy
-from .Span import *
-
-def startPinpointByEnviron(environ):
-    pinpointPy.add_clue(PP_APP_NAME, APP_NAME)
-    pinpointPy.add_clue(PP_APP_ID, APP_ID)
-    pinpointPy.set_context_key(PP_APP_NAME, APP_NAME)
-    ###############################################################
-    # print("------------------- call before -----------------------")
-    pinpointPy.add_clue(PP_INTERCEPTOR_NAME, 'WSGI handle')
-
-    path,remote_addr,host = environ['PATH_INFO'],environ['REMOTE_ADDR'],environ['HTTP_HOST']
-
-    pinpointPy.add_clue(PP_REQ_URI, path)
-    pinpointPy.add_clue(PP_REQ_CLIENT, remote_addr)
-    pinpointPy.add_clue(PP_REQ_SERVER, host)
-    pinpointPy.add_clue(PP_SERVER_TYPE, PYTHON)
-    pinpointPy.set_context_key(PP_SERVER_TYPE, PYTHON)
-    # nginx add http
-    if PP_HTTP_PINPOINT_PSPANID in environ:
-        pinpointPy.add_clue(PP_PARENT_SPAN_ID, environ[PP_HTTP_PINPOINT_PSPANID])
-
-    if PP_HTTP_PINPOINT_SPANID in environ:
-        sid = environ[PP_HTTP_PINPOINT_SPANID]
-    elif PP_HEADER_PINPOINT_SPANID in environ:
-        sid = environ[PP_HEADER_PINPOINT_SPANID]
-    else:
-        sid = generateSid()
-
-
-    if PP_HTTP_PINPOINT_TRACEID in environ:
-        tid = environ[PP_HTTP_PINPOINT_TRACEID]
-    elif PP_HEADER_PINPOINT_TRACEID in environ:
-        tid = environ[PP_HEADER_PINPOINT_TRACEID]
-    else:
-        tid = generateTid()
-
-
-    if PP_HTTP_PINPOINT_PAPPNAME in environ:
-        pname = environ[PP_HTTP_PINPOINT_PAPPNAME]
-        pinpointPy.set_context_key(PP_PARENT_NAME, pname)
-        pinpointPy.add_clue(PP_PARENT_NAME, pname)
-
-    if PP_HTTP_PINPOINT_PAPPTYPE in environ:
-        ptype = environ[PP_HTTP_PINPOINT_PAPPTYPE]
-        pinpointPy.set_context_key(PP_PARENT_TYPE, ptype)
-        pinpointPy.add_clue(PP_PARENT_TYPE, ptype)
-
-    if PP_HTTP_PINPOINT_HOST in environ:
-        Ah = environ[PP_HTTP_PINPOINT_HOST]
-        pinpointPy.set_context_key(PP_PARENT_HOST, Ah)
-        pinpointPy.add_clue(PP_PARENT_HOST, Ah)
-
-    # Not nginx, no http
-    if PP_HEADER_PINPOINT_PSPANID in environ:
-        pinpointPy.add_clue(PP_PARENT_SPAN_ID, environ[PP_HEADER_PINPOINT_PSPANID])
-        # print("PINPOINT_PSPANID:", environ[PP_HEADER_PINPOINT_PSPANID])
-
-    if PP_HEADER_PINPOINT_PAPPNAME in environ:
-        pname = environ[PP_HEADER_PINPOINT_PAPPNAME]
-        pinpointPy.set_context_key(PP_PARENT_NAME, pname)
-        pinpointPy.add_clue(PP_PARENT_NAME, pname)
-
-    if PP_HEADER_PINPOINT_PAPPTYPE in environ:
-        ptype = environ[PP_HEADER_PINPOINT_PAPPTYPE]
-        pinpointPy.set_context_key(PP_PARENT_TYPE, ptype)
-        pinpointPy.add_clue(PP_PARENT_TYPE, ptype)
-
-    if PP_HEADER_PINPOINT_HOST in environ:
-        Ah = environ[PP_HEADER_PINPOINT_HOST]
-        pinpointPy.set_context_key(PP_PARENT_HOST, Ah)
-        pinpointPy.add_clue(PP_PARENT_HOST, Ah)
-
-    if PP_NGINX_PROXY in environ:
-        pinpointPy.add_clue(PP_NGINX_PROXY, environ[PP_NGINX_PROXY])
-
-    if PP_APACHE_PROXY in environ:
-        pinpointPy.add_clue(PP_APACHE_PROXY, environ[PP_APACHE_PROXY])
-
-    pinpointPy.set_context_key(PP_HEADER_PINPOINT_SAMPLED,"s1")
-    if (PP_HTTP_PINPOINT_SAMPLED in environ and environ[PP_HTTP_PINPOINT_SAMPLED] == PP_NOT_SAMPLED) or pinpointPy.check_tracelimit():
-        pinpointPy.drop_trace()
-        pinpointPy.set_context_key(PP_HEADER_PINPOINT_SAMPLED, "s0")
-
-
-    pinpointPy.add_clue(PP_TRANSCATION_ID,tid)
-    pinpointPy.add_clue(PP_SPAN_ID, sid)
-    pinpointPy.set_context_key(PP_TRANSCATION_ID, tid)
-    pinpointPy.set_context_key(PP_SPAN_ID, sid)
-
-def endPinpointByEnviron(ret):
-    # for future use
-    pass
diff --git a/plugins/PY/pinpoint/common/Wrapper.py b/plugins/PY/pinpoint/common/Wrapper.py
deleted file mode 100644
index b6477d74b..000000000
--- a/plugins/PY/pinpoint/common/Wrapper.py
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-
-# ------------------------------------------------------------------------------
-#  Copyright  2020. NAVER Corp.                                                -
-#                                                                              -
-#  Licensed under the Apache License, Version 2.0 (the "License");             -
-#  you may not use this file except in compliance with the License.            -
-#  You may obtain a copy of the License at                                     -
-#                                                                              -
-#   http://www.apache.org/licenses/LICENSE-2.0                                 -
-#                                                                              -
-#  Unless required by applicable law or agreed to in writing, software         -
-#  distributed under the License is distributed on an "AS IS" BASIS,           -
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    -
-#  See the License for the specific language governing permissions and         -
-#  limitations under the License.                                              -
-# ------------------------------------------------------------------------------
-
-# Created by eeliu at 11/11/20
-
-class Wrapper:
-    def __init__(self,obj):
-        self.origObj = obj
-
-    def __getattr__(self, item):
-        if item in self.__dict__:
-            return getattr(self,item)
-        else:
-            return getattr(self.origObj, item)
diff --git a/plugins/PY/pinpoint/common/__init__.py b/plugins/PY/pinpoint/common/__init__.py
deleted file mode 100644
index 379c33a90..000000000
--- a/plugins/PY/pinpoint/common/__init__.py
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-
-# ------------------------------------------------------------------------------
-#  Copyright  2020. NAVER Corp.                                                -
-#                                                                              -
-#  Licensed under the Apache License, Version 2.0 (the "License");             -
-#  you may not use this file except in compliance with the License.            -
-#  You may obtain a copy of the License at                                     -
-#                                                                              -
-#   http://www.apache.org/licenses/LICENSE-2.0                                 -
-#                                                                              -
-#  Unless required by applicable law or agreed to in writing, software         -
-#  distributed under the License is distributed on an "AS IS" BASIS,           -
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    -
-#  See the License for the specific language governing permissions and         -
-#  limitations under the License.                                              -
-# ------------------------------------------------------------------------------
-
-# Created by eeliu at 8/20/20
-
-
-import sys
-__python_version = "%d.%d" %(sys.version_info.major,sys.version_info.minor)
-
-if __python_version >="3.7":
-    from .AsyCommon import *
-    from .AsyRequestPlugin import *
-    from .AsyCommonPlugin import *
-
-from .Defines import *
-from .Span import *
-from .Interceptor import *
-from .WSGIPlugin import *
-from .Utils import *
-from .Common import *
-from .RequestPlugins import *
-from .CommonPlugin import *
-
diff --git a/plugins/PY/pinpoint/libs/aioHttp/pymongo/MongoClientPlugin.py b/plugins/PY/pinpoint/libs/aioHttp/pymongo/MongoClientPlugin.py
deleted file mode 100644
index 84d54f0b9..000000000
--- a/plugins/PY/pinpoint/libs/aioHttp/pymongo/MongoClientPlugin.py
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-
-# ------------------------------------------------------------------------------
-#  Copyright  2020. NAVER Corp.                                                -
-#                                                                              -
-#  Licensed under the Apache License, Version 2.0 (the "License");             -
-#  you may not use this file except in compliance with the License.            -
-#  You may obtain a copy of the License at                                     -
-#                                                                              -
-#   http://www.apache.org/licenses/LICENSE-2.0                                 -
-#                                                                              -
-#  Unless required by applicable law or agreed to in writing, software         -
-#  distributed under the License is distributed on an "AS IS" BASIS,           -
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    -
-#  See the License for the specific language governing permissions and         -
-#  limitations under the License.                                              -
-# ------------------------------------------------------------------------------
-
-# Created by eeliu at 8/20/20
-
-import pinpointPy
-from pinpoint.common import *
-
-
-class MongoClientPlugin(AsyCandy):
-    def __init__(self, name):
-        super().__init__(name)
-        self.dst = ''
-
-
-    def onBefore(self, *args, **kwargs):
-        super().onBefore(*args, **kwargs)
-        self.dst = str(args[0].database._client.address)
-        # ###############################################################
-        pinpointPy.add_clue(PP_INTERCEPTOR_NAME, self.getFuncUniqueName(),self.traceId)
-        pinpointPy.add_clue(PP_SERVER_TYPE, PP_MONGDB_EXE_QUERY,self.traceId)
-        # ###############################################################
-        pinpointPy.add_clue(PP_DESTINATION, self.dst,self.traceId)
-        return args, kwargs
-
-    def onEnd(self, ret):
-        ###############################################################
-        # pinpointPy.add_clues(PP_RETURN, str(ret),self.traceId)
-        ###############################################################
-        super().onEnd(ret)
-        return ret
-
-    def onException(self, e):
-        pinpointPy.add_clue(PP_ADD_EXCEPTION, str(e),self.traceId)
-
-    def __call__(self, func):
-        self.func_name=self.getFuncUniqueName()
-        def pinpointTrace(*args, **kwargs):
-            ret = None
-            self.onBefore(*args, **kwargs)
-            try:
-                ret = func(*args, **kwargs)
-                return ret
-            except Exception as e:
-                self.onException(e)
-                raise e
-            finally:
-                self.onEnd(ret)
-
-        return pinpointTrace
diff --git a/plugins/PY/pinpoint/libs/aioHttp/pymongo/__init__.py b/plugins/PY/pinpoint/libs/aioHttp/pymongo/__init__.py
deleted file mode 100644
index 785364aed..000000000
--- a/plugins/PY/pinpoint/libs/aioHttp/pymongo/__init__.py
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-
-# ------------------------------------------------------------------------------
-#  Copyright  2020. NAVER Corp.                                                -
-#                                                                              -
-#  Licensed under the Apache License, Version 2.0 (the "License");             -
-#  you may not use this file except in compliance with the License.            -
-#  You may obtain a copy of the License at                                     -
-#                                                                              -
-#   http://www.apache.org/licenses/LICENSE-2.0                                 -
-#                                                                              -
-#  Unless required by applicable law or agreed to in writing, software         -
-#  distributed under the License is distributed on an "AS IS" BASIS,           -
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    -
-#  See the License for the specific language governing permissions and         -
-#  limitations under the License.                                              -
-# ------------------------------------------------------------------------------
-
-# Created by eeliu at 8/20/20
-
-
-from pinpoint.common import Interceptor
-from .MongoClientPlugin import MongoClientPlugin
-try:
-
-
-    from motor.core import AgnosticCollection
-
-    Interceptors = [
-        Interceptor(AgnosticCollection,'find', MongoClientPlugin),
-        # Interceptor(AgnosticCollection, 'find_one', MongoClientPlugin),
-        # Interceptor(AgnosticCollection, 'insert', MongoClientPlugin),
-        # Interceptor(AgnosticCollection, 'update', MongoClientPlugin),
-        # Interceptor(AgnosticCollection, 'update_many', MongoClientPlugin),
-        # Interceptor(AgnosticCollection, 'delete_one', MongoClientPlugin),
-        # Interceptor(AgnosticCollection, 'delete_many', MongoClientPlugin),
-        # Interceptor(AgnosticCollection, 'insert_many', MongoClientPlugin),
-        # Interceptor(AgnosticCollection, 'insert_one', MongoClientPlugin),
-    ]
-
-    for interceptor in Interceptors:
-        interceptor.enable()
-
-except ImportError as e:
-    print(e)
-
-# try:
-#
-#     # class MongoPlugin(Wrapper):
-#         # def find(self,*args, **kwargs):
-#         #     origin = getattr(self.origObj, 'find')
-#         #     print("bingo bingo bingo")
-#         #     return origin(*args,**kwargs)
-#
-#     #
-#     # from motor.motor_asyncio import AsyncIOMotorClient
-#     # origin = AsyncIOMotorClient.__getitem__
-#     #
-#     # def getitem(self, key):
-#     #     ## call origin class
-#     #     return origin(self,key)
-#     #
-#     # AsyncIOMotorClient.__getitem__ = getitem
-#
-#     pass
-#
-#
-# except ImportError as e:
-#     print(e)
diff --git a/plugins/PY/pinpoint/libs/amqp/AMQPConsumerPlugin.py b/plugins/PY/pinpoint/libs/amqp/AMQPConsumerPlugin.py
deleted file mode 100644
index 684742a13..000000000
--- a/plugins/PY/pinpoint/libs/amqp/AMQPConsumerPlugin.py
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-# Created by eeliu at 1/8/21
-
-
-# ******************************************************************************
-#   Copyright  2020. NAVER Corp.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# ******************************************************************************
-
-from pinpoint.common import *
-import pinpointPy
-
-#@deprecated
-class ConsumerCallbackPlugin(Candy):
-    def __init__(self, name):
-        super().__init__(name)
-
-    def onBefore(self,*args, **kwargs):
-        return args, kwargs
-
-    def onEnd(self, ret):
-        ###############################################################
-
-        ###############################################################
-        # super().onEnd(ret)
-        return ret
-
-    def onException(self, e):
-        pinpointPy.mark_as_error(str(e), "", 0)
-        raise e
-
-
-class AMQPConsumerPlugin(Candy):
-
-    def __init__(self, name):
-        super().__init__(name)
-
-
-
-    def onBefore(self, *args, **kwargs):
-        if 'callback' in kwargs:
-            ori_callback = kwargs['callback']
-            plugins = ConsumerCallbackPlugin('amqp_consumer_callback')
-
-            @ConsumerCallbackPlugin('amqp_consumer_callback')
-            def amqp_consumer_callback(message):
-                # print(message.headers)
-                return ori_callback(message)
-
-            kwargs['callback'] = amqp_consumer_callback
-
-        return args, kwargs
-
-    def onEnd(self, ret):
-        return ret
-
-    def onException(self, e):
-        raise e
\ No newline at end of file
diff --git a/plugins/PY/pinpoint/libs/amqp/AMQPPublicPlugin.py b/plugins/PY/pinpoint/libs/amqp/AMQPPublicPlugin.py
deleted file mode 100644
index 81eaa5abd..000000000
--- a/plugins/PY/pinpoint/libs/amqp/AMQPPublicPlugin.py
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-# Created by eeliu at 12/29/20
-
-
-# ******************************************************************************
-#   Copyright  2020. NAVER Corp.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# ******************************************************************************
-
-from pinpoint.common import *
-import pinpointPy
-
-class AMQPPublicPlugin(Candy):
-    def __init__(self, name):
-        super().__init__(name)
-
-    def onBefore(self,*args, **kwargs):
-        super().onBefore(*args, **kwargs)
-        ###############################################################
-        pinpointPy.add_clue(PP_INTERCEPTOR_NAME, self.getFuncUniqueName())
-        pinpointPy.add_clue(PP_SERVER_TYPE, PP_RABBITMQ_CLIENT)
-
-        if 'routing_key' in kwargs and not kwargs['routing_key']:
-            pinpointPy.add_clues(PP_RABBITMQ_ROUTINGKEY, kwargs['routing_key'])
-
-        if 'exchange' in kwargs and not kwargs['exchange']:
-            pinpointPy.add_clues(PP_RABBITMQ_EXCHANGEKEY, kwargs['exchange'])
-
-        connect = args[0].connection
-        pinpointPy.add_clue(PP_DESTINATION, str(connect))
-        ###############################################################
-
-        return args, kwargs
-
-    def onEnd(self,ret):
-        super().onEnd(ret)
-        return ret
\ No newline at end of file
diff --git a/plugins/PY/pinpoint/libs/amqp/__init__.py b/plugins/PY/pinpoint/libs/amqp/__init__.py
deleted file mode 100644
index d62f00cb0..000000000
--- a/plugins/PY/pinpoint/libs/amqp/__init__.py
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-# Created by eeliu at 12/29/20
-
-# ******************************************************************************
-#   Copyright  2020. NAVER Corp.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# ******************************************************************************
-
-from pinpoint.common import Interceptor
-
-
-def monkey_patch():
-    try:
-        from amqp.channel import Channel
-        from .AMQPPublicPlugin import AMQPPublicPlugin
-        # from .AMQPConsumerPlugin import AMQPConsumerPlugin
-
-        Interceptors = [
-            Interceptor(Channel, 'basic_publish_confirm', AMQPPublicPlugin),
-            # Interceptor(Channel, 'basic_consume', AMQPConsumerPlugin),
-        ]
-        for interceptor in Interceptors:
-            interceptor.enable()
-
-    except ImportError as e:
-        # do nothing
-        print(e)
-
-__all__=['monkey_patch']
\ No newline at end of file
diff --git a/plugins/PY/pinpoint/libs/celeryCaller/GetPlugin.py b/plugins/PY/pinpoint/libs/celeryCaller/GetPlugin.py
deleted file mode 100644
index 89e670734..000000000
--- a/plugins/PY/pinpoint/libs/celeryCaller/GetPlugin.py
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-# Created by eeliu at 12/29/20
-
-
-# ******************************************************************************
-#   Copyright  2020. NAVER Corp.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# ******************************************************************************
-
-from pinpoint.common import PinpointCommonPlugin
-
-
-class GetPlugin(PinpointCommonPlugin):
-    pass
\ No newline at end of file
diff --git a/plugins/PY/pinpoint/libs/celeryCaller/TaskPlugin.py b/plugins/PY/pinpoint/libs/celeryCaller/TaskPlugin.py
deleted file mode 100644
index 0bcff0edf..000000000
--- a/plugins/PY/pinpoint/libs/celeryCaller/TaskPlugin.py
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-# Created by eeliu at 12/29/20
-
-
-
-# ******************************************************************************
-#   Copyright  2020. NAVER Corp.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# ******************************************************************************
-
-import pinpointPy
-
-from pinpoint.common import PinpointCommonPlugin, PP_DESTINATION, PP_NEXT_SPAN_ID, generateSid, \
-    PP_SERVER_TYPE, PP_REMOTE_METHOD, local_host_name
-
-
-class TaskPlugin(PinpointCommonPlugin):
-    def onBefore(self, *args, **kwargs):
-        super().onBefore(*args, **kwargs)
-        pinpointPy.add_clue(PP_SERVER_TYPE, PP_REMOTE_METHOD)
-        pinpointPy.add_clue(PP_DESTINATION,args[0].name)
-        nsid = generateSid()
-        pinpointPy.set_context_key(PP_NEXT_SPAN_ID, nsid)
-        pinpointPy.add_clue(PP_NEXT_SPAN_ID,nsid)
-        return args,kwargs
-
-
-
-
diff --git a/plugins/PY/pinpoint/libs/celeryCaller/__init__.py b/plugins/PY/pinpoint/libs/celeryCaller/__init__.py
deleted file mode 100644
index 79bc9d390..000000000
--- a/plugins/PY/pinpoint/libs/celeryCaller/__init__.py
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-# Created by eeliu at 12/29/20
-
-
-# ******************************************************************************
-#   Copyright  2020. NAVER Corp.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# ******************************************************************************
-
-from pinpoint.common import Interceptor
-
-
-def monkey_patch():
-    try:
-        import celery
-        from celery.app.task import Task
-        from celery.result import AsyncResult
-
-        from .TaskPlugin import TaskPlugin
-        from .GetPlugin import GetPlugin
-
-        Interceptors = [
-            Interceptor(Task, 'delay', TaskPlugin),
-            Interceptor(AsyncResult, 'get', GetPlugin),
-        ]
-        for interceptor in Interceptors:
-            interceptor.enable()
-    except ImportError as e:
-        # do nothing
-        print(e)
-
-__all__=['monkey_patch']
\ No newline at end of file
diff --git a/plugins/PY/pinpoint/libs/celeryTask/TaskPlugin.py b/plugins/PY/pinpoint/libs/celeryTask/TaskPlugin.py
deleted file mode 100644
index c97fde716..000000000
--- a/plugins/PY/pinpoint/libs/celeryTask/TaskPlugin.py
+++ /dev/null
@@ -1,170 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-# Created by eeliu at 1/6/21
-
-# ******************************************************************************
-#   Copyright  2020. NAVER Corp.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# ******************************************************************************
-
-
-import pinpointPy
-from pinpoint.common import *
-
-class TaskPlugin(Candy):
-
-    def __init__(self, name):
-        super().__init__(name)
-        self.type= Candy.E_PER_REQ
-
-    def isSample(self,args):
-        if pinpointPy.trace_has_root():# no trace
-            self.type = Candy.E_FUNCTION 
-        else:
-            self.type = Candy.E_PER_REQ
-        return True
-
-    def onBefore(self, *args, **kwargs):
-        if self.type == Candy.E_FUNCTION:
-            return self.funcOnBefore(*args, **kwargs)
-        else:
-            return self.perRequestOnBefore(*args, **kwargs)
-
-    def onEnd(self, ret):
-        if self.type == Candy.E_FUNCTION:
-            return self.funcOnEnd(ret)
-        else:
-            return self.onRequestOnEnd(ret)
-
-    def funcOnBefore(self,*args, **kwargs):
-        super().onBefore(*args, **kwargs)
-        ###############################################################
-
-        pinpointPy.add_clue(PP_INTERCEPTOR_NAME, self.getFuncUniqueName())
-        pinpointPy.add_clue(PP_SERVER_TYPE, PP_CELERY)
-
-        ###############################################################
-        return args, kwargs
-
-    def funcOnEnd(self,ret):
-        ###############################################################
-        pinpointPy.add_clues(PP_RETURN, str(ret))
-        ###############################################################
-        super().onEnd(ret)
-        return ret
-
-
-    def perRequestOnBefore(self, *args, **kwargs):
-        super().onBefore(*args, **kwargs)
-        APP_NAME = 'celery-task-queue'
-        taskName = args[3]['task']
-        APP_ID = taskName[0:24]
-
-        pinpointPy.add_clue(PP_APP_NAME, APP_NAME)
-        pinpointPy.add_clue(PP_APP_ID, APP_ID)
-        pinpointPy.set_context_key(PP_APP_NAME,APP_NAME)
-        ###############################################################
-
-        headers= args[3]
-        pinpointPy.add_clue(PP_INTERCEPTOR_NAME, 'worker')
-        pinpointPy.add_clue(PP_REQ_URI, APP_ID)
-        if 'hostname' in headers:
-            pinpointPy.add_clue(PP_REQ_SERVER,headers['hostname'])
-        # use PP_RABBITMQ_CLIENT as default
-        serverType = PP_RABBITMQ_CLIENT
-
-        if PP_HEADER_PINPOINT_SPANID in headers:
-            self.sid = headers[PP_HEADER_PINPOINT_SPANID]
-        else:
-            self.sid = generateSid()
-        pinpointPy.set_context_key(PP_SPAN_ID, self.sid)
-
-        if PP_HEADER_PINPOINT_TRACEID in headers:
-            self.tid = headers[PP_HEADER_PINPOINT_TRACEID]
-        else:
-            self.tid = generateTid()
-        pinpointPy.set_context_key(PP_TRANSCATION_ID, self.tid)
-        
-        if 'delivery_info' in headers:
-            pinpointPy.add_clue(PP_PARENT_NAME, "celery-beat")
-            pinpointPy.add_clue(PP_REQ_CLIENT, "Unknown")
-            if 'origin' in headers:
-                pinpointPy.add_clue(PP_PARENT_HOST, headers['origin'])
-            if 'exchange' in headers:
-                pinpointPy.add_clue(PP_REQ_URI,"rabbitmq://exchange="+headers['exchange'])
-            if 'routing_key' in headers:
-                pinpointPy.add_clues(PP_RABBITMQ_ROUTINGKEY,headers['routing_key'])
-            # set span id zero
-            pinpointPy.add_clue(PP_PARENT_SPAN_ID, '0')
-        
-        if PP_HEADER_PINPOINT_CLIENT in headers:
-            pinpointPy.add_clue(PP_REQ_CLIENT, headers[PP_HEADER_PINPOINT_CLIENT])
-
-        if PP_HTTP_PINPOINT_PAPPNAME in headers:
-            self.pname = headers[PP_HTTP_PINPOINT_PAPPNAME]
-            pinpointPy.set_context_key(PP_PARENT_NAME, self.pname)
-            pinpointPy.add_clue(PP_PARENT_NAME, self.pname)
-
-        if PP_HTTP_PINPOINT_PAPPTYPE in headers:
-            self.ptype = headers[PP_HTTP_PINPOINT_PAPPTYPE]
-            pinpointPy.set_context_key(PP_PARENT_TYPE, self.ptype)
-            pinpointPy.add_clue(PP_PARENT_TYPE, self.ptype)
-            pinpointPy.add_clue(PP_SERVER_TYPE, self.ptype)
-
-        if PP_HEADER_PINPOINT_HOST in headers:
-            self.Ah = headers[PP_HEADER_PINPOINT_HOST]
-            pinpointPy.set_context_key(PP_PARENT_HOST, self.Ah)
-            pinpointPy.add_clue(PP_PARENT_HOST, self.Ah)
-
-        if PP_HEADER_PINPOINT_PSPANID in headers:
-            pinpointPy.add_clue(PP_PARENT_SPAN_ID, headers[PP_HEADER_PINPOINT_PSPANID])
-
-        if PP_HEADER_PINPOINT_PAPPNAME in headers:
-            self.pname = headers[PP_HEADER_PINPOINT_PAPPNAME]
-            pinpointPy.set_context_key(PP_PARENT_NAME, self.pname)
-            pinpointPy.add_clue(PP_PARENT_NAME, self.pname)
-
-        if PP_HEADER_PINPOINT_PAPPTYPE in headers:
-            self.ptype = headers[PP_HEADER_PINPOINT_PAPPTYPE]
-            pinpointPy.set_context_key(PP_PARENT_TYPE, self.ptype)
-            pinpointPy.add_clue(PP_PARENT_TYPE, self.ptype)
-            serverType = PYTHON
-
-        pinpointPy.set_context_key(PP_HEADER_PINPOINT_SAMPLED, "s1")
-        if (PP_HEADER_PINPOINT_SAMPLED in headers and headers[
-            PP_HEADER_PINPOINT_SAMPLED] == PP_NOT_SAMPLED) or pinpointPy.check_tracelimit():
-            pinpointPy.drop_trace()
-            pinpointPy.set_context_key(PP_HEADER_PINPOINT_SAMPLED, "s0")
-
-        pinpointPy.add_clue(PP_TRANSCATION_ID, self.tid)
-        pinpointPy.add_clue(PP_SPAN_ID, self.sid)
-        pinpointPy.set_context_key(PP_TRANSCATION_ID, self.tid)
-        pinpointPy.set_context_key(PP_SPAN_ID, self.sid)
-        pinpointPy.add_clue(PP_SERVER_TYPE, serverType)
-        pinpointPy.set_context_key(PP_SERVER_TYPE,serverType)
-
-        ###############################################################
-        return args, kwargs
-
-    def onRequestOnEnd(self, ret):
-        ###############################################################
-        # if ret:
-            # pinpointPy.add_clues(PP_HTTP_STATUS_CODE, str(ret.status_code))
-        ###############################################################
-        super().onEnd(ret)
-        return ret
-
-    def onException(self, e):
-        pinpointPy.mark_as_error(str(e), "", 0)
-        raise e
\ No newline at end of file
diff --git a/plugins/PY/pinpoint/libs/celeryTask/WorkerTaskTracePlugin.py b/plugins/PY/pinpoint/libs/celeryTask/WorkerTaskTracePlugin.py
deleted file mode 100644
index 93f1cbc9e..000000000
--- a/plugins/PY/pinpoint/libs/celeryTask/WorkerTaskTracePlugin.py
+++ /dev/null
@@ -1,129 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-# Created by eeliu at 1/6/21
-
-# ******************************************************************************
-#   Copyright  2020. NAVER Corp.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# ******************************************************************************
-
-
-import pinpointPy
-from pinpoint.common import *
-
-# @deprected
-class WorkerTaskTracePlugin(Candy):
-
-    def __init__(self, name):
-        super().__init__(name)
-        self.type= Candy.E_PER_REQ
-
-    def onBefore(self, *args, **kwargs):
-        return self.perRequestOnBefore(*args, **kwargs)
-
-    def onEnd(self, ret):
-        return self.onRequestOnEnd(ret)
-
-    def perRequestOnBefore(self, *args, **kwargs):
-        super().onBefore(*args, **kwargs)
-        APP_NAME = 'celery-task-queue'
-        APP_ID = args[0].name[0:24]
-        pinpointPy.add_clue(PP_APP_NAME, APP_NAME)
-        pinpointPy.add_clue(PP_APP_ID, APP_ID)
-        pinpointPy.set_context_key(PP_APP_NAME,APP_NAME)
-        ###############################################################
-        headers = args[4]
-        pinpointPy.add_clue(PP_INTERCEPTOR_NAME, 'worker')
-        pinpointPy.add_clue(PP_REQ_URI, APP_ID)
-        pinpointPy.add_clue(PP_REQ_SERVER, APP_ID)
-        pinpointPy.add_clue(PP_SERVER_TYPE, PYTHON)
-        pinpointPy.set_context_key(PP_SERVER_TYPE,PYTHON)
-
-        if PP_HEADER_PINPOINT_CLIENT in headers:
-            pinpointPy.add_clue(PP_REQ_CLIENT, headers[PP_HEADER_PINPOINT_CLIENT])
-
-        if PP_HTTP_PINPOINT_SPANID in headers:
-            self.sid = headers[PP_HTTP_PINPOINT_SPANID]
-        elif PP_HEADER_PINPOINT_SPANID in headers:
-            self.sid = headers[PP_HEADER_PINPOINT_SPANID]
-        else:
-            self.sid = generateSid()
-        pinpointPy.set_context_key(PP_SPAN_ID, self.sid)
-
-        if PP_HTTP_PINPOINT_TRACEID in headers:
-            self.tid = headers[PP_HTTP_PINPOINT_TRACEID]
-        elif PP_HEADER_PINPOINT_TRACEID in headers:
-            self.tid = headers[PP_HEADER_PINPOINT_TRACEID]
-        else:
-            self.tid = generateTid()
-        pinpointPy.set_context_key(PP_TRANSCATION_ID, self.tid)
-
-        if PP_HTTP_PINPOINT_PAPPNAME in headers:
-            self.pname = headers[PP_HTTP_PINPOINT_PAPPNAME]
-            pinpointPy.set_context_key(PP_PARENT_NAME, self.pname)
-            pinpointPy.add_clue(PP_PARENT_NAME, self.pname)
-
-        if PP_HTTP_PINPOINT_PAPPTYPE in headers:
-            self.ptype = headers[PP_HTTP_PINPOINT_PAPPTYPE]
-            pinpointPy.set_context_key(PP_PARENT_TYPE, self.ptype)
-            pinpointPy.add_clue(PP_PARENT_TYPE, self.ptype)
-
-        if PP_HTTP_PINPOINT_HOST in headers:
-            self.Ah = headers[PP_HTTP_PINPOINT_HOST]
-            pinpointPy.set_context_key(PP_PARENT_HOST, self.Ah)
-            pinpointPy.add_clue(PP_PARENT_HOST, self.Ah)
-
-        if PP_HTTP_PINPOINT_PSPANID in headers:
-            pinpointPy.add_clue(PP_PARENT_SPAN_ID, headers[PP_HTTP_PINPOINT_PSPANID])
-
-        if PP_HEADER_PINPOINT_PAPPNAME in headers:
-            self.pname = headers[PP_HEADER_PINPOINT_PAPPNAME]
-            pinpointPy.set_context_key(PP_PARENT_NAME, self.pname)
-            pinpointPy.add_clue(PP_PARENT_NAME, self.pname)
-
-        if PP_HEADER_PINPOINT_PAPPTYPE in headers:
-            self.ptype = headers[PP_HEADER_PINPOINT_PAPPTYPE]
-            pinpointPy.set_context_key(PP_PARENT_TYPE, self.ptype)
-            pinpointPy.add_clue(PP_PARENT_TYPE, self.ptype)
-
-        if PP_HEADER_PINPOINT_HOST in headers:
-            self.Ah = headers[PP_HEADER_PINPOINT_HOST]
-            pinpointPy.set_context_key(PP_PARENT_HOST, self.Ah)
-            pinpointPy.add_clue(PP_PARENT_HOST, self.Ah)
-
-        pinpointPy.set_context_key(PP_HEADER_PINPOINT_SAMPLED, "s1")
-        if (PP_HTTP_PINPOINT_SAMPLED in headers and headers[
-            PP_HTTP_PINPOINT_SAMPLED] == PP_NOT_SAMPLED) or pinpointPy.check_tracelimit():
-            pinpointPy.drop_trace()
-            pinpointPy.set_context_key(PP_HEADER_PINPOINT_SAMPLED, "s0")
-
-        pinpointPy.add_clue(PP_TRANSCATION_ID, self.tid)
-        pinpointPy.add_clue(PP_SPAN_ID, self.sid)
-        pinpointPy.set_context_key(PP_TRANSCATION_ID, self.tid)
-        pinpointPy.set_context_key(PP_SPAN_ID, self.sid)
-
-        ###############################################################
-        return args, kwargs
-
-    def onRequestOnEnd(self, ret):
-        ###############################################################
-        # if ret:
-            # pinpointPy.add_clues(PP_HTTP_STATUS_CODE, str(ret.status_code))
-        ###############################################################
-        super().onEnd(ret)
-        return ret
-
-    def onException(self, e):
-        pinpointPy.mark_as_error(str(e), "", 0)
-        raise e
\ No newline at end of file
diff --git a/plugins/PY/pinpoint/libs/celeryTask/WrapperTracer.py b/plugins/PY/pinpoint/libs/celeryTask/WrapperTracer.py
deleted file mode 100644
index f42b173aa..000000000
--- a/plugins/PY/pinpoint/libs/celeryTask/WrapperTracer.py
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-# Created by eeliu at 2/4/21
-
-
-# ******************************************************************************
-#   Copyright  2020. NAVER Corp.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# ******************************************************************************
-
-
-from pinpoint.common import *
-
-from .TaskPlugin import TaskPlugin
-
-
-class WrapperTracer:
-    def __init__(self, name):
-        pass
-
-    def __call__(self, func):
-        self.func_name=func.__name__
-        def pinpointTrace(*args, **kwargs):
-            ori= func(*args, **kwargs)
-            plugin = TaskPlugin("build_tracer_trace_task")
-            return plugin(ori)
-
-        return pinpointTrace
diff --git a/plugins/PY/pinpoint/libs/celeryTask/__init__.py b/plugins/PY/pinpoint/libs/celeryTask/__init__.py
deleted file mode 100644
index 3d3134f1d..000000000
--- a/plugins/PY/pinpoint/libs/celeryTask/__init__.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# ******************************************************************************
-#   Copyright  2020. NAVER Corp.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# ******************************************************************************
-
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-# Created by eeliu at 2/4/21
-
-from pinpoint.common import Interceptor
-
-def monkey_patch():
-    try:
-        from .WrapperTracer import WrapperTracer
-        # from .WorkerTaskTracePlugin import  WorkerTaskTracePlugin
-        from celery.app import trace
-        Interceptors = [
-            # Interceptor(trace, 'trace_task', WorkerTaskTracePlugin),
-            Interceptor(trace, 'build_tracer', WrapperTracer),
-        ]
-        for interceptor in Interceptors:
-            interceptor.enable()
-    except ImportError as e:
-        print(e)
-
-__all__ = ['monkey_patch']
\ No newline at end of file
diff --git a/plugins/PY/pinpoint/libs/kombu/ProducerPlugin.py b/plugins/PY/pinpoint/libs/kombu/ProducerPlugin.py
deleted file mode 100644
index 655be5a5c..000000000
--- a/plugins/PY/pinpoint/libs/kombu/ProducerPlugin.py
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-# Created by eeliu at 12/29/20
-
-
-# ******************************************************************************
-#   Copyright  2020. NAVER Corp.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# ******************************************************************************
-
-from pinpoint.common import *
-import pinpointPy
-
-class ProducerPlugin(Candy):
-    def __init__(self, name):
-        super().__init__(name)
-    
-    def onBefore(self,*args, **kwargs):
-        super().onBefore(*args, **kwargs)
-        ###############################################################
-        pinpointPy.add_clue(PP_INTERCEPTOR_NAME, self.getFuncUniqueName())
-        pinpointPy.add_clue(PP_SERVER_TYPE, PP_RABBITMQ_CLIENT)
-        if 'exchange' in kwargs and not kwargs['exchange']:
-            pinpointPy.add_clues(PP_RABBITMQ_EXCHANGEKEY, kwargs['exchange'])
-
-        if 'routing_key' in kwargs and not kwargs['routing_key']:
-            if kwargs['routing_key'] == 'worker.heartbeat':
-                pinpointPy.drop_trace()
-            pinpointPy.add_clues(PP_RABBITMQ_ROUTINGKEY, kwargs['routing_key'])
-        
-        if 'task' in  kwargs['headers']:
-            target = kwargs['headers']['task']
-            generatePPRabbitMqHeader(target,kwargs['headers'])
-
-        uri = args[0].connection.as_uri()
-        pinpointPy.add_clue(PP_DESTINATION, str(uri))
-        ###############################################################
-        return args, kwargs
-
-    def onEnd(self,ret):
-        super().onEnd(ret)
-        return ret
\ No newline at end of file
diff --git a/plugins/PY/pinpoint/libs/kombu/__init__.py b/plugins/PY/pinpoint/libs/kombu/__init__.py
deleted file mode 100644
index 33b346277..000000000
--- a/plugins/PY/pinpoint/libs/kombu/__init__.py
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-# Created by eeliu at 12/29/20
-
-
-# ******************************************************************************
-#   Copyright  2020. NAVER Corp.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# ******************************************************************************
-
-from pinpoint.common import Interceptor
-
-
-def monkey_patch():
-    try:
-        from kombu.messaging import Producer
-        from .ProducerPlugin import ProducerPlugin
-
-        Interceptors = [
-            Interceptor(Producer, 'publish', ProducerPlugin),
-        ]
-        for interceptor in Interceptors:
-            interceptor.enable()
-
-
-    except ImportError as e:
-        # do nothing
-        print(e)
-
-__all__=['monkey_patch']
\ No newline at end of file
diff --git a/plugins/PY/pinpoint/libs/librabbitmq/__init__.py b/plugins/PY/pinpoint/libs/librabbitmq/__init__.py
deleted file mode 100644
index ff11c7126..000000000
--- a/plugins/PY/pinpoint/libs/librabbitmq/__init__.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# ******************************************************************************
-#   Copyright  2020. NAVER Corp.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# ******************************************************************************
-
-
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-# Created by eeliu at 1/7/21
diff --git a/plugins/PY/pinpoint/libs/pyRedis/PyRedisPlugins.py b/plugins/PY/pinpoint/libs/pyRedis/PyRedisPlugins.py
deleted file mode 100644
index 3f17fdceb..000000000
--- a/plugins/PY/pinpoint/libs/pyRedis/PyRedisPlugins.py
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-
-# Created by eeliu at 8/20/20
-
-
-# ******************************************************************************
-#   Copyright  2020. NAVER Corp.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# ******************************************************************************
-
-import pinpointPy
-
-from pinpoint.common import *
-
-
-class PyRedisPlugins(Candy):
-
-    def __init__(self,name):
-        super().__init__(name)
-        self.dst = ''
-
-    def onBefore(self,*args, **kwargs):
-        super().onBefore(*args, **kwargs)
-        ###############################################################
-        pinpointPy.add_clue(PP_INTERCEPTOR_NAME,self.getFuncUniqueName())
-        pinpointPy.add_clue(PP_SERVER_TYPE, PP_REDIS)
-        ###############################################################
-        pinpointPy.add_clue(PP_DESTINATION, str(args[0]))
-        return args,kwargs
-
-    def onEnd(self,ret):
-        ###############################################################
-        # pinpointPy.add_clues(PP_RETURN,str(ret))
-        ###############################################################
-        super().onEnd(ret)
-        return ret
-
-    def onException(self, e):
-        pinpointPy.add_clue(PP_ADD_EXCEPTION,str(e))
-
-
diff --git a/plugins/PY/pinpoint/pyramid/Readme.md b/plugins/PY/pinpoint/pyramid/Readme.md
deleted file mode 100644
index e69de29bb..000000000
diff --git a/plugins/PY/pinpoint/settings.py b/plugins/PY/pinpoint/settings.py
deleted file mode 100644
index c1a3e61c6..000000000
--- a/plugins/PY/pinpoint/settings.py
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-
-# ------------------------------------------------------------------------------
-#  Copyright  2020. NAVER Corp.                                                -
-#                                                                              -
-#  Licensed under the Apache License, Version 2.0 (the "License");             -
-#  you may not use this file except in compliance with the License.            -
-#  You may obtain a copy of the License at                                     -
-#                                                                              -
-#   http://www.apache.org/licenses/LICENSE-2.0                                 -
-#                                                                              -
-#  Unless required by applicable law or agreed to in writing, software         -
-#  distributed under the License is distributed on an "AS IS" BASIS,           -
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    -
-#  See the License for the specific language governing permissions and         -
-#  limitations under the License.                                              -
-# ------------------------------------------------------------------------------
-
-# Created by eeliu at 7/31/20
-
-
-
-import pinpointPy
-
-###############################################################
-
-# user should set below before use
-APP_ID ='python-agent' # application id
-APP_NAME ='PYTHON-AGENT' # application name
-# COLLECTOR_HOST='unix:/tmp/collector-agent.sock'
-COLLECTOR_HOST='tcp:dev-collector:9999'
-APP_SUB_ID='1'
-
-###############################################################
-
-pinpointPy.set_agent(collector_host=COLLECTOR_HOST,trace_limit=-1)
-
-# pinpointPy.set_agent(collector_host='Tcp:ip:port',trace_limit=-1)
-
-# def output(msg):
-#     print(msg)
-#
-# pinpointPy.enable_debug(None)
-
-__all__=['APP_ID','APP_NAME','APP_SUB_ID','COLLECTOR_HOST']
\ No newline at end of file
diff --git a/plugins/PY/pinpoint/tornado/HTTPRequestPlugins.py b/plugins/PY/pinpoint/tornado/HTTPRequestPlugins.py
deleted file mode 100644
index 97599b6b9..000000000
--- a/plugins/PY/pinpoint/tornado/HTTPRequestPlugins.py
+++ /dev/null
@@ -1,140 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-
-# ------------------------------------------------------------------------------
-#  Copyright  2020. NAVER Corp.                                                -
-#                                                                              -
-#  Licensed under the Apache License, Version 2.0 (the "License");             -
-#  you may not use this file except in compliance with the License.            -
-#  You may obtain a copy of the License at                                     -
-#                                                                              -
-#   http://www.apache.org/licenses/LICENSE-2.0                                 -
-#                                                                              -
-#  Unless required by applicable law or agreed to in writing, software         -
-#  distributed under the License is distributed on an "AS IS" BASIS,           -
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    -
-#  See the License for the specific language governing permissions and         -
-#  limitations under the License.                                              -
-# ------------------------------------------------------------------------------
-
-# Created by eeliu at 3/5/20
-
-
-from .PinpointAsyCommon import *
-
-import pinpointPy
-import tornado.web
-
-class HTTPRequestPlugins(AsyCandy):
-    def __init__(self,class_name,module_name):
-        super().__init__(class_name,module_name)
-        self.isLimit = False
-
-    def onBefore(self,*args, **kwargs):
-        super().onBefore(*args, **kwargs)
-        pinpointPy.add_clue(PP_APP_NAME,APP_NAME,self.node_id)
-        pinpointPy.add_clue(PP_APP_ID, APP_ID,self.node_id)
-        pinpointPy.set_context_key(PP_APP_NAME, APP_NAME,self.node_id)
-        ###############################################################
-        insBaseHttp = args[0]
-        assert isinstance(insBaseHttp,tornado.web.RequestHandler)
-        pinpointPy.add_clue(PP_INTERCEPTOR_NAME, 'tornado.web.RequestHandler',self.node_id)
-        pinpointPy.add_clue(PP_REQ_URI,insBaseHttp.request.uri,self.node_id)
-        pinpointPy.add_clue(PP_REQ_CLIENT,insBaseHttp.request.remote_ip,self.node_id)
-        pinpointPy.add_clue(PP_REQ_SERVER,insBaseHttp.request.host_name,self.node_id)
-        pinpointPy.add_clue(PP_SERVER_TYPE,PYTHON,self.node_id)
-        pinpointPy.set_context_key(PP_SERVER_TYPE, PYTHON,self.node_id)
-        insRequest = insBaseHttp.request
-        # nginx add http
-        if PP_HTTP_PINPOINT_PSPANID in insRequest.headers:
-            pinpointPy.add_clue(PP_PARENT_SPAN_ID, insRequest.headers[PP_HTTP_PINPOINT_PSPANID], self.node_id)
-
-        if PP_HTTP_PINPOINT_SPANID in insRequest.headers:
-            self.sid = insRequest.headers[PP_HTTP_PINPOINT_SPANID]
-        elif PP_HEADER_PINPOINT_SPANID in insRequest.headers:
-            self.sid = insRequest.headers[PP_HEADER_PINPOINT_SPANID]
-        else:
-            self.sid = self.generateSid()
-        pinpointPy.set_context_key(PP_SPAN_ID,self.sid,self.node_id)
-
-        if PP_HTTP_PINPOINT_TRACEID in insRequest.headers:
-            self.tid = insRequest.headers[PP_HTTP_PINPOINT_TRACEID]
-        elif PP_HEADER_PINPOINT_TRACEID in insRequest.headers:
-            self.tid = insRequest.headers[PP_HEADER_PINPOINT_TRACEID]
-        else:
-            self.tid = self.generateTid()
-        pinpointPy.set_context_key(PP_TRANSCATION_ID,self.tid,self.node_id)
-
-        if PP_HTTP_PINPOINT_PAPPNAME in insRequest.headers:
-            self.pname = insRequest.headers[PP_HTTP_PINPOINT_PAPPNAME]
-            pinpointPy.set_context_key(PP_PARENT_NAME,self.pname,self.node_id)
-            pinpointPy.add_clue(PP_PARENT_NAME,self.pname,self.node_id)
-
-        if PP_HTTP_PINPOINT_PAPPTYPE in insRequest.headers:
-            self.ptype = insRequest.headers[PP_HTTP_PINPOINT_PAPPTYPE]
-            pinpointPy.set_context_key(PP_PARENT_TYPE,self.ptype,self.node_id)
-            pinpointPy.add_clue(PP_PARENT_TYPE,self.ptype,self.node_id)
-
-        if PP_HTTP_PINPOINT_HOST in insRequest.headers:
-            self.Ah = insRequest.headers[PP_HTTP_PINPOINT_HOST]
-            pinpointPy.set_context_key(PP_PARENT_HOST,self.Ah,self.node_id)
-            pinpointPy.add_clue(PP_PARENT_HOST,self.Ah,self.node_id)
-
-        # Not nginx, no http
-        if PP_HEADER_PINPOINT_PSPANID in insRequest.headers:
-            pinpointPy.add_clue(PP_PARENT_SPAN_ID, insRequest.headers[PP_HEADER_PINPOINT_PSPANID], self.node_id)
-
-        if PP_HEADER_PINPOINT_PAPPNAME in insRequest.headers:
-            self.pname = insRequest.headers[PP_HEADER_PINPOINT_PAPPNAME]
-            pinpointPy.set_context_key(PP_PARENT_NAME, self.pname,self.node_id)
-            pinpointPy.add_clue(PP_PARENT_NAME, self.pname,self.node_id)
-
-        if PP_HEADER_PINPOINT_PAPPTYPE in insRequest.headers:
-            self.ptype = insRequest.headers[PP_HEADER_PINPOINT_PAPPTYPE]
-            pinpointPy.set_context_key(PP_PARENT_TYPE, self.ptype,self.node_id)
-            pinpointPy.add_clue(PP_PARENT_TYPE, self.ptype,self.node_id)
-
-        if PP_HEADER_PINPOINT_HOST in insRequest.headers:
-            self.Ah = insRequest.headers[PP_HEADER_PINPOINT_HOST]
-            pinpointPy.set_context_key(PP_PARENT_HOST, self.Ah,self.node_id)
-            pinpointPy.add_clue(PP_PARENT_HOST, self.Ah,self.node_id)
-
-        if PP_NGINX_PROXY in insRequest.headers:
-            pinpointPy.add_clue(PP_NGINX_PROXY, insRequest.headers[PP_NGINX_PROXY], self.node_id)
-
-        if PP_APACHE_PROXY in insRequest.headers:
-            pinpointPy.add_clue(PP_APACHE_PROXY, insRequest.headers[PP_APACHE_PROXY], self.node_id)
-
-        if PP_HEADER_PINPOINT_SAMPLED in insRequest.headers:
-            if insRequest.headers[PP_HEADER_PINPOINT_SAMPLED] == PP_NOT_SAMPLED:
-                self.isLimit = True
-                pinpointPy.drop_trace(self.node_id)
-                pinpointPy.set_context_key(PP_HEADER_PINPOINT_SAMPLED,PP_NOT_SAMPLED,self.node_id)
-        else:
-            if pinpointPy.check_tracelimit():
-                self.isLimit = True
-                pinpointPy.set_context_key(PP_HEADER_PINPOINT_SAMPLED, PP_NOT_SAMPLED,self.node_id)
-            else:
-                self.isLimit = False
-                pinpointPy.set_context_key(PP_HEADER_PINPOINT_SAMPLED, PP_SAMPLED,self.node_id)
-
-        pinpointPy.add_clue(PP_TRANSCATION_ID,self.tid,self.node_id)
-        pinpointPy.add_clue(PP_SPAN_ID,self.sid,self.node_id)
-        ###############################################################
-        return args, kwargs
-
-    def onEnd(self,ret):
-        ###############################################################
-        if self.isLimit:
-            pinpointPy.drop_trace(self.node_id)
-        ###############################################################
-        super().onEnd(ret)
-        self.isLimit = False
-        return ret
-
-    def onException(self, e):
-        pinpointPy.mark_as_error(str(e),"",0,self.node_id)
-        raise e
-
-
-
diff --git a/plugins/PY/pinpoint/tornado/PinpointAsyCommon.py b/plugins/PY/pinpoint/tornado/PinpointAsyCommon.py
deleted file mode 100644
index b4e91c1b6..000000000
--- a/plugins/PY/pinpoint/tornado/PinpointAsyCommon.py
+++ /dev/null
@@ -1,95 +0,0 @@
-﻿#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-
-# ------------------------------------------------------------------------------
-#  Copyright  2020. NAVER Corp.                                                -
-#                                                                              -
-#  Licensed under the Apache License, Version 2.0 (the "License");             -
-#  you may not use this file except in compliance with the License.            -
-#  You may obtain a copy of the License at                                     -
-#                                                                              -
-#   http://www.apache.org/licenses/LICENSE-2.0                                 -
-#                                                                              -
-#  Unless required by applicable law or agreed to in writing, software         -
-#  distributed under the License is distributed on an "AS IS" BASIS,           -
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    -
-#  See the License for the specific language governing permissions and         -
-#  limitations under the License.                                              -
-# ------------------------------------------------------------------------------
-
-# Created by eeliu at 3/5/20
-
-
-
-import random
-import asyncio
-from ..settings import *
-from pinpoint.common import *
-import pinpointPy
-import contextvars
-
-pinpointId = contextvars.ContextVar('_pinpoint_id_')
-pinpointId.set(0)
-
-
-class AsyCandy(object):
-
-    def __init__(self,class_name,module_name):
-        self.class_name = class_name
-        self.module_name = module_name
-        self.node_id = 0
-
-    def onBefore(self,*args, **kwargs):
-        id = pinpointId.get()
-        new_id = pinpointPy.start_trace(id)
-        pinpointId.set(new_id)
-        self.node_id = new_id
-        return (args,kwargs)
-
-    def onEnd(self,ret):
-        new_id = pinpointPy.end_trace(self.node_id)
-        pinpointId.set(new_id)
-
-    def onException(self,e):
-        raise NotImplementedError()
-
-    def __call__(self, func):
-        self.func_name=func.__name__
-        async def pinpointTrace(*args, **kwargs):
-            ret = None
-            self.onBefore(*args, **kwargs)
-            try:
-                ret = await func(*args, **kwargs)
-                return ret
-            except Exception as e:
-                self.onException(e)
-                raise e
-            finally:
-                # print("end", self.func_name)
-                self.onEnd(ret)
-
-        return pinpointTrace
-
-    def generateTid(self):
-        return ('%s^%s^%s') % (APP_ID,str(pinpointPy.start_time()), str(pinpointPy.unique_id()))
-
-    def generateSid(self):
-        return str(random.randint(0,2147483647))
-
-    def getFuncUniqueName(self):
-        if self.class_name:
-            return '%s\%s.%s'%(self.module_name,self.class_name,self.func_name)
-        else:
-            return '%s\%s'%(self.module_name,self.func_name)
-
-if __name__ == '__main__':
-
-    @AsyCandy('main',__name__)
-    async def run(i):
-        if i == 0:
-            return
-        await asyncio.sleep(0.1)
-        await run(i-1)
-
-    asyncio.run(run(2))
-    asyncio.run(run(2))
\ No newline at end of file
diff --git a/plugins/PY/pinpoint/Bottle/RequestPlugin.py b/plugins/PY/pinpointPy/Bottle/RequestPlugin.py
similarity index 79%
rename from plugins/PY/pinpoint/Bottle/RequestPlugin.py
rename to plugins/PY/pinpointPy/Bottle/RequestPlugin.py
index 0cf4ecff7..6f69524af 100644
--- a/plugins/PY/pinpoint/Bottle/RequestPlugin.py
+++ b/plugins/PY/pinpointPy/Bottle/RequestPlugin.py
@@ -19,16 +19,15 @@
 
 from bottle import response
 
-from pinpoint.libs import monkey_patch_for_pinpoint
-monkey_patch_for_pinpoint()
+from ..Defines import PP_HTTP_STATUS_CODE, PP_ADD_EXCEPTION
+from ..WSGIPlugin import WSGIPlugin
+from ..pinpoint import add_trace_header_v2, add_trace_header
 
-import pinpointPy
-from pinpoint.common import *
 
 class RequestPlugin(WSGIPlugin):
 
     def onEnd(self, ret):
-        pinpointPy.add_clues(PP_HTTP_STATUS_CODE,str(response.status_code))
-        if response.status_code !=200:
-            pinpointPy.add_clue(PP_ADD_EXCEPTION,"status code not 200")
-        return super().onEnd(ret)
\ No newline at end of file
+        add_trace_header_v2(PP_HTTP_STATUS_CODE, str(response.status_code))
+        if response.status_code != 200:
+            add_trace_header(PP_ADD_EXCEPTION, "status code not 200")
+        return super().onEnd(ret)
diff --git a/plugins/PY/pinpoint/Bottle/__init__.py b/plugins/PY/pinpointPy/Bottle/__init__.py
similarity index 98%
rename from plugins/PY/pinpoint/Bottle/__init__.py
rename to plugins/PY/pinpointPy/Bottle/__init__.py
index 9d652dd9e..5b21e0e5e 100644
--- a/plugins/PY/pinpoint/Bottle/__init__.py
+++ b/plugins/PY/pinpointPy/Bottle/__init__.py
@@ -19,7 +19,6 @@
 
 # Created by eeliu at 11/9/20
 
-from pinpoint.common import *
 from .RequestPlugin import RequestPlugin
 
 def PinPointMiddleWare(application):
diff --git a/plugins/PY/pinpoint/common/Common.py b/plugins/PY/pinpointPy/Common.py
similarity index 82%
rename from plugins/PY/pinpoint/common/Common.py
rename to plugins/PY/pinpointPy/Common.py
index 050ac1a57..23fd86fc8 100644
--- a/plugins/PY/pinpoint/common/Common.py
+++ b/plugins/PY/pinpointPy/Common.py
@@ -19,15 +19,10 @@
 
 # Created by eeliu at 3/5/20
 
+from . import Defines
+from . import pinpoint
 
-import pinpointPy
-
-import socket
-
-from .Defines import *
-
-
-class Candy(object):
+class PinTrace(object):
     E_PER_REQ=1
     E_FUNCTION = 2
 
@@ -39,17 +34,16 @@ def isSample(self,args):
         if not root, no trace
         :return:
         '''
-        if pinpointPy.trace_has_root() and pinpointPy.get_context_key(PP_HEADER_PINPOINT_SAMPLED) =="s1":
+        if pinpoint.trace_has_root() and pinpoint.get_context(Defines.PP_HEADER_PINPOINT_SAMPLED) == "s1":
             return True
         else:
             return False
 
-
     def onBefore(self,*args, **kwargs):
-        pinpointPy.start_trace()
+        pinpoint.with_trace()
 
     def onEnd(self,ret):
-        pinpointPy.end_trace()
+        pinpoint.end_trace()
 
     def onException(self,e):
         raise NotImplementedError()
@@ -75,18 +69,6 @@ def pinpointTrace(*args, **kwargs):
     def getFuncUniqueName(self):
         return self.name
 
-local_host_name = socket.getfqdn()
-local_ip = socket.gethostbyname(local_host_name)
-
-__all__=['local_host_name', 'Candy','local_ip']
-
-
-if __name__ == '__main__':
 
-    @Candy('main')
-    def run():
-        print("run")
 
-    run()
 
-    run()
diff --git a/plugins/PY/pinpoint/tornado/CommonPlugin.py b/plugins/PY/pinpointPy/CommonPlugin.py
similarity index 80%
rename from plugins/PY/pinpoint/tornado/CommonPlugin.py
rename to plugins/PY/pinpointPy/CommonPlugin.py
index 5dc66ba9e..0e0596c7f 100644
--- a/plugins/PY/pinpoint/tornado/CommonPlugin.py
+++ b/plugins/PY/pinpointPy/CommonPlugin.py
@@ -15,32 +15,33 @@
 # ------------------------------------------------------------------------------
 
 
-from .PinpointAsyCommon import *
-import pinpointPy
+from . import Common
+from . import Defines
+from . import pinpoint
 
 
-class CommonPlugin(AsyCandy):
+class PinpointCommonPlugin(Common.PinTrace):
 
     def onBefore(self,*args, **kwargs):
         super().onBefore(*args, **kwargs)
         ###############################################################
-        pinpointPy.add_clue(PP_INTERCEPTOR_NAME,self.getFuncUniqueName(),self.node_id)
-        pinpointPy.add_clue(PP_SERVER_TYPE,PP_METHOD_CALL,self.node_id)
+        pinpoint.add_trace_header(Defines.PP_INTERCEPTOR_NAME, self.getFuncUniqueName())
+        pinpoint.add_trace_header(Defines.PP_SERVER_TYPE, Defines.PP_METHOD_CALL)
         arg = self.get_arg(*args, **kwargs)
-        pinpointPy.add_clues(PP_ARGS, arg,self.node_id)
+        pinpoint.add_trace_header_v2(Defines.PP_ARGS, arg)
         ###############################################################
-        # print( threading.currentThread().ident)
         return args,kwargs
 
     def onEnd(self,ret):
         ###############################################################
-        pinpointPy.add_clues(PP_RETURN,str(ret),self.node_id)
+        pinpoint.add_trace_header_v2(Defines.PP_RETURN, str(ret))
         ###############################################################
         super().onEnd(ret)
         return ret
 
     def onException(self, e):
-        pinpointPy.add_clue('EXP',str(e),self.node_id)
+        pinpoint.add_trace_header(Defines.PP_ADD_EXCEPTION, str(e))
+        raise e
 
     def get_arg(self, *args, **kwargs):
         args_tmp = {}
diff --git a/plugins/PY/pinpoint/common/Defines.py b/plugins/PY/pinpointPy/Defines.py
similarity index 99%
rename from plugins/PY/pinpoint/common/Defines.py
rename to plugins/PY/pinpointPy/Defines.py
index 856c3d028..116a99e82 100644
--- a/plugins/PY/pinpoint/common/Defines.py
+++ b/plugins/PY/pinpointPy/Defines.py
@@ -99,4 +99,4 @@
 PP_KAFKA_TOPIC='140'
 PP_RABBITMQ_CLIENT='8300'
 PP_RABBITMQ_EXCHANGEKEY='130'
-PP_RABBITMQ_ROUTINGKEY='131'
+PP_RABBITMQ_ROUTINGKEY='131'
\ No newline at end of file
diff --git a/plugins/PY/pinpointPy/Django/BaseDjangoRequestPlugins.py b/plugins/PY/pinpointPy/Django/BaseDjangoRequestPlugins.py
new file mode 100644
index 000000000..5cf9c54f8
--- /dev/null
+++ b/plugins/PY/pinpointPy/Django/BaseDjangoRequestPlugins.py
@@ -0,0 +1,137 @@
+#!/usr/bin/env python
+# -*- coding: UTF-8 -*-
+
+# ------------------------------------------------------------------------------
+#  Copyright  2020. NAVER Corp.                                                -
+#                                                                              -
+#  Licensed under the Apache License, Version 2.0 (the "License");             -
+#  you may not use this file except in compliance with the License.            -
+#  You may obtain a copy of the License at                                     -
+#                                                                              -
+#   http://www.apache.org/licenses/LICENSE-2.0                                 -
+#                                                                              -
+#  Unless required by applicable law or agreed to in writing, software         -
+#  distributed under the License is distributed on an "AS IS" BASIS,           -
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    -
+#  See the License for the specific language governing permissions and         -
+#  limitations under the License.                                              -
+# ------------------------------------------------------------------------------
+
+# Created by eeliu at 3/5/20
+
+from .. import Common
+from .. import Defines
+from .. import pinpoint
+
+
+class BaseDjangoRequestPlugins(Common.PinTrace):
+    def __init__(self,name):
+        super().__init__(name)
+
+
+    def onBefore(self,*args, **kwargs):
+        super().onBefore(*args, **kwargs)
+        pinpoint.add_trace_header(Defines.PP_APP_NAME, pinpoint.app_name())
+        pinpoint.add_trace_header(Defines.PP_APP_ID, pinpoint.app_id())
+        pinpoint.add_context(Defines.PP_APP_NAME, pinpoint.app_name())
+        ###############################################################
+        request = args[1]
+        headers = request.META
+
+        # assert isinstance(request,BaseHTTPRequestHandler)
+        pinpoint.add_trace_header(Defines.PP_INTERCEPTOR_NAME, 'BaseDjangoRequest request')
+        pinpoint.add_trace_header(Defines.PP_REQ_URI, request.path)
+        # print(headers)
+        pinpoint.add_trace_header(Defines.PP_REQ_CLIENT, headers['REMOTE_ADDR'])
+        pinpoint.add_trace_header(Defines.PP_REQ_SERVER, request.get_host())
+        pinpoint.add_trace_header(Defines.PP_SERVER_TYPE, Defines.PYTHON)
+        pinpoint.add_context(Defines.PP_SERVER_TYPE, Defines.PYTHON)
+        # nginx add http
+        if Defines.PP_HTTP_PINPOINT_PSPANID in headers:
+            pinpoint.add_trace_header(Defines.PP_PARENT_SPAN_ID, headers[Defines.PP_HTTP_PINPOINT_PSPANID])
+
+        if Defines.PP_HTTP_PINPOINT_SPANID in headers:
+            self.sid = headers[Defines.PP_HTTP_PINPOINT_SPANID]
+        elif Defines.PP_HEADER_PINPOINT_SPANID in headers:
+            self.sid = headers[Defines.PP_HEADER_PINPOINT_SPANID]
+        else:
+            self.sid = pinpoint.gen_sid()
+        pinpoint.add_context(Defines.PP_SPAN_ID, self.sid)
+
+
+        if Defines.PP_HTTP_PINPOINT_TRACEID in headers:
+            self.tid = headers[Defines.PP_HTTP_PINPOINT_TRACEID]
+        elif Defines.PP_HEADER_PINPOINT_TRACEID in headers:
+            self.tid = headers[Defines.PP_HEADER_PINPOINT_TRACEID]
+        else:
+            self.tid = pinpoint.gen_tid()
+        pinpoint.add_context(Defines.PP_TRANSCATION_ID, self.tid)
+
+        if Defines.PP_HTTP_PINPOINT_PAPPNAME in headers:
+            self.pname = headers[Defines.PP_HTTP_PINPOINT_PAPPNAME]
+            pinpoint.add_context(Defines.PP_PARENT_NAME, self.pname)
+            pinpoint.add_trace_header(Defines.PP_PARENT_NAME, self.pname)
+
+        if Defines.PP_HTTP_PINPOINT_PAPPTYPE in headers:
+            self.ptype = headers[Defines.PP_HTTP_PINPOINT_PAPPTYPE]
+            pinpoint.add_context(Defines.PP_PARENT_TYPE, self.ptype)
+            pinpoint.add_trace_header(Defines.PP_PARENT_TYPE, self.ptype)
+
+        if Defines.PP_HTTP_PINPOINT_HOST in headers:
+            self.Ah = headers[Defines.PP_HTTP_PINPOINT_HOST]
+            pinpoint.add_context(Defines.PP_PARENT_HOST, self.Ah)
+            pinpoint.add_trace_header(Defines.PP_PARENT_HOST, self.Ah)
+
+        if Defines.PP_HTTP_PINPOINT_PSPANID in headers:
+            pinpoint.add_trace_header(Defines.PP_PARENT_SPAN_ID, headers[Defines.PP_HTTP_PINPOINT_PSPANID])
+
+        if Defines.PP_HEADER_PINPOINT_PAPPNAME in headers:
+            self.pname = headers[Defines.PP_HEADER_PINPOINT_PAPPNAME]
+            pinpoint.add_context(Defines.PP_PARENT_NAME, self.pname)
+            pinpoint.add_trace_header(Defines.PP_PARENT_NAME, self.pname)
+
+        if Defines.PP_HEADER_PINPOINT_PAPPTYPE in headers:
+            self.ptype = headers[Defines.PP_HEADER_PINPOINT_PAPPTYPE]
+            pinpoint.add_context(Defines.PP_PARENT_TYPE, self.ptype)
+            pinpoint.add_trace_header(Defines.PP_PARENT_TYPE, self.ptype)
+
+        if Defines.PP_HEADER_PINPOINT_HOST in headers:
+            self.Ah = headers[Defines.PP_HEADER_PINPOINT_HOST]
+            pinpoint.add_context(Defines.PP_PARENT_HOST, self.Ah)
+            pinpoint.add_trace_header(Defines.PP_PARENT_HOST, self.Ah)
+
+        
+        if Defines.PP_NGINX_PROXY in headers:
+            pinpoint.add_trace_header(Defines.PP_APACHE_PROXY, headers[Defines.PP_NGINX_PROXY])
+
+        if Defines.PP_APACHE_PROXY in headers:
+            pinpoint.add_trace_header(Defines.PP_APACHE_PROXY, headers[Defines.PP_APACHE_PROXY])
+
+        pinpoint.add_context(Defines.PP_HEADER_PINPOINT_SAMPLED, "s1")
+        if (Defines.PP_HTTP_PINPOINT_SAMPLED in request.headers and request.headers[Defines.PP_HTTP_PINPOINT_SAMPLED] == Defines.PP_NOT_SAMPLED) or (Defines.PP_HEADER_PINPOINT_SAMPLED in request.headers and request.headers[Defines.PP_HEADER_PINPOINT_SAMPLED] == Defines.PP_NOT_SAMPLED) or pinpoint.check_trace_limit():
+            pinpoint.drop_trace()
+            pinpoint.add_context(Defines.PP_HEADER_PINPOINT_SAMPLED, "s0")
+
+        pinpoint.add_trace_header(Defines.PP_TRANSCATION_ID, self.tid)
+        pinpoint.add_trace_header(Defines.PP_SPAN_ID, self.sid)
+        pinpoint.add_context(Defines.PP_TRANSCATION_ID, self.tid)
+        pinpoint.add_context(Defines.PP_SPAN_ID, self.sid)
+        pinpoint.add_trace_header_v2(Defines.PP_HTTP_METHOD, headers["REQUEST_METHOD"])
+
+        ###############################################################
+        return args, kwargs
+
+    def onEnd(self,ret):
+        ###############################################################
+        if ret:
+            pinpoint.add_trace_header_v2(Defines.PP_HTTP_STATUS_CODE, str(ret.status_code))
+        ###############################################################
+        super().onEnd(ret)
+        return ret
+
+    def onException(self, e):
+        pinpoint.mark_as_error(str(e), "", 0)
+        raise e
+
+
+
diff --git a/plugins/PY/pinpoint/Django/DjangoMiddleWare.py b/plugins/PY/pinpointPy/Django/DjangoMiddleWare.py
similarity index 95%
rename from plugins/PY/pinpoint/Django/DjangoMiddleWare.py
rename to plugins/PY/pinpointPy/Django/DjangoMiddleWare.py
index 02936b365..f9cef0e8e 100644
--- a/plugins/PY/pinpoint/Django/DjangoMiddleWare.py
+++ b/plugins/PY/pinpointPy/Django/DjangoMiddleWare.py
@@ -17,7 +17,7 @@
 
 from django.utils.deprecation import MiddlewareMixin
 
-from pinpoint.Django.BaseDjangoRequestPlugins import BaseDjangoRequestPlugins
+from .BaseDjangoRequestPlugins import BaseDjangoRequestPlugins
 
 
 class DjangoMiddleWare(MiddlewareMixin):
diff --git a/plugins/PY/pinpoint/Django/__init__.py b/plugins/PY/pinpointPy/Django/__init__.py
similarity index 100%
rename from plugins/PY/pinpoint/Django/__init__.py
rename to plugins/PY/pinpointPy/Django/__init__.py
diff --git a/plugins/PY/pinpoint/Fastapi/AsyCommon.py b/plugins/PY/pinpointPy/Fastapi/AsyCommon.py
similarity index 93%
rename from plugins/PY/pinpoint/Fastapi/AsyCommon.py
rename to plugins/PY/pinpointPy/Fastapi/AsyCommon.py
index 76d405c80..db8a8d89d 100644
--- a/plugins/PY/pinpoint/Fastapi/AsyCommon.py
+++ b/plugins/PY/pinpointPy/Fastapi/AsyCommon.py
@@ -20,11 +20,11 @@
 
 
 import asyncio
-import pinpointPy
+
 from starlette_context import context
 
 
-class AsyCandy(object):
+class AsynPinTrace(object):
 
     def __init__(self,name):
         self.name = name
@@ -32,13 +32,13 @@ def __init__(self,name):
 
     def onBefore(self,*args, **kwargs):
         id = context.get('_pinpoint_id_', default=0)
-        traceId = pinpointPy.start_trace(id)
+        traceId = with_trace(id)
         context['_pinpoint_id_'] = traceId
         self.traceId = traceId
         return (args,kwargs)
 
     def onEnd(self,ret):
-        traceId = pinpointPy.end_trace(self.traceId)
+        traceId = trace_ready(self.traceId)
         context['_pinpoint_id_'] = traceId
 
     def onException(self,e):
@@ -65,7 +65,7 @@ def getFuncUniqueName(self):
 
 if __name__ == '__main__':
 
-    @AsyCandy('main')
+    @AsynPinTrace('main')
     async def run(i):
         if i == 0:
             return
diff --git a/plugins/PY/pinpoint/common/AsyCommonPlugin.py b/plugins/PY/pinpointPy/Fastapi/AsyCommonPlugin.py
similarity index 73%
rename from plugins/PY/pinpoint/common/AsyCommonPlugin.py
rename to plugins/PY/pinpointPy/Fastapi/AsyCommonPlugin.py
index d2fdcdb4a..a12b6d42d 100644
--- a/plugins/PY/pinpoint/common/AsyCommonPlugin.py
+++ b/plugins/PY/pinpointPy/Fastapi/AsyCommonPlugin.py
@@ -15,39 +15,40 @@
 # ------------------------------------------------------------------------------
 
 
-from .AsyCommon import AsyCandy
-from .Defines import *
-import pinpointPy
+from .AsyCommon import AsynPinTrace
+from .. import Defines
+from .. import pinpoint
 
-class CommonPlugin(AsyCandy):
 
-    def onBefore(self,*args, **kwargs):
+class CommonPlugin(AsynPinTrace):
+
+    def onBefore(self, *args, **kwargs):
         super().onBefore(*args, **kwargs)
         ###############################################################
-        pinpointPy.add_clue(PP_INTERCEPTOR_NAME, self.getFuncUniqueName(), self.traceId)
-        pinpointPy.add_clue(PP_SERVER_TYPE, PP_REMOTE_METHOD, self.traceId)
+        pinpoint.add_trace_header(Defines.PP_INTERCEPTOR_NAME, self.getFuncUniqueName(), self.traceId)
+        pinpoint.add_trace_header(Defines.PP_SERVER_TYPE, Defines.PP_REMOTE_METHOD, self.traceId)
         arg = self.get_arg(*args, **kwargs)
-        pinpointPy.add_clues(PP_ARGS, arg, self.traceId)
+        pinpoint.add_trace_header_v2(Defines.PP_ARGS, arg, self.traceId)
         ###############################################################
         # print( threading.currentThread().ident)
-        return args,kwargs
+        return args, kwargs
 
-    def onEnd(self,ret):
+    def onEnd(self, ret):
         ###############################################################
-        pinpointPy.add_clues(PP_RETURN, str(ret), self.traceId)
+        pinpoint.add_trace_header_v2(Defines.PP_RETURN, str(ret), self.traceId)
         ###############################################################
         super().onEnd(ret)
         return ret
 
     def onException(self, e):
-        pinpointPy.add_clue(PP_ADD_EXCEPTION, str(e), self.traceId)
+        pinpoint.add_trace_header(Defines.PP_ADD_EXCEPTION, str(e), self.traceId)
 
     def get_arg(self, *args, **kwargs):
         args_tmp = {}
         j = 0
 
         for i in args:
-            args_tmp["arg["+str(j)+"]"] = (str(i))
+            args_tmp["arg[" + str(j) + "]"] = (str(i))
             j += 1
 
         for k in kwargs:
diff --git a/plugins/PY/pinpoint/common/AsyRequestPlugin.py b/plugins/PY/pinpointPy/Fastapi/AsyRequestPlugin.py
similarity index 52%
rename from plugins/PY/pinpoint/common/AsyRequestPlugin.py
rename to plugins/PY/pinpointPy/Fastapi/AsyRequestPlugin.py
index b2ddbb0d1..8bafaaca1 100644
--- a/plugins/PY/pinpoint/common/AsyRequestPlugin.py
+++ b/plugins/PY/pinpointPy/Fastapi/AsyRequestPlugin.py
@@ -17,113 +17,106 @@
 #  limitations under the License.                                              -
 # ------------------------------------------------------------------------------
 
-# Created by eeliu at 3/5/20
 
+from .AsyCommon import AsynPinTrace
+from ...Common import *
 
 
 
-from .AsyCommon import AsyCandy
-from .Defines import *
-from .Span import *
-import pinpointPy
-
-class AsyRequestPlugin(AsyCandy):
-    def __init__(self,name):
+class AsyRequestPlugin(AsynPinTrace):
+    def __init__(self, name):
         super().__init__(name)
 
-    def onBefore(self,*args, **kwargs):
+    def onBefore(self, *args, **kwargs):
         super().onBefore(*args, **kwargs)
-        pinpointPy.add_clue(PP_APP_NAME, APP_NAME, self.traceId)
-        pinpointPy.add_clue(PP_APP_ID, APP_ID, self.traceId)
-        pinpointPy.set_context_key(PP_APP_NAME, APP_NAME, self.traceId)
+        add_trace_header(PP_APP_NAME, app_name(), self.traceId)
+        add_trace_header(PP_APP_ID, app_id(), self.traceId)
+        add_context(PP_APP_NAME, app_name(), self.traceId)
         ###############################################################
         request = args[0]
-        # pinpointPy.add_clue(PP_INTERCEPTOR_NAME, 'tornado.web.RequestHandler',self.node_id)
-        # pinpointPy.add_clue(PP_REQ_URI, request.uri, self.traceId)
-        # pinpointPy.add_clue(PP_REQ_CLIENT, request.remote_ip, self.traceId)
-        # pinpointPy.add_clue(PP_REQ_SERVER, request.host_name, self.traceId)
-        pinpointPy.add_clue(PP_SERVER_TYPE, PYTHON, self.traceId)
-        pinpointPy.set_context_key(PP_SERVER_TYPE, PYTHON, self.traceId)
+        # add_trace_header(PP_INTERCEPTOR_NAME, 'tornado.web.RequestHandler',self.node_id)
+        # add_trace_header(PP_REQ_URI, request.uri, self.traceId)
+        # add_trace_header(PP_REQ_CLIENT, request.remote_ip, self.traceId)
+        # add_trace_header(PP_REQ_SERVER, request.host_name, self.traceId)
+        add_trace_header(PP_SERVER_TYPE, PYTHON, self.traceId)
+        add_context(PP_SERVER_TYPE, PYTHON, self.traceId)
 
         # nginx add http
         if PP_HTTP_PINPOINT_PSPANID in request.headers:
-            pinpointPy.add_clue(PP_PARENT_SPAN_ID, request.headers[PP_HTTP_PINPOINT_PSPANID], self.traceId)
+            add_trace_header(PP_PARENT_SPAN_ID, request.headers[PP_HTTP_PINPOINT_PSPANID], self.traceId)
         if PP_HTTP_PINPOINT_SPANID in request.headers:
             self.sid = request.headers[PP_HTTP_PINPOINT_SPANID]
         elif PP_HEADER_PINPOINT_SPANID in request.headers:
             self.sid = request.headers[PP_HEADER_PINPOINT_SPANID]
         else:
-            self.sid = generateSid()
-        pinpointPy.set_context_key(PP_SPAN_ID, self.sid, self.traceId)
+            self.sid = gen_sid()
+        add_context(PP_SPAN_ID, self.sid, self.traceId)
 
         if PP_HTTP_PINPOINT_TRACEID in request.headers:
             self.tid = request.headers[PP_HTTP_PINPOINT_TRACEID]
         elif PP_HEADER_PINPOINT_TRACEID in request.headers:
             self.tid = request.headers[PP_HEADER_PINPOINT_TRACEID]
         else:
-            self.tid = generateTid()
-        pinpointPy.set_context_key(PP_TRANSCATION_ID, self.tid, self.traceId)
+            self.tid = gen_tid()
+        add_context(PP_TRANSCATION_ID, self.tid, self.traceId)
 
         if PP_HTTP_PINPOINT_PAPPNAME in request.headers:
             self.pname = request.headers[PP_HTTP_PINPOINT_PAPPNAME]
-            pinpointPy.set_context_key(PP_PARENT_NAME, self.pname, self.traceId)
-            pinpointPy.add_clue(PP_PARENT_NAME, self.pname, self.traceId)
+            add_context(PP_PARENT_NAME, self.pname, self.traceId)
+            add_trace_header(PP_PARENT_NAME, self.pname, self.traceId)
 
         if PP_HTTP_PINPOINT_PAPPTYPE in request.headers:
             self.ptype = request.headers[PP_HTTP_PINPOINT_PAPPTYPE]
-            pinpointPy.set_context_key(PP_PARENT_TYPE, self.ptype, self.traceId)
-            pinpointPy.add_clue(PP_PARENT_TYPE, self.ptype, self.traceId)
+            add_context(PP_PARENT_TYPE, self.ptype, self.traceId)
+            add_trace_header(PP_PARENT_TYPE, self.ptype, self.traceId)
 
         if PP_HTTP_PINPOINT_HOST in request.headers:
             self.Ah = request.headers[PP_HTTP_PINPOINT_HOST]
-            pinpointPy.set_context_key(PP_PARENT_HOST, self.Ah, self.traceId)
-            pinpointPy.add_clue(PP_PARENT_HOST, self.Ah, self.traceId)
+            add_context(PP_PARENT_HOST, self.Ah, self.traceId)
+            add_trace_header(PP_PARENT_HOST, self.Ah, self.traceId)
 
         # Not nginx, no http
         if PP_HEADER_PINPOINT_PSPANID in request.headers:
-            pinpointPy.add_clue(PP_PARENT_SPAN_ID, request.headers[PP_HEADER_PINPOINT_PSPANID], self.traceId)
+            add_trace_header(PP_PARENT_SPAN_ID, request.headers[PP_HEADER_PINPOINT_PSPANID], self.traceId)
 
         if PP_HEADER_PINPOINT_PAPPNAME in request.headers:
             self.pname = request.headers[PP_HEADER_PINPOINT_PAPPNAME]
-            pinpointPy.set_context_key(PP_PARENT_NAME, self.pname, self.traceId)
-            pinpointPy.add_clue(PP_PARENT_NAME, self.pname, self.traceId)
+            add_context(PP_PARENT_NAME, self.pname, self.traceId)
+            add_trace_header(PP_PARENT_NAME, self.pname, self.traceId)
 
         if PP_HEADER_PINPOINT_PAPPTYPE in request.headers:
             self.ptype = request.headers[PP_HEADER_PINPOINT_PAPPTYPE]
-            pinpointPy.set_context_key(PP_PARENT_TYPE, self.ptype, self.traceId)
-            pinpointPy.add_clue(PP_PARENT_TYPE, self.ptype, self.traceId)
+            add_context(PP_PARENT_TYPE, self.ptype, self.traceId)
+            add_trace_header(PP_PARENT_TYPE, self.ptype, self.traceId)
 
         if PP_HEADER_PINPOINT_HOST in request.headers:
             self.Ah = request.headers[PP_HEADER_PINPOINT_HOST]
-            pinpointPy.set_context_key(PP_PARENT_HOST, self.Ah, self.traceId)
-            pinpointPy.add_clue(PP_PARENT_HOST, self.Ah, self.traceId)
+            add_context(PP_PARENT_HOST, self.Ah, self.traceId)
+            add_trace_header(PP_PARENT_HOST, self.Ah, self.traceId)
 
         if PP_NGINX_PROXY in request.headers:
-            pinpointPy.add_clue(PP_NGINX_PROXY, request.headers[PP_NGINX_PROXY], self.traceId)
+            add_trace_header(PP_NGINX_PROXY, request.headers[PP_NGINX_PROXY], self.traceId)
 
         if PP_APACHE_PROXY in request.headers:
-            pinpointPy.add_clue(PP_APACHE_PROXY, request.headers[PP_APACHE_PROXY], self.traceId)
+            add_trace_header(PP_APACHE_PROXY, request.headers[PP_APACHE_PROXY], self.traceId)
 
-        pinpointPy.set_context_key("Pinpoint-Sampled", "s1", self.traceId)
-        if (PP_HEADER_PINPOINT_SAMPLED in request.headers and request.headers[PP_HEADER_PINPOINT_SAMPLED] == PP_NOT_SAMPLED) or pinpointPy.check_tracelimit():
+        add_context("Pinpoint-Sampled", "s1", self.traceId)
+        if (PP_HEADER_PINPOINT_SAMPLED in request.headers and request.headers[PP_HEADER_PINPOINT_SAMPLED] == PP_NOT_SAMPLED) or _pinpointPy.check_trace_limit():
             if request.headers[PP_HEADER_PINPOINT_SAMPLED] == PP_NOT_SAMPLED:
-                pinpointPy.drop_trace(self.traceId)
-                pinpointPy.set_context_key("Pinpoint-Sampled", "s0", self.traceId)
+                _pinpointPy.drop_trace(self.traceId)
+                add_context("Pinpoint-Sampled", "s0", self.traceId)
 
-        pinpointPy.add_clue(PP_TRANSCATION_ID, self.tid, self.traceId)
-        pinpointPy.add_clue(PP_SPAN_ID, self.sid, self.traceId)
-        pinpointPy.set_context_key(PP_TRANSCATION_ID, self.tid, self.traceId)
-        pinpointPy.set_context_key(PP_SPAN_ID, self.sid, self.traceId)
+        add_trace_header(PP_TRANSCATION_ID, self.tid, self.traceId)
+        add_trace_header(PP_SPAN_ID, self.sid, self.traceId)
+        add_context(PP_TRANSCATION_ID, self.tid, self.traceId)
+        add_context(PP_SPAN_ID, self.sid, self.traceId)
         return args, kwargs
 
-    def onEnd(self,ret):
+    def onEnd(self, ret):
         super().onEnd(ret)
         self.isLimit = False
         return ret
 
     def onException(self, e):
-        pinpointPy.mark_as_error(str(e),"", 0, self.traceId)
+        _pinpointPy.mark_as_error(str(e), "", 0, self.traceId)
         raise e
-
-
-
diff --git a/plugins/PY/pinpoint/Fastapi/FastAPIRequestPlugin.py b/plugins/PY/pinpointPy/Fastapi/FastAPIRequestPlugin.py
similarity index 81%
rename from plugins/PY/pinpoint/Fastapi/FastAPIRequestPlugin.py
rename to plugins/PY/pinpointPy/Fastapi/FastAPIRequestPlugin.py
index 5e3ff4430..3f37442b8 100644
--- a/plugins/PY/pinpoint/Fastapi/FastAPIRequestPlugin.py
+++ b/plugins/PY/pinpointPy/Fastapi/FastAPIRequestPlugin.py
@@ -25,10 +25,10 @@ class FastAPIRequestPlugin(AsyRequestPlugin):
     def onBefore(self,*args, **kwargs):
         super().onBefore(*args, **kwargs)
         request = args[0].scope
-        pinpointPy.add_clue(PP_INTERCEPTOR_NAME, 'fastapi-middleware',self.traceId)
-        pinpointPy.add_clue(PP_REQ_URI, request["path"], self.traceId)
-        pinpointPy.add_clue(PP_REQ_CLIENT, request["client"][0], self.traceId)
-        pinpointPy.add_clue(PP_REQ_SERVER, request["server"][0] + ":" + str(request["server"][1]), self.traceId)
+        add_trace_header(PP_INTERCEPTOR_NAME, 'fastapi-middleware',self.traceId)
+        add_trace_header(PP_REQ_URI, request["path"], self.traceId)
+        add_trace_header(PP_REQ_CLIENT, request["client"][0], self.traceId)
+        add_trace_header(PP_REQ_SERVER, request["server"][0] + ":" + str(request["server"][1]), self.traceId)
 
 
     def onEnd(self, ret):
diff --git a/plugins/PY/pinpoint/tornado/__init__.py b/plugins/PY/pinpointPy/Fastapi/__init__.py
similarity index 88%
rename from plugins/PY/pinpoint/tornado/__init__.py
rename to plugins/PY/pinpointPy/Fastapi/__init__.py
index 50728bb20..396b52e4c 100644
--- a/plugins/PY/pinpoint/tornado/__init__.py
+++ b/plugins/PY/pinpointPy/Fastapi/__init__.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 # -*- coding: UTF-8 -*-
+# Created by eeliu at 4/14/22
 
 # ------------------------------------------------------------------------------
 #  Copyright  2020. NAVER Corp.                                                -
@@ -16,9 +17,6 @@
 #  See the License for the specific language governing permissions and         -
 #  limitations under the License.                                              -
 # ------------------------------------------------------------------------------
-
-# Created by eeliu at 11/12/20
-from .tornado import HTTPRequestPlugins
-from .tornado import CommonPlugin
-
-__all__=['HTTPRequestPlugins','CommonPlugin']
\ No newline at end of file
+from .middleware import PinPointMiddleWare
+from .AsyCommonPlugin import CommonPlugin
+__all__=['PinPointMiddleWare','CommonPlugin']
\ No newline at end of file
diff --git a/plugins/PY/pinpoint/Fastapi/middleware.py b/plugins/PY/pinpointPy/Fastapi/middleware.py
similarity index 100%
rename from plugins/PY/pinpoint/Fastapi/middleware.py
rename to plugins/PY/pinpointPy/Fastapi/middleware.py
diff --git a/plugins/PY/pinpointPy/Flask/FlaskPlugins.py b/plugins/PY/pinpointPy/Flask/FlaskPlugins.py
new file mode 100644
index 000000000..43e318f6b
--- /dev/null
+++ b/plugins/PY/pinpointPy/Flask/FlaskPlugins.py
@@ -0,0 +1,137 @@
+#!/usr/bin/env python
+# -*- coding: UTF-8 -*-
+
+# ------------------------------------------------------------------------------
+#  Copyright  2020. NAVER Corp.                                                -
+#                                                                              -
+#  Licensed under the Apache License, Version 2.0 (the "License");             -
+#  you may not use this file except in compliance with the License.            -
+#  You may obtain a copy of the License at                                     -
+#                                                                              -
+#   http://www.apache.org/licenses/LICENSE-2.0                                 -
+#                                                                              -
+#  Unless required by applicable law or agreed to in writing, software         -
+#  distributed under the License is distributed on an "AS IS" BASIS,           -
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    -
+#  See the License for the specific language governing permissions and         -
+#  limitations under the License.                                              -
+# ------------------------------------------------------------------------------
+
+# Created by eeliu at 3/5/20
+
+from flask import Flask,Request
+
+from .. import Common
+from .. import pinpoint
+from .. import Defines
+
+class BaseFlaskPlugins(Common.PinTrace):
+    def __init__(self, name):
+        super().__init__(name)
+        self.isLimit = False
+
+    def isSample(self,args):
+        return True
+
+    def onBefore(self,*args, **kwargs):
+        super().onBefore(*args, **kwargs)
+        request = Request(args[1])
+        pinpoint.add_trace_header(Defines.PP_APP_NAME, pinpoint.app_name())
+        pinpoint.add_trace_header(Defines.PP_APP_ID, pinpoint.app_id())
+        pinpoint.add_context(Defines.PP_APP_NAME, pinpoint.app_name())
+        ###############################################################
+        # print("------------------- call before -----------------------")
+        pinpoint.add_trace_header(Defines.PP_INTERCEPTOR_NAME, 'BaseFlaskrequest')
+        pinpoint.add_trace_header(Defines.PP_REQ_URI, request.path)
+        pinpoint.add_trace_header(Defines.PP_REQ_CLIENT, request.remote_addr)
+        pinpoint.add_trace_header(Defines.PP_REQ_SERVER, request.host)
+        pinpoint.add_trace_header(Defines.PP_SERVER_TYPE, Defines.PYTHON)
+        pinpoint.add_context(Defines.PP_SERVER_TYPE, Defines.PYTHON)
+
+        # nginx add http
+        if Defines.PP_HTTP_PINPOINT_PSPANID in request.headers:
+            pinpoint.add_trace_header(Defines.PP_PARENT_SPAN_ID, request.headers[Defines.PP_HTTP_PINPOINT_PSPANID])
+
+        if Defines.PP_HTTP_PINPOINT_SPANID in request.headers:
+            self.sid = request.headers[Defines.PP_HTTP_PINPOINT_SPANID]
+        elif Defines.PP_HEADER_PINPOINT_SPANID in request.headers:
+            self.sid = request.headers[Defines.PP_HEADER_PINPOINT_SPANID]
+        else:
+            self.sid = pinpoint.gen_sid()
+        pinpoint.add_context(Defines.PP_SPAN_ID, self.sid)
+
+
+        if Defines.PP_HTTP_PINPOINT_TRACEID in request.headers:
+            self.tid = request.headers[Defines.PP_HTTP_PINPOINT_TRACEID]
+        elif Defines.PP_HEADER_PINPOINT_TRACEID in request.headers:
+            self.tid = request.headers[Defines.PP_HEADER_PINPOINT_TRACEID]
+        else:
+            self.tid = pinpoint.gen_tid()
+        pinpoint.add_context(Defines.PP_TRANSCATION_ID, self.tid)
+
+        if Defines.PP_HTTP_PINPOINT_PAPPNAME in request.headers:
+            self.pname = request.headers[Defines.PP_HTTP_PINPOINT_PAPPNAME]
+            pinpoint.add_context(Defines.PP_PARENT_NAME, self.pname)
+            pinpoint.add_trace_header(Defines.PP_PARENT_NAME, self.pname)
+
+        if Defines.PP_HTTP_PINPOINT_PAPPTYPE in request.headers:
+            self.ptype = request.headers[Defines.PP_HTTP_PINPOINT_PAPPTYPE]
+            pinpoint.add_context(Defines.PP_PARENT_TYPE, self.ptype)
+            pinpoint.add_trace_header(Defines.PP_PARENT_TYPE, self.ptype)
+
+        if Defines.PP_HTTP_PINPOINT_HOST in request.headers:
+            self.Ah = request.headers[Defines.PP_HTTP_PINPOINT_HOST]
+            pinpoint.add_context(Defines.PP_PARENT_HOST, self.Ah)
+            pinpoint.add_trace_header(Defines.PP_PARENT_HOST, self.Ah)
+
+        # Not nginx, no http
+        if Defines.PP_HEADER_PINPOINT_PSPANID in request.headers:
+            pinpoint.add_trace_header(Defines.PP_PARENT_SPAN_ID, request.headers[Defines.PP_HEADER_PINPOINT_PSPANID])
+            # print("PINPOINT_PSPANID:", request.headers[PP_HEADER_PINPOINT_PSPANID])
+
+        if Defines.PP_HEADER_PINPOINT_PAPPNAME in request.headers:
+            self.pname = request.headers[Defines.PP_HEADER_PINPOINT_PAPPNAME]
+            pinpoint.add_context(Defines.PP_PARENT_NAME, self.pname)
+            pinpoint.add_trace_header(Defines.PP_PARENT_NAME, self.pname)
+
+        if Defines.PP_HEADER_PINPOINT_PAPPTYPE in request.headers:
+            self.ptype = request.headers[Defines.PP_HEADER_PINPOINT_PAPPTYPE]
+            pinpoint.add_context(Defines.PP_PARENT_TYPE, self.ptype)
+            pinpoint.add_trace_header(Defines.PP_PARENT_TYPE, self.ptype)
+
+        if Defines.PP_HEADER_PINPOINT_HOST in request.headers:
+            self.Ah = request.headers[Defines.PP_HEADER_PINPOINT_HOST]
+            pinpoint.add_context(Defines.PP_PARENT_HOST, self.Ah)
+            pinpoint.add_trace_header(Defines.PP_PARENT_HOST, self.Ah)
+        
+        if Defines.PP_NGINX_PROXY in request.headers:
+            pinpoint.add_trace_header(Defines.PP_NGINX_PROXY, request.headers[Defines.PP_NGINX_PROXY])
+        
+        if Defines.PP_APACHE_PROXY in request.headers:
+            pinpoint.add_trace_header(Defines.PP_APACHE_PROXY, request.headers[Defines.PP_APACHE_PROXY])
+
+        pinpoint.add_context(Defines.PP_HEADER_PINPOINT_SAMPLED, "s1")
+        if (Defines.PP_HTTP_PINPOINT_SAMPLED in request.headers and request.headers[Defines.PP_HTTP_PINPOINT_SAMPLED] == Defines.PP_NOT_SAMPLED) or (Defines.PP_HEADER_PINPOINT_SAMPLED in request.headers and request.headers[Defines.PP_HEADER_PINPOINT_SAMPLED] == Defines.PP_NOT_SAMPLED) or pinpoint.check_trace_limit():
+            pinpoint.drop_trace()
+            pinpoint.add_context(Defines.PP_HEADER_PINPOINT_SAMPLED, "s0")
+
+
+        pinpoint.add_trace_header(Defines.PP_TRANSCATION_ID, self.tid)
+        pinpoint.add_trace_header(Defines.PP_SPAN_ID, self.sid)
+        pinpoint.add_context(Defines.PP_TRANSCATION_ID, self.tid)
+        pinpoint.add_context(Defines.PP_SPAN_ID, self.sid)
+        pinpoint.add_trace_header_v2(Defines.PP_HTTP_METHOD, request.method)
+        ###############################################################
+        return args, kwargs
+
+    def onEnd(self,ret):
+        ###############################################################
+
+        ###############################################################
+        super().onEnd(ret)
+        self.isLimit = False
+        return ret
+
+    def onException(self, e):
+        pinpoint.mark_as_error(str(e),"",0)
+        raise e
diff --git a/plugins/PY/pinpoint/Flask/PinPointMiddleWare.py b/plugins/PY/pinpointPy/Flask/PinPointMiddleWare.py
similarity index 91%
rename from plugins/PY/pinpoint/Flask/PinPointMiddleWare.py
rename to plugins/PY/pinpointPy/Flask/PinPointMiddleWare.py
index 46aed8eeb..5b27c5038 100644
--- a/plugins/PY/pinpoint/Flask/PinPointMiddleWare.py
+++ b/plugins/PY/pinpointPy/Flask/PinPointMiddleWare.py
@@ -17,12 +17,10 @@
 
 #!/usr/bin/env python
 # -*- coding: UTF-8 -*-
-
-
+from ..Defines import PP_HTTP_STATUS_CODE
+from ..pinpoint import add_trace_header_v2
 from .FlaskPlugins import BaseFlaskPlugins
 
-from pinpoint.common import *
-import pinpointPy
 
 class PinPointMiddleWare():
 
@@ -33,7 +31,7 @@ def __init__(self, app,wsgi_app):
         @app.after_request
         def mark_status_code(response):
             if response:
-                pinpointPy.add_clues(PP_HTTP_STATUS_CODE, str(response.status))
+                add_trace_header_v2(PP_HTTP_STATUS_CODE, str(response.status))
             return response
 
     @BaseFlaskPlugins("Flask Web App")
diff --git a/plugins/PY/pinpointPy/Flask/__init__.py b/plugins/PY/pinpointPy/Flask/__init__.py
new file mode 100644
index 000000000..fe92992bf
--- /dev/null
+++ b/plugins/PY/pinpointPy/Flask/__init__.py
@@ -0,0 +1,22 @@
+#!/usr/bin/env python
+# -*- coding: UTF-8 -*-
+# Created by suwei at 4/15/22
+
+# ------------------------------------------------------------------------------
+#  Copyright  2020. NAVER Corp.                                                -
+#                                                                              -
+#  Licensed under the Apache License, Version 2.0 (the "License");             -
+#  you may not use this file except in compliance with the License.            -
+#  You may obtain a copy of the License at                                     -
+#                                                                              -
+#   http://www.apache.org/licenses/LICENSE-2.0                                 -
+#                                                                              -
+#  Unless required by applicable law or agreed to in writing, software         -
+#  distributed under the License is distributed on an "AS IS" BASIS,           -
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    -
+#  See the License for the specific language governing permissions and         -
+#  limitations under the License.                                              -
+# ------------------------------------------------------------------------------
+from .PinPointMiddleWare import PinPointMiddleWare
+from .FlaskPlugins import BaseFlaskPlugins
+__all__=['PinPointMiddleWare','BaseFlaskPlugins']
\ No newline at end of file
diff --git a/plugins/PY/pinpointPy/Helper.py b/plugins/PY/pinpointPy/Helper.py
new file mode 100644
index 000000000..7c561ce86
--- /dev/null
+++ b/plugins/PY/pinpointPy/Helper.py
@@ -0,0 +1,145 @@
+#!/usr/bin/env python
+# -*- coding: UTF-8 -*-
+
+# ------------------------------------------------------------------------------
+#  Copyright  2020. NAVER Corp.                                                -
+#                                                                              -
+#  Licensed under the Apache License, Version 2.0 (the "License");             -
+#  you may not use this file except in compliance with the License.            -
+#  You may obtain a copy of the License at                                     -
+#                                                                              -
+#   http://www.apache.org/licenses/LICENSE-2.0        _pinpointPy                         -
+#                                                                              -
+#  Unless required by applicable law or agreed to in writing, software         -
+#  distributed under the License is distributed on an "AS IS" BASIS,           -
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    -
+#  See the License for the specific language governing permissions and         -
+#  limitations under the License.                                              -
+# ------------------------------------------------------------------------------
+
+# Created by eeliu at 11/10/20
+from . import Defines
+from . import pinpoint
+
+def generateNextSid():
+   return pinpoint.gen_sid()
+
+def generatePinpointHeader(host, headers):
+    headers[Defines.PP_HEADER_PINPOINT_SAMPLED] = Defines.PP_SAMPLED
+    headers[Defines.PP_HEADER_PINPOINT_PAPPTYPE] = pinpoint.get_context(Defines.PP_SERVER_TYPE)
+    headers[Defines.PP_HEADER_PINPOINT_PAPPNAME] = pinpoint.get_context(Defines.PP_APP_NAME)
+    headers['Pinpoint-Flags'] = "0"
+    headers[Defines.PP_HEADER_PINPOINT_HOST] = host
+    headers[Defines.PP_HEADER_PINPOINT_TRACEID] = pinpoint.get_context(Defines.PP_TRANSCATION_ID)
+    headers[Defines.PP_HEADER_PINPOINT_PSPANID] = pinpoint.get_context(Defines.PP_SPAN_ID)
+    nsid = pinpoint.gen_sid()
+    pinpoint.add_context(Defines.PP_NEXT_SPAN_ID, nsid)
+    headers[Defines.PP_HEADER_PINPOINT_SPANID] = nsid
+
+
+# def generatePPRabbitMqHeader(func, headers):
+#     if pinpoint.get_context(Defines.PP_HEADER_PINPOINT_SAMPLED) == 's0':
+#         headers[Defines.PP_HEADER_PINPOINT_SAMPLED] = Defines.PP_NOT_SAMPLED
+#         return False
+#     else:
+#         headers[Defines.PP_HEADER_PINPOINT_SAMPLED] = Defines.PP_SAMPLED
+#     headers[Defines.PP_HEADER_PINPOINT_PAPPTYPE] = pinpoint.get_context(Defines.PP_SERVER_TYPE)
+#     headers[Defines.PP_HEADER_PINPOINT_PAPPNAME] = pinpoint.get_context(Defines.PP_APP_NAME)
+#     headers['Pinpoint-Flags'] = "0"
+#     headers[Defines.PP_HEADER_PINPOINT_HOST] = func
+#     headers[Defines.PP_HEADER_PINPOINT_CLIENT] = pinpoint.
+#     headers[Defines.PP_HEADER_PINPOINT_TRACEID] = pinpoint.get_context(Defines.PP_TRANSCATION_ID)
+#     headers[Defines.PP_HEADER_PINPOINT_PSPANID] = pinpoint.get_context(Defines.PP_SPAN_ID)
+#     headers[Defines.PP_HEADER_PINPOINT_SPANID] = pinpoint.get_context(Defines.PP_NEXT_SPAN_ID)
+#     return True
+
+
+def startPinpointByEnviron(environ):
+    pinpoint.add_trace_header(Defines.PP_APP_NAME, pinpoint.app_name())
+    pinpoint.add_trace_header(Defines.PP_APP_ID, pinpoint.app_id())
+    pinpoint.add_context(Defines.PP_APP_NAME, pinpoint.app_name())
+    ###############################################################
+    # print("------------------- call before -----------------------")
+    pinpoint.add_trace_header(Defines.PP_INTERCEPTOR_NAME, 'WSGI handle')
+
+    path, remote_addr, host = environ['PATH_INFO'], environ['REMOTE_ADDR'], environ['HTTP_HOST']
+
+    pinpoint.add_trace_header(Defines.PP_REQ_URI, path)
+    pinpoint.add_trace_header(Defines.PP_REQ_CLIENT, remote_addr)
+    pinpoint.add_trace_header(Defines.PP_REQ_SERVER, host)
+    pinpoint.add_trace_header(Defines.PP_SERVER_TYPE, Defines.PYTHON)
+    pinpoint.add_context(Defines.PP_SERVER_TYPE, Defines.PYTHON)
+    # nginx add http
+    if Defines.PP_HTTP_PINPOINT_PSPANID in environ:
+        pinpoint.add_trace_header(Defines.PP_PARENT_SPAN_ID, environ[Defines.PP_HTTP_PINPOINT_PSPANID])
+
+    if Defines.PP_HTTP_PINPOINT_SPANID in environ:
+        sid = environ[Defines.PP_HTTP_PINPOINT_SPANID]
+    elif Defines.PP_HEADER_PINPOINT_SPANID in environ:
+        sid = environ[Defines.PP_HEADER_PINPOINT_SPANID]
+    else:
+        sid = pinpoint.gen_sid()
+
+    if Defines.PP_HTTP_PINPOINT_TRACEID in environ:
+        tid = environ[Defines.PP_HTTP_PINPOINT_TRACEID]
+    elif Defines.PP_HEADER_PINPOINT_TRACEID in environ:
+        tid = environ[Defines.PP_HEADER_PINPOINT_TRACEID]
+    else:
+        tid = pinpoint.gen_tid()
+
+    if Defines.PP_HTTP_PINPOINT_PAPPNAME in environ:
+        pname = environ[Defines.PP_HTTP_PINPOINT_PAPPNAME]
+        pinpoint.add_context(Defines.PP_PARENT_NAME, pname)
+        pinpoint.add_trace_header(Defines.PP_PARENT_NAME, pname)
+
+    if Defines.PP_HTTP_PINPOINT_PAPPTYPE in environ:
+        ptype = environ[Defines.PP_HTTP_PINPOINT_PAPPTYPE]
+        pinpoint.add_context(Defines.PP_PARENT_TYPE, ptype)
+        pinpoint.add_trace_header(Defines.PP_PARENT_TYPE, ptype)
+
+    if Defines.PP_HTTP_PINPOINT_HOST in environ:
+        Ah = environ[Defines.PP_HTTP_PINPOINT_HOST]
+        pinpoint.add_context(Defines.PP_PARENT_HOST, Ah)
+        pinpoint.add_trace_header(Defines.PP_PARENT_HOST, Ah)
+
+    # Not nginx, no http
+    if Defines.PP_HEADER_PINPOINT_PSPANID in environ:
+        pinpoint.add_trace_header(Defines.PP_PARENT_SPAN_ID, environ[Defines.PP_HEADER_PINPOINT_PSPANID])
+        # print("PINPOINT_PSPANID:", environ[PP_HEADER_PINPOINT_PSPANID])
+
+    if Defines.PP_HEADER_PINPOINT_PAPPNAME in environ:
+        pname = environ[Defines.PP_HEADER_PINPOINT_PAPPNAME]
+        pinpoint.add_context(Defines.PP_PARENT_NAME, pname)
+        pinpoint.add_trace_header(Defines.PP_PARENT_NAME, pname)
+
+    if Defines.PP_HEADER_PINPOINT_PAPPTYPE in environ:
+        ptype = environ[Defines.PP_HEADER_PINPOINT_PAPPTYPE]
+        pinpoint.add_context(Defines.PP_PARENT_TYPE, ptype)
+        pinpoint.add_trace_header(Defines.PP_PARENT_TYPE, ptype)
+
+    if Defines.PP_HEADER_PINPOINT_HOST in environ:
+        Ah = environ[Defines.PP_HEADER_PINPOINT_HOST]
+        pinpoint.add_context(Defines.PP_PARENT_HOST, Ah)
+        pinpoint.add_trace_header(Defines.PP_PARENT_HOST, Ah)
+
+    if Defines.PP_NGINX_PROXY in environ:
+        pinpoint.add_trace_header(Defines.PP_NGINX_PROXY, environ[Defines.PP_NGINX_PROXY])
+
+    if Defines.PP_APACHE_PROXY in environ:
+        pinpoint.add_trace_header(Defines.PP_APACHE_PROXY, environ[Defines.PP_APACHE_PROXY])
+
+    pinpoint.add_context(Defines.PP_HEADER_PINPOINT_SAMPLED, "s1")
+    if (Defines.PP_HTTP_PINPOINT_SAMPLED in environ and environ[
+        Defines.PP_HTTP_PINPOINT_SAMPLED] == Defines.PP_NOT_SAMPLED) or pinpoint.check_trace_limit():
+        pinpoint.drop_trace()
+        pinpoint.add_context(Defines.PP_HEADER_PINPOINT_SAMPLED, "s0")
+
+    pinpoint.add_trace_header(Defines.PP_TRANSCATION_ID, tid)
+    pinpoint.add_trace_header(Defines.PP_SPAN_ID, sid)
+    pinpoint.add_context(Defines.PP_TRANSCATION_ID, tid)
+    pinpoint.add_context(Defines.PP_SPAN_ID, sid)
+
+
+def endPinpointByEnviron(ret):
+    # for future use
+    pass
diff --git a/plugins/PY/pinpoint/common/Interceptor.py b/plugins/PY/pinpointPy/Interceptor.py
similarity index 86%
rename from plugins/PY/pinpoint/common/Interceptor.py
rename to plugins/PY/pinpointPy/Interceptor.py
index 03d95d04c..9b265f3ab 100644
--- a/plugins/PY/pinpoint/common/Interceptor.py
+++ b/plugins/PY/pinpointPy/Interceptor.py
@@ -34,4 +34,12 @@ def enable(self):
         setattr(self.scope, self.point, self.wrapper(self.origin_point))
 
     def disable(self):
-        setattr(self.scope, self.point, self.origin_point)
\ No newline at end of file
+        setattr(self.scope, self.point, self.origin_point)
+
+def intercept_once(point):
+    def func(*args,**kwargs):
+        if not func.already_intercept:
+            func.already_intercept=True
+            return point(*args,**kwargs)
+    func.already_intercept=False
+    return func
\ No newline at end of file
diff --git a/plugins/PY/pinpointPy/RequestPlugins.py b/plugins/PY/pinpointPy/RequestPlugins.py
new file mode 100644
index 000000000..3fd376a48
--- /dev/null
+++ b/plugins/PY/pinpointPy/RequestPlugins.py
@@ -0,0 +1,127 @@
+#!/usr/bin/env python
+# -*- coding: UTF-8 -*-
+
+# ------------------------------------------------------------------------------
+#  Copyright  2020. NAVER Corp.                                                -
+#                                                                              -
+#  Licensed under the Apache License, Version 2.0 (the "License");             -
+#  you may not use this file except in compliance with the License.            -
+#  You may obtain a copy of the License at                                     -
+#                                                                              -
+#   http://www.apache.org/licenses/LICENSE-2.0                                 -
+#                                                                              -
+#  Unless required by applicable law or agreed to in writing, software         -
+#  distributed under the License is distributed on an "AS IS" BASIS,           -
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    -
+#  See the License for the specific language governing permissions and         -
+#  limitations under the License.                                              -
+# ------------------------------------------------------------------------------
+
+# Created by eeliu at 3/5/20
+
+from . import Common
+from . import Defines
+from . import pinpoint
+
+class RequestPlugin(Common.PinTrace):
+    def __init__(self,name):
+        super().__init__(name)
+
+    def onBefore(self,*args, **kwargs):
+        super().onBefore(*args, **kwargs)
+        pinpoint.add_trace_header(Defines.PP_APP_NAME, pinpoint.app_name())
+        pinpoint.add_trace_header(Defines.PP_APP_ID, pinpoint.app_id())
+        pinpoint.add_context(Defines.PP_APP_NAME, pinpoint.app_name())
+        request =args[0]
+        ###############################################################
+        # print("------------------- call before -----------------------")
+        pinpoint.add_trace_header(Defines.PP_INTERCEPTOR_NAME, 'BaseFlaskrequest')
+        pinpoint.add_trace_header(Defines.PP_REQ_URI, request.path)
+        pinpoint.add_trace_header(Defines.PP_REQ_CLIENT, request.remote_addr)
+        pinpoint.add_trace_header(Defines.PP_REQ_SERVER, request.host)
+        pinpoint.add_trace_header(Defines.PP_SERVER_TYPE, Defines.PYTHON)
+        pinpoint.add_context(Defines.PP_SERVER_TYPE, Defines.PYTHON)
+
+        # nginx add http
+        if Defines.PP_HTTP_PINPOINT_PSPANID in request.headers:
+            pinpoint.add_trace_header(Defines.PP_PARENT_SPAN_ID, request.headers[Defines.PP_HTTP_PINPOINT_PSPANID])
+            print("PINPOINT_PSPANID:", request.headers[Defines.PP_HTTP_PINPOINT_PSPANID])
+
+        if Defines.PP_HTTP_PINPOINT_SPANID in request.headers:
+            self.sid = request.headers[Defines.PP_HTTP_PINPOINT_SPANID]
+        elif Defines.PP_HEADER_PINPOINT_SPANID in request.headers:
+            self.sid = request.headers[Defines.PP_HEADER_PINPOINT_SPANID]
+        else:
+            self.sid = pinpoint.gen_sid()
+        pinpoint.add_context(Defines.PP_SPAN_ID, self.sid)
+
+        if Defines.PP_HTTP_PINPOINT_TRACEID in request.headers:
+            self.tid = request.headers[Defines.PP_HTTP_PINPOINT_TRACEID]
+        elif Defines.PP_HEADER_PINPOINT_TRACEID in request.headers:
+            self.tid = request.headers[Defines.PP_HEADER_PINPOINT_TRACEID]
+        else:
+            self.tid = pinpoint.gen_tid()
+        pinpoint.add_context(Defines.PP_TRANSCATION_ID, self.tid)
+
+        if Defines.PP_HTTP_PINPOINT_PAPPNAME in request.headers:
+            self.pname = request.headers[Defines.PP_HTTP_PINPOINT_PAPPNAME]
+            pinpoint.add_context(Defines.PP_PARENT_NAME, self.pname)
+            pinpoint.add_trace_header(Defines.PP_PARENT_NAME, self.pname)
+
+        if Defines.PP_HTTP_PINPOINT_PAPPTYPE in request.headers:
+            self.ptype = request.headers[Defines.PP_HTTP_PINPOINT_PAPPTYPE]
+            pinpoint.add_context(Defines.PP_PARENT_TYPE, self.ptype)
+            pinpoint.add_trace_header(Defines.PP_PARENT_TYPE, self.ptype)
+
+        if Defines.PP_HTTP_PINPOINT_HOST in request.headers:
+            self.Ah = request.headers[Defines.PP_HTTP_PINPOINT_HOST]
+            pinpoint.add_context(Defines.PP_PARENT_HOST, self.Ah)
+            pinpoint.add_trace_header(Defines.PP_PARENT_HOST, self.Ah)
+
+        # Not nginx, no http
+        if Defines.PP_HEADER_PINPOINT_PSPANID in request.headers:
+            pinpoint.add_trace_header(Defines.PP_PARENT_SPAN_ID, request.headers[Defines.PP_HEADER_PINPOINT_PSPANID])
+            # print("PINPOINT_PSPANID:", request.headers[PP_HEADER_PINPOINT_PSPANID])
+
+        if Defines.PP_HEADER_PINPOINT_PAPPNAME in request.headers:
+            self.pname = request.headers[Defines.PP_HEADER_PINPOINT_PAPPNAME]
+            pinpoint.add_context(Defines.PP_PARENT_NAME, self.pname)
+            pinpoint.add_trace_header(Defines.PP_PARENT_NAME, self.pname)
+
+        if Defines.PP_HEADER_PINPOINT_PAPPTYPE in request.headers:
+            self.ptype = request.headers[Defines.PP_HEADER_PINPOINT_PAPPTYPE]
+            pinpoint.add_context(Defines.PP_PARENT_TYPE, self.ptype)
+            pinpoint.add_trace_header(Defines.PP_PARENT_TYPE, self.ptype)
+
+        if Defines.PP_HEADER_PINPOINT_HOST in request.headers:
+            self.Ah = request.headers[Defines.PP_HEADER_PINPOINT_HOST]
+            pinpoint.add_context(Defines.PP_PARENT_HOST, self.Ah)
+            pinpoint.add_trace_header(Defines.PP_PARENT_HOST, self.Ah)
+
+        if Defines.PP_NGINX_PROXY in request.headers:
+            pinpoint.add_trace_header(Defines.PP_NGINX_PROXY, request.headers[Defines.PP_NGINX_PROXY])
+
+        if Defines.PP_APACHE_PROXY in request.headers:
+            pinpoint.add_trace_header(Defines.PP_APACHE_PROXY, request.headers[Defines.PP_APACHE_PROXY])
+
+        pinpoint.add_context(Defines.PP_HEADER_PINPOINT_SAMPLED, "s1")
+        if (Defines.PP_HTTP_PINPOINT_SAMPLED in request.headers and request.headers[Defines.PP_HTTP_PINPOINT_SAMPLED] == Defines.PP_NOT_SAMPLED) or pinpoint.check_trace_limit():
+            pinpoint.drop_trace()
+            pinpoint.add_context(Defines.PP_HEADER_PINPOINT_SAMPLED, "s0")
+
+        pinpoint.add_trace_header(Defines.PP_TRANSCATION_ID, self.tid)
+        pinpoint.add_trace_header(Defines.PP_SPAN_ID, self.sid)
+        pinpoint.add_context(Defines.PP_TRANSCATION_ID, self.tid)
+        pinpoint.add_context(Defines.PP_SPAN_ID, self.sid)
+        return args, kwargs
+
+    def onEnd(self,ret):
+        super().onEnd(ret)
+        return ret
+
+    def onException(self, e):
+        pinpoint.mark_as_error(str(e), "", 0)
+        raise e
+
+
+
diff --git a/plugins/PY/pinpoint/common/WSGIPlugin.py b/plugins/PY/pinpointPy/WSGIPlugin.py
similarity index 87%
rename from plugins/PY/pinpoint/common/WSGIPlugin.py
rename to plugins/PY/pinpointPy/WSGIPlugin.py
index 8cea1753c..7b24e62e3 100644
--- a/plugins/PY/pinpoint/common/WSGIPlugin.py
+++ b/plugins/PY/pinpointPy/WSGIPlugin.py
@@ -19,24 +19,26 @@
 
 # Created by eeliu at 11/9/20
 
-from .Common import Candy
-from .Utils import *
+from .Common import PinTrace
+from . import Helper
+from . import pinpoint
 
-class WSGIPlugin(Candy):
+
+class WSGIPlugin(PinTrace):
     def __init__(self, name):
         super().__init__(name)
 
     def onBefore(self, *args, **kwargs):
         super().onBefore(*args, **kwargs)
         environ = args[0]
-        startPinpointByEnviron(environ)
+        Helper.startPinpointByEnviron(environ)
 
         return (args, kwargs)
 
     def onEnd(self, ret):
-        endPinpointByEnviron(ret)
+        Helper.endPinpointByEnviron(ret)
         super().onEnd(ret)
         return ret
 
     def onException(self, e):
-        pinpointPy.mark_as_error(str(e),"",0)
\ No newline at end of file
+        pinpoint.mark_as_error(str(e), "", 0)
\ No newline at end of file
diff --git a/plugins/PY/pinpoint/libs/internal/__init__.py b/plugins/PY/pinpointPy/__init__.py
similarity index 79%
rename from plugins/PY/pinpoint/libs/internal/__init__.py
rename to plugins/PY/pinpointPy/__init__.py
index 94d991a6b..0e9ba342d 100644
--- a/plugins/PY/pinpoint/libs/internal/__init__.py
+++ b/plugins/PY/pinpointPy/__init__.py
@@ -1,9 +1,3 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-# Created by eeliu at 1/11/21
-
-
-
 # ******************************************************************************
 #   Copyright  2020. NAVER Corp.
 #
@@ -20,8 +14,12 @@
 #   limitations under the License.
 # ******************************************************************************
 
-class Global:
-    patched= False
+# !/usr/bin/env python
+# -*- coding: UTF-8 -*-
+# Created by eeliu at 2/4/21
+__version__ = "0.1.0"
+
+from .libs import monkey_patch_for_pinpoint
+from .pinpoint import set_agent
 
-gl = Global()
-__all__ = ['gl']
\ No newline at end of file
+__all__ = ['monkey_patch_for_pinpoint', 'set_agent']
diff --git a/plugins/PY/pinpoint/libs/DjangoRest/ViewsPlugin.py b/plugins/PY/pinpointPy/libs/DjangoRest/ViewsPlugin.py
similarity index 80%
rename from plugins/PY/pinpoint/libs/DjangoRest/ViewsPlugin.py
rename to plugins/PY/pinpointPy/libs/DjangoRest/ViewsPlugin.py
index 25fd7a14c..a5ba0b183 100644
--- a/plugins/PY/pinpoint/libs/DjangoRest/ViewsPlugin.py
+++ b/plugins/PY/pinpointPy/libs/DjangoRest/ViewsPlugin.py
@@ -15,10 +15,12 @@
 # ------------------------------------------------------------------------------
 
 
-from pinpoint.common import *
-import pinpointPy
+from ... import Common
+from ... import Defines
+from ... import pinpoint
 
-class ViewsPlugin(Candy):
+
+class ViewsPlugin(Common.PinTrace):
 
     def __init__(self,name):
         super().__init__(name)
@@ -26,11 +28,11 @@ def __init__(self,name):
     def onBefore(self,*args, **kwargs):
         super().onBefore(*args, **kwargs)
         ###############################################################
-        pinpointPy.add_clue(PP_INTERCEPTOR_NAME,args[0].get_view_name())
-        pinpointPy.add_clue(PP_SERVER_TYPE, PP_METHOD_CALL)
+        pinpoint.add_trace_header(Defines.PP_INTERCEPTOR_NAME, args[0].get_view_name())
+        pinpoint.add_trace_header(Defines.PP_SERVER_TYPE, Defines.PP_METHOD_CALL)
         ###############################################################
         url = '{%s %r}' % (args[1].method,args[1].get_full_path())
-        pinpointPy.add_clues(PP_ARGS, url)
+        pinpoint.add_trace_header_v2(Defines.PP_ARGS, url)
         return args,kwargs
 
     def onEnd(self,ret):
@@ -38,4 +40,4 @@ def onEnd(self,ret):
         return ret
 
     def onException(self, e):
-        pinpointPy.add_clue(PP_ADD_EXCEPTION,str(e))
+        pinpoint.add_trace_header(Defines.PP_ADD_EXCEPTION, str(e))
diff --git a/plugins/PY/pinpoint/libs/DjangoRest/__init__.py b/plugins/PY/pinpointPy/libs/DjangoRest/__init__.py
similarity index 95%
rename from plugins/PY/pinpoint/libs/DjangoRest/__init__.py
rename to plugins/PY/pinpointPy/libs/DjangoRest/__init__.py
index 33ae6c04d..79b1f919b 100644
--- a/plugins/PY/pinpoint/libs/DjangoRest/__init__.py
+++ b/plugins/PY/pinpointPy/libs/DjangoRest/__init__.py
@@ -14,9 +14,9 @@
 #  limitations under the License.                                              -
 # ------------------------------------------------------------------------------
 
-from pinpoint.common import Interceptor
-
+from ...Interceptor import Interceptor,intercept_once
 
+@intercept_once
 def monkey_patch():
     try:
         from rest_framework.views import APIView
diff --git a/plugins/PY/pinpoint/libs/MySQLdb/MysqldbPlugin.py b/plugins/PY/pinpointPy/libs/MySQLdb/MysqldbPlugin.py
similarity index 80%
rename from plugins/PY/pinpoint/libs/MySQLdb/MysqldbPlugin.py
rename to plugins/PY/pinpointPy/libs/MySQLdb/MysqldbPlugin.py
index c98610209..cba720227 100644
--- a/plugins/PY/pinpoint/libs/MySQLdb/MysqldbPlugin.py
+++ b/plugins/PY/pinpointPy/libs/MySQLdb/MysqldbPlugin.py
@@ -19,11 +19,12 @@
 # ------------------------------------------------------------------------------
 
 
+from ... import Common
+from ... import pinpoint
+from ... import Defines
 
-from pinpoint.common import *
-import pinpointPy
 
-class MysqldbPlugin(Candy):
+class MysqldbPlugin(Common.PinTrace):
     def __init__(self, name):
         super().__init__(name)
         self.dst = ''
@@ -33,15 +34,15 @@ def onBefore(self, *args, **kwargs):
         connection = args[0]
         self.dst = connection.get_host_info()
         ###############################################################
-        pinpointPy.add_clue(PP_INTERCEPTOR_NAME, self.getFuncUniqueName())
-        pinpointPy.add_clue(PP_SERVER_TYPE, PP_MYSQL)
+        pinpoint.add_trace_header(Defines.PP_INTERCEPTOR_NAME, self.getFuncUniqueName())
+        pinpoint.add_trace_header(Defines.PP_SERVER_TYPE, Defines.PP_MYSQL)
         query = args[1]
         ## copy from MySQLdb  def query(self, query):
         if isinstance(query, bytearray):
             query = bytes(query)
-        pinpointPy.add_clue(PP_SQL_FORMAT, query.decode('utf-8'))
+        pinpoint.add_trace_header(Defines.PP_SQL_FORMAT, query.decode('utf-8'))
         ###############################################################
-        pinpointPy.add_clue(PP_DESTINATION, self.dst)
+        pinpoint.add_trace_header(Defines.PP_DESTINATION, self.dst)
         return args, kwargs
 
     def onEnd(self, ret):
@@ -49,4 +50,4 @@ def onEnd(self, ret):
         return ret
 
     def onException(self, e):
-        pinpointPy.add_clue(PP_ADD_EXCEPTION, str(e))
\ No newline at end of file
+        pinpoint.add_trace_header(Defines.PP_ADD_EXCEPTION, str(e))
diff --git a/plugins/PY/pinpoint/libs/MySQLdb/__init__.py b/plugins/PY/pinpointPy/libs/MySQLdb/__init__.py
similarity index 95%
rename from plugins/PY/pinpoint/libs/MySQLdb/__init__.py
rename to plugins/PY/pinpointPy/libs/MySQLdb/__init__.py
index bd04ef041..5b5cbd103 100644
--- a/plugins/PY/pinpoint/libs/MySQLdb/__init__.py
+++ b/plugins/PY/pinpointPy/libs/MySQLdb/__init__.py
@@ -16,9 +16,9 @@
 #  See the License for the specific language governing permissions and         -
 #  limitations under the License.                                              -
 # ------------------------------------------------------------------------------
+from ...Interceptor import Interceptor,intercept_once
 
-from pinpoint.common import Interceptor
-
+@intercept_once
 def monkey_patch():
     try:
         from MySQLdb.connections import Connection
diff --git a/plugins/PY/pinpoint/libs/MysqlConnector/CMysqlPlugin.py b/plugins/PY/pinpointPy/libs/MysqlConnector/CMysqlPlugin.py
similarity index 81%
rename from plugins/PY/pinpoint/libs/MysqlConnector/CMysqlPlugin.py
rename to plugins/PY/pinpointPy/libs/MysqlConnector/CMysqlPlugin.py
index 218e54810..f19339108 100644
--- a/plugins/PY/pinpoint/libs/MysqlConnector/CMysqlPlugin.py
+++ b/plugins/PY/pinpointPy/libs/MysqlConnector/CMysqlPlugin.py
@@ -15,10 +15,12 @@
 # ------------------------------------------------------------------------------
 
 
-from pinpoint.common import *
-import pinpointPy
+from ... import Common
+from ... import Defines
+from ... import pinpoint
 
-class CMysqlPlugin(Candy):
+
+class CMysqlPlugin(Common.PinTrace):
 
     def __init__(self,name):
         super().__init__(name)
@@ -26,12 +28,12 @@ def __init__(self,name):
     def onBefore(self,*args, **kwargs):
         super().onBefore(*args, **kwargs)
         ###############################################################
-        pinpointPy.add_clue(PP_INTERCEPTOR_NAME,self.getFuncUniqueName())
-        pinpointPy.add_clue(PP_SERVER_TYPE, PP_MYSQL)
-        pinpointPy.add_clue(PP_SQL_FORMAT,  args[1])
+        pinpoint.add_trace_header(Defines.PP_INTERCEPTOR_NAME, self.getFuncUniqueName())
+        pinpoint.add_trace_header(Defines.PP_SERVER_TYPE, Defines.PP_MYSQL)
+        pinpoint.add_trace_header(Defines.PP_SQL_FORMAT, args[1])
         ###############################################################
         dst = self.get_dst(args[0])
-        pinpointPy.add_clue(PP_DESTINATION, dst)
+        pinpoint.add_trace_header(Defines.PP_DESTINATION, dst)
         return args,kwargs
 
     def onEnd(self,ret):
@@ -39,7 +41,7 @@ def onEnd(self,ret):
         return ret
 
     def onException(self, e):
-        pinpointPy.add_clue(PP_ADD_EXCEPTION,str(e))
+        pinpoint.add_trace_header(Defines.PP_ADD_EXCEPTION, str(e))
 
     def get_arg(self, *args, **kwargs):
         args_tmp = {}
diff --git a/plugins/PY/pinpoint/libs/MysqlConnector/MysqlPlugin.py b/plugins/PY/pinpointPy/libs/MysqlConnector/MysqlPlugin.py
similarity index 81%
rename from plugins/PY/pinpoint/libs/MysqlConnector/MysqlPlugin.py
rename to plugins/PY/pinpointPy/libs/MysqlConnector/MysqlPlugin.py
index 1dd5674af..21c64db00 100644
--- a/plugins/PY/pinpoint/libs/MysqlConnector/MysqlPlugin.py
+++ b/plugins/PY/pinpointPy/libs/MysqlConnector/MysqlPlugin.py
@@ -15,10 +15,12 @@
 # ------------------------------------------------------------------------------
 
 
-from pinpoint.common import *
-import pinpointPy
+from ... import Common
+from ... import Defines
+from ... import pinpoint
 
-class MysqlPlugin(Candy):
+
+class MysqlPlugin(Common.PinTrace):
 
     def __init__(self,name):
         super().__init__(name)
@@ -26,12 +28,12 @@ def __init__(self,name):
     def onBefore(self,*args, **kwargs):
         super().onBefore(*args, **kwargs)
         ###############################################################
-        pinpointPy.add_clue(PP_INTERCEPTOR_NAME,self.getFuncUniqueName())
-        pinpointPy.add_clue(PP_SERVER_TYPE, PP_MYSQL)
-        pinpointPy.add_clue(PP_SQL_FORMAT,  args[1])
+        pinpoint.add_trace_header(Defines.PP_INTERCEPTOR_NAME, self.getFuncUniqueName())
+        pinpoint.add_trace_header(Defines.PP_SERVER_TYPE, Defines.PP_MYSQL)
+        pinpoint.add_trace_header(Defines.PP_SQL_FORMAT, args[1])
         ###############################################################
         dst = self.get_dst(args[0])
-        pinpointPy.add_clue(PP_DESTINATION, dst)
+        pinpoint.add_trace_header(Defines.PP_DESTINATION, dst)
         return args,kwargs
 
     def onEnd(self,ret):
@@ -39,7 +41,7 @@ def onEnd(self,ret):
         return ret
 
     def onException(self, e):
-        pinpointPy.add_clue(PP_ADD_EXCEPTION,str(e))
+        pinpoint.add_trace_header(Defines.PP_ADD_EXCEPTION, str(e))
 
     def get_arg(self, *args, **kwargs):
         args_tmp = {}
diff --git a/plugins/PY/pinpoint/libs/MysqlConnector/__init__.py b/plugins/PY/pinpointPy/libs/MysqlConnector/__init__.py
similarity index 96%
rename from plugins/PY/pinpoint/libs/MysqlConnector/__init__.py
rename to plugins/PY/pinpointPy/libs/MysqlConnector/__init__.py
index ab26c8002..2a050e189 100644
--- a/plugins/PY/pinpoint/libs/MysqlConnector/__init__.py
+++ b/plugins/PY/pinpointPy/libs/MysqlConnector/__init__.py
@@ -14,9 +14,9 @@
 #  limitations under the License.                                              -
 # ------------------------------------------------------------------------------
 
-from pinpoint.common import Interceptor
-
+from ...Interceptor import Interceptor,intercept_once
 
+@intercept_once
 def monkey_patch():
     try:
         from mysql.connector.cursor import MySQLCursor, MySQLCursorPrepared
diff --git a/plugins/PY/pinpoint/libs/PyMysql/PyMysqlPlugin.py b/plugins/PY/pinpointPy/libs/PyMysql/PyMysqlPlugin.py
similarity index 81%
rename from plugins/PY/pinpoint/libs/PyMysql/PyMysqlPlugin.py
rename to plugins/PY/pinpointPy/libs/PyMysql/PyMysqlPlugin.py
index fa4692a2b..e01dcd85c 100644
--- a/plugins/PY/pinpoint/libs/PyMysql/PyMysqlPlugin.py
+++ b/plugins/PY/pinpointPy/libs/PyMysql/PyMysqlPlugin.py
@@ -15,10 +15,11 @@
 # ------------------------------------------------------------------------------
 
 
-from pinpoint.common import *
-import pinpointPy
+from ... import Common
+from ... import pinpoint
+from ... import Defines
 
-class PyMysqlPlugin(Candy):
+class PyMysqlPlugin(Common.PinTrace):
 
     def __init__(self,name):
         super().__init__(name)
@@ -26,13 +27,13 @@ def __init__(self,name):
     def onBefore(self,*args, **kwargs):
         super().onBefore(*args, **kwargs)
         ###############################################################
-        pinpointPy.add_clue(PP_INTERCEPTOR_NAME,self.getFuncUniqueName())
-        pinpointPy.add_clue(PP_SERVER_TYPE, PP_MYSQL)
-        pinpointPy.add_clue(PP_SQL_FORMAT,  args[1])
+        pinpoint.add_trace_header(Defines.PP_INTERCEPTOR_NAME, self.getFuncUniqueName())
+        pinpoint.add_trace_header(Defines.PP_SERVER_TYPE, Defines.PP_MYSQL)
+        pinpoint.add_trace_header(Defines.PP_SQL_FORMAT, args[1])
         ###############################################################
         cursor = args[0]
         dst = cursor.connection.get_host_info()
-        pinpointPy.add_clue(PP_DESTINATION, dst)
+        pinpoint.add_trace_header(Defines.PP_DESTINATION, dst)
         return args,kwargs
 
     def onEnd(self,ret):
@@ -40,7 +41,7 @@ def onEnd(self,ret):
         return ret
 
     def onException(self, e):
-        pinpointPy.add_clue(PP_ADD_EXCEPTION,str(e))
+        pinpoint.add_trace_header(Defines.PP_ADD_EXCEPTION, str(e))
 
     def get_arg(self, *args, **kwargs):
         args_tmp = {}
diff --git a/plugins/PY/pinpoint/libs/PyMysql/__init__.py b/plugins/PY/pinpointPy/libs/PyMysql/__init__.py
similarity index 95%
rename from plugins/PY/pinpoint/libs/PyMysql/__init__.py
rename to plugins/PY/pinpointPy/libs/PyMysql/__init__.py
index 59706adb5..01f36f292 100644
--- a/plugins/PY/pinpoint/libs/PyMysql/__init__.py
+++ b/plugins/PY/pinpointPy/libs/PyMysql/__init__.py
@@ -14,9 +14,9 @@
 #  limitations under the License.                                              -
 # ------------------------------------------------------------------------------
 
-from pinpoint.common import Interceptor
-
+from ...Interceptor import Interceptor,intercept_once
 
+@intercept_once
 def monkey_patch():
     try:
         import pymysql
diff --git a/plugins/PY/pinpoint/libs/__init__.py b/plugins/PY/pinpointPy/libs/__init__.py
similarity index 59%
rename from plugins/PY/pinpoint/libs/__init__.py
rename to plugins/PY/pinpointPy/libs/__init__.py
index 4540b4514..b8a31c1e4 100644
--- a/plugins/PY/pinpoint/libs/__init__.py
+++ b/plugins/PY/pinpointPy/libs/__init__.py
@@ -14,25 +14,26 @@
 #  limitations under the License.                                              -
 # ------------------------------------------------------------------------------
 import importlib
-from .internal import gl
-
-def __monkey_patch(*args,**kwargs):
+def __monkey_patch(*args, **kwargs):
     for key in kwargs:
         if kwargs[key]:
-            module = importlib.import_module('pinpoint.libs.'+key)
-            monkey_patch = getattr(module,'monkey_patch')
+            module = importlib.import_module('pinpointPy.libs.' + key)
+            monkey_patch = getattr(module, 'monkey_patch')
             if callable(monkey_patch):
                 monkey_patch()
-                print("try to install pinpoint.lib.%s module"%(key))
-
+                print("try to install pinpointPy.lib.%s module" % (key))
 
+def monkey_patch_for_pinpoint(pymongo=True,
+                              PyMysql=True,
+                              pyRedis=True,
+                              requests=True,
+                              urllib=True,
+                              sqlalchemy=True,
+                              MySQLdb=True,
+                              DjangoRest=True,
+                              MysqlConnector=True):
+    __monkey_patch(pymongo=pymongo, PyMysql=PyMysql, pyRedis=pyRedis, requests=requests, urllib=urllib,
+                   sqlalchemy=sqlalchemy, MySQLdb=MySQLdb, DjangoRest=DjangoRest,MysqlConnector=MysqlConnector)
 
-def monkey_patch_for_pinpoint(pymongo=True,PyMysql=True,pyRedis=True,requests=True,urllib=True,
-                       sqlalchemy=True,aioHttp=False,MySQLdb=True,amqp=True,kombu=True,celeryCaller=True,celeryTask=True,DjangoRest=True,MysqlConnector=True):
-    if not gl.patched:
-        gl.patched = True
-        __monkey_patch(pymongo=pymongo,PyMysql=PyMysql,pyRedis=pyRedis,requests=requests,urllib=urllib,
-                       sqlalchemy=sqlalchemy,aioHttp=aioHttp,MySQLdb=MySQLdb,amqp=amqp,kombu=kombu,
-                       celeryCaller=celeryCaller,celeryTask=celeryTask,DjangoRest=DjangoRest,MysqlConnector=MysqlConnector)
 
-__all__=['monkey_patch_for_pinpoint']
+__all__ = ['monkey_patch_for_pinpoint']
diff --git a/plugins/PY2.7/pinpoint/libs/pymongo/MongoClientPlugin.py b/plugins/PY/pinpointPy/libs/pyRedis/PyRedisPlugins.py
similarity index 73%
rename from plugins/PY2.7/pinpoint/libs/pymongo/MongoClientPlugin.py
rename to plugins/PY/pinpointPy/libs/pyRedis/PyRedisPlugins.py
index f8d6ba183..4f4bc8657 100644
--- a/plugins/PY2.7/pinpoint/libs/pymongo/MongoClientPlugin.py
+++ b/plugins/PY/pinpointPy/libs/pyRedis/PyRedisPlugins.py
@@ -3,6 +3,7 @@
 
 # Created by eeliu at 8/20/20
 
+
 # ******************************************************************************
 #   Copyright  2020. NAVER Corp.
 #
@@ -19,33 +20,33 @@
 #   limitations under the License.
 # ******************************************************************************
 
-from pinpoint.common import *
-import pinpointPy
 
+from ... import Common
+from ... import pinpoint
+from ... import Defines
+
+
+class PyRedisPlugins(Common.PinTrace):
 
-class MongoClientPlugin(Candy):
     def __init__(self, name):
         super().__init__(name)
         self.dst = ''
 
     def onBefore(self, *args, **kwargs):
         super().onBefore(*args, **kwargs)
-        collection = args[0]
-        self.dst = str(collection.__database.address)
         ###############################################################
-        pinpointPy.add_clue(PP_INTERCEPTOR_NAME, self.getFuncUniqueName())
-        pinpointPy.add_clue(PP_SERVER_TYPE, PP_MONGDB_EXE_QUERY)
-        # pinpointPy.add_clues(PP_ARGS, )
+        pinpoint.add_trace_header(Defines.PP_INTERCEPTOR_NAME, self.getFuncUniqueName())
+        pinpoint.add_trace_header(Defines.PP_SERVER_TYPE, Defines.PP_REDIS)
         ###############################################################
-        pinpointPy.add_clue(PP_DESTINATION, self.dst)
+        pinpoint.add_trace_header(Defines.PP_DESTINATION, str(args[0]))
         return args, kwargs
 
     def onEnd(self, ret):
         ###############################################################
-        pinpointPy.add_clues(PP_RETURN, str(ret))
+        # add_trace_header_v2(PP_RETURN,str(ret))
         ###############################################################
         super().onEnd(ret)
         return ret
 
     def onException(self, e):
-        pinpointPy.add_clue(PP_ADD_EXCEPTION, str(e))
+        pinpoint.add_trace_header(Defines.PP_ADD_EXCEPTION, str(e))
diff --git a/plugins/PY/pinpoint/libs/pyRedis/__init__.py b/plugins/PY/pinpointPy/libs/pyRedis/__init__.py
similarity index 95%
rename from plugins/PY/pinpoint/libs/pyRedis/__init__.py
rename to plugins/PY/pinpointPy/libs/pyRedis/__init__.py
index 32d053665..37b8bb2b2 100644
--- a/plugins/PY/pinpoint/libs/pyRedis/__init__.py
+++ b/plugins/PY/pinpointPy/libs/pyRedis/__init__.py
@@ -19,8 +19,10 @@
 
 # Created by eeliu at 8/20/20
 
+from ...Interceptor import Interceptor,intercept_once
+
+@intercept_once
 def monkey_patch():
-    from pinpoint.common import Interceptor
     from .PyRedisPlugins import PyRedisPlugins
     try:
         from redis.connection import Connection
diff --git a/plugins/PY/pinpoint/libs/pymongo/MongoClientPlugin.py b/plugins/PY/pinpointPy/libs/pymongo/MongoClientPlugin.py
similarity index 78%
rename from plugins/PY/pinpoint/libs/pymongo/MongoClientPlugin.py
rename to plugins/PY/pinpointPy/libs/pymongo/MongoClientPlugin.py
index a80754ad3..0f1f64fce 100644
--- a/plugins/PY/pinpoint/libs/pymongo/MongoClientPlugin.py
+++ b/plugins/PY/pinpointPy/libs/pymongo/MongoClientPlugin.py
@@ -19,11 +19,12 @@
 
 # Created by eeliu at 8/20/20
 
-from pinpoint.common import *
-import pinpointPy
+from ... import Common
+from ... import pinpoint
+from ... import Defines
 
 
-class MongoClientPlugin(Candy):
+class MongoClientPlugin(Common.PinTrace):
     def __init__(self, name):
         super().__init__(name)
         self.dst = ''
@@ -33,19 +34,19 @@ def onBefore(self, *args, **kwargs):
         collection = args[0]
         self.dst = str(collection.__database.address)
         ###############################################################
-        pinpointPy.add_clue(PP_INTERCEPTOR_NAME, self.getFuncUniqueName())
-        pinpointPy.add_clue(PP_SERVER_TYPE, PP_MONGDB_EXE_QUERY)
-        # pinpointPy.add_clues(PP_ARGS, )
+        pinpoint.add_trace_header(Defines.PP_INTERCEPTOR_NAME, self.getFuncUniqueName())
+        pinpoint.add_trace_header(Defines.PP_SERVER_TYPE, Defines.PP_MONGDB_EXE_QUERY)
+        # add_trace_header_v2(PP_ARGS, )
         ###############################################################
-        pinpointPy.add_clue(PP_DESTINATION, self.dst)
+        pinpoint.add_trace_header(Defines.PP_DESTINATION, self.dst)
         return args, kwargs
 
     def onEnd(self, ret):
         ###############################################################
-        pinpointPy.add_clues(PP_RETURN, str(ret))
+        pinpoint.add_trace_header_v2(Defines.PP_RETURN, str(ret))
         ###############################################################
         super().onEnd(ret)
         return ret
 
     def onException(self, e):
-        pinpointPy.add_clue(PP_ADD_EXCEPTION, str(e))
+        pinpoint.add_trace_header(Defines.PP_ADD_EXCEPTION, str(e))
diff --git a/plugins/PY/pinpoint/libs/pymongo/__init__.py b/plugins/PY/pinpointPy/libs/pymongo/__init__.py
similarity index 68%
rename from plugins/PY/pinpoint/libs/pymongo/__init__.py
rename to plugins/PY/pinpointPy/libs/pymongo/__init__.py
index 45af8d9f6..defc59e18 100644
--- a/plugins/PY/pinpoint/libs/pymongo/__init__.py
+++ b/plugins/PY/pinpointPy/libs/pymongo/__init__.py
@@ -18,26 +18,26 @@
 # ------------------------------------------------------------------------------
 
 # Created by eeliu at 8/20/20
+from ...Interceptor import Interceptor,intercept_once
 
-
+@intercept_once
 def monkey_patch():
 
-    from pinpoint.common import Interceptor
     try:
-        import pymongo
+        from pymongo.collection import Collection
         from .MongoClientPlugin import MongoClientPlugin
-
+        # print(pymongo.collection)
         Interceptors = [
-            Interceptor(pymongo.collection,'find', MongoClientPlugin),
-            Interceptor(pymongo.collection, 'insert', MongoClientPlugin),
-            Interceptor(pymongo.collection, 'update', MongoClientPlugin),
-            Interceptor(pymongo.collection, 'update_many', MongoClientPlugin),
-            Interceptor(pymongo.collection, 'delete_one', MongoClientPlugin),
-            Interceptor(pymongo.collection, 'delete_many', MongoClientPlugin),
-            Interceptor(pymongo.collection, 'insert_many', MongoClientPlugin),
-            Interceptor(pymongo.collection, 'insert_one', MongoClientPlugin),
+            Interceptor(Collection,'find', MongoClientPlugin),
+            # Interceptor(Collection, 'insert', MongoClientPlugin),
+            # Interceptor(Collection, 'update', MongoClientPlugin),
+            Interceptor(Collection, 'update_many', MongoClientPlugin),
+            Interceptor(Collection, 'delete_one', MongoClientPlugin),
+            Interceptor(Collection, 'delete_many', MongoClientPlugin),
+            Interceptor(Collection, 'insert_many', MongoClientPlugin),
+            Interceptor(Collection, 'insert_one', MongoClientPlugin),
         ]
-
+        
         for interceptor in Interceptors:
             interceptor.enable()
 
diff --git a/plugins/PY/pinpoint/libs/requests/NextSpanPlugin.py b/plugins/PY/pinpointPy/libs/requests/NextSpanPlugin.py
similarity index 63%
rename from plugins/PY/pinpoint/libs/requests/NextSpanPlugin.py
rename to plugins/PY/pinpointPy/libs/requests/NextSpanPlugin.py
index a762db589..b71ae059f 100644
--- a/plugins/PY/pinpoint/libs/requests/NextSpanPlugin.py
+++ b/plugins/PY/pinpointPy/libs/requests/NextSpanPlugin.py
@@ -15,18 +15,20 @@
 # ------------------------------------------------------------------------------
 
 
+from ... import Common
+from ... import Helper
+from ... import Defines
+from ... import pinpoint
 
-from pinpoint.common import *
-import pinpointPy
-from  urllib.parse import urlparse
+from urllib.parse import urlparse
 
 
-class NextSpanPlugin(Candy):
+class NextSpanPlugin(Common.PinTrace):
 
-    def __init__(self,name):
+    def __init__(self, name):
         super().__init__(name)
 
-    def isSample(self,args):
+    def isSample(self, args):
         '''
         if not root, no trace
         :return:
@@ -36,44 +38,44 @@ def isSample(self,args):
         kwargs = args[1]
         if "headers" not in kwargs:
             kwargs["headers"] = {}
-        if pinpointPy.get_context_key(PP_HEADER_PINPOINT_SAMPLED) =="s1":
-            generatePinpointHeader(target, kwargs['headers'])
+        if pinpoint.get_context(Defines.PP_HEADER_PINPOINT_SAMPLED) == "s1":
+            Helper.generatePinpointHeader(target, kwargs['headers'])
             return True
         else:
-            kwargs['headers'][PP_HEADER_PINPOINT_SAMPLED] = PP_NOT_SAMPLED
+            kwargs['headers'][Defines.PP_HEADER_PINPOINT_SAMPLED] = Defines.PP_NOT_SAMPLED
             return False
 
-    def onBefore(self,*args, **kwargs):
+    def onBefore(self, *args, **kwargs):
         url = args[0]
         target = urlparse(url).netloc
         super().onBefore(*args, **kwargs)
         ###############################################################
-        pinpointPy.add_clue(PP_INTERCEPTOR_NAME,self.getFuncUniqueName())
-        pinpointPy.add_clue(PP_SERVER_TYPE, PP_REMOTE_METHOD)
-        pinpointPy.add_clues(PP_ARGS, url)
-        pinpointPy.add_clues(PP_HTTP_URL, url)
-        pinpointPy.add_clue(PP_DESTINATION, target)
+        pinpoint.add_trace_header(Defines.PP_INTERCEPTOR_NAME, self.getFuncUniqueName())
+        pinpoint.add_trace_header(Defines.PP_SERVER_TYPE, Defines.PP_REMOTE_METHOD)
+        pinpoint.add_trace_header_v2(Defines.PP_ARGS, url)
+        pinpoint.add_trace_header_v2(Defines.PP_HTTP_URL, url)
+        pinpoint.add_trace_header(Defines.PP_DESTINATION, target)
         ###############################################################
         return args, kwargs
 
-    def onEnd(self,ret):
+    def onEnd(self, ret):
         ###############################################################
-        pinpointPy.add_clue(PP_NEXT_SPAN_ID, pinpointPy.get_context_key(PP_NEXT_SPAN_ID))
-        pinpointPy.add_clues(PP_HTTP_STATUS_CODE, str(ret.status_code))
-        pinpointPy.add_clues(PP_RETURN, str(ret))
+        pinpoint.add_trace_header(Defines.PP_NEXT_SPAN_ID, pinpoint.get_context(Defines.PP_NEXT_SPAN_ID))
+        pinpoint.add_trace_header_v2(Defines.PP_HTTP_STATUS_CODE, str(ret.status_code))
+        pinpoint.add_trace_header_v2(Defines.PP_RETURN, str(ret))
         ###############################################################
         super().onEnd(ret)
         return ret
 
     def onException(self, e):
-        pinpointPy.add_clue(PP_ADD_EXCEPTION,str(e))
+        pinpoint.add_trace_header(Defines.PP_ADD_EXCEPTION, str(e))
 
     def get_arg(self, *args, **kwargs):
         args_tmp = {}
         j = 0
 
         for i in args:
-            args_tmp["arg["+str(j)+"]"] = (str(i))
+            args_tmp["arg[" + str(j) + "]"] = (str(i))
             j += 1
 
         for k in kwargs:
diff --git a/plugins/PY/pinpoint/libs/requests/__init__.py b/plugins/PY/pinpointPy/libs/requests/__init__.py
similarity index 95%
rename from plugins/PY/pinpoint/libs/requests/__init__.py
rename to plugins/PY/pinpointPy/libs/requests/__init__.py
index c5578c2f4..c8ce8bb1e 100644
--- a/plugins/PY/pinpoint/libs/requests/__init__.py
+++ b/plugins/PY/pinpointPy/libs/requests/__init__.py
@@ -15,9 +15,10 @@
 # ------------------------------------------------------------------------------
 
 
+from ...Interceptor import Interceptor,intercept_once
 
+@intercept_once
 def monkey_patch():
-    from pinpoint.common import Interceptor
 
     try:
         import requests
diff --git a/plugins/PY/pinpoint/libs/sqlalchemy/__init__.py b/plugins/PY/pinpointPy/libs/sqlalchemy/__init__.py
similarity index 96%
rename from plugins/PY/pinpoint/libs/sqlalchemy/__init__.py
rename to plugins/PY/pinpointPy/libs/sqlalchemy/__init__.py
index d20cb646c..e344b499b 100644
--- a/plugins/PY/pinpoint/libs/sqlalchemy/__init__.py
+++ b/plugins/PY/pinpointPy/libs/sqlalchemy/__init__.py
@@ -19,8 +19,9 @@
 
 # Created by eeliu at 7/31/20
 
+from ...Interceptor import intercept_once
 
-
+@intercept_once
 def monkey_patch():
     try:
         from .sqlalchemyPlugin import before_cursor_execute,after_cursor_execute
diff --git a/plugins/PY/pinpoint/libs/sqlalchemy/sqlalchemyPlugin.py b/plugins/PY/pinpointPy/libs/sqlalchemy/sqlalchemyPlugin.py
similarity index 77%
rename from plugins/PY/pinpoint/libs/sqlalchemy/sqlalchemyPlugin.py
rename to plugins/PY/pinpointPy/libs/sqlalchemy/sqlalchemyPlugin.py
index c3cd553ae..2ee217b6a 100644
--- a/plugins/PY/pinpoint/libs/sqlalchemy/sqlalchemyPlugin.py
+++ b/plugins/PY/pinpointPy/libs/sqlalchemy/sqlalchemyPlugin.py
@@ -20,31 +20,32 @@
 # Created by eeliu at 7/31/20
 
 
-from pinpoint.common import *
+from ... import pinpoint
+from ... import Defines
 from sqlalchemy import event
 from sqlalchemy.engine import Engine
 from urllib.parse import urlparse
-import pinpointPy
+
 
 
 @event.listens_for(Engine, "before_cursor_execute")
 def before_cursor_execute(conn, cursor, statement,
                         parameters, context, executemany):
-    pinpointPy.start_trace()
-    pinpointPy.add_clue(PP_INTERCEPTOR_NAME, 'before_cursor_execute')
-    pinpointPy.add_clue(PP_SQL_FORMAT,statement)
-    pinpointPy.add_clues(PP_ARGS, 'user not cared')
+    pinpoint.with_trace()
+    pinpoint.add_trace_header(Defines.PP_INTERCEPTOR_NAME, 'before_cursor_execute')
+    pinpoint.add_trace_header(Defines.PP_SQL_FORMAT, statement)
+    pinpoint.add_trace_header_v2(Defines.PP_ARGS, 'user not cared')
     DBUrl = urlparse(str(conn.engine.url))
     if 'mysql'  in DBUrl.scheme:
-        pinpointPy.add_clue(PP_SERVER_TYPE, PP_MYSQL)
+        pinpoint.add_trace_header(Defines.PP_SERVER_TYPE, Defines.PP_MYSQL)
     
     if 'postgresql' in DBUrl.scheme:
-        pinpointPy.add_clue(PP_SERVER_TYPE, PP_POSTGRESQL)
+        pinpoint.add_trace_header(Defines.PP_SERVER_TYPE, Defines.PP_POSTGRESQL)
 
-    pinpointPy.add_clue(PP_DESTINATION,DBUrl.hostname)
+    pinpoint.add_trace_header(Defines.PP_DESTINATION, DBUrl.hostname)
 
 @event.listens_for(Engine, "after_cursor_execute")
 def after_cursor_execute(conn, cursor, statement,
                         parameters, context, executemany):
-    pinpointPy.end_trace()
+    pinpoint.end_trace()
 
diff --git a/plugins/PY/pinpoint/libs/urllib/UrlOpenPlugin.py b/plugins/PY/pinpointPy/libs/urllib/UrlOpenPlugin.py
similarity index 67%
rename from plugins/PY/pinpoint/libs/urllib/UrlOpenPlugin.py
rename to plugins/PY/pinpointPy/libs/urllib/UrlOpenPlugin.py
index 874b1f49b..1c24cbb15 100644
--- a/plugins/PY/pinpoint/libs/urllib/UrlOpenPlugin.py
+++ b/plugins/PY/pinpointPy/libs/urllib/UrlOpenPlugin.py
@@ -18,11 +18,14 @@
 # ------------------------------------------------------------------------------
 
 # Created by eeliu at 8/20/20
+from urllib.parse import urlparse
 
-from pinpoint.common import *
-import pinpointPy
+from ... import Common
+from ... import Defines
+from ... import pinpoint
+from ... import Helper
 
-class UrlOpenPlugin(Candy):
+class UrlOpenPlugin(Common.PinTrace):
 
     def __init__(self, name):
         super().__init__(name)
@@ -37,11 +40,11 @@ def isSample(self,args):
         kwargs = args[1]
         if "headers" not in kwargs:
             kwargs["headers"] = {}
-        if pinpointPy.get_context_key(PP_HEADER_PINPOINT_SAMPLED) =="s1":
-            generatePinpointHeader(target, kwargs['headers'])
+        if pinpoint.get_context(Defines.PP_HEADER_PINPOINT_SAMPLED) == "s1":
+            Helper.generatePinpointHeader(target, kwargs['headers'])
             return True
         else:
-            kwargs['headers'][PP_HEADER_PINPOINT_SAMPLED] = PP_NOT_SAMPLED
+            kwargs['headers'][Defines.PP_HEADER_PINPOINT_SAMPLED] = Defines.PP_NOT_SAMPLED
             return False
 
     def onBefore(self,*args, **kwargs):
@@ -49,24 +52,24 @@ def onBefore(self,*args, **kwargs):
         target = urlparse(url).netloc
         super().onBefore(*args, **kwargs)
         ###############################################################
-        pinpointPy.add_clue(PP_INTERCEPTOR_NAME,self.getFuncUniqueName())
-        pinpointPy.add_clue(PP_SERVER_TYPE,PP_REMOTE_METHOD)
-        pinpointPy.add_clues(PP_ARGS, url)
-        pinpointPy.add_clues(PP_HTTP_URL, url)
-        pinpointPy.add_clue(PP_DESTINATION, target)
+        pinpoint.add_trace_header(Defines.PP_INTERCEPTOR_NAME, self.getFuncUniqueName())
+        pinpoint.add_trace_header(Defines.PP_SERVER_TYPE, Defines.PP_REMOTE_METHOD)
+        pinpoint.add_trace_header_v2(Defines.PP_ARGS, url)
+        pinpoint.add_trace_header_v2(Defines.PP_HTTP_URL, url)
+        pinpoint.add_trace_header(Defines.PP_DESTINATION, target)
         ###############################################################
         return args,kwargs
 
     def onEnd(self,ret):
         ###############################################################
 
-        pinpointPy.add_clue(PP_NEXT_SPAN_ID, pinpointPy.get_context_key(PP_NEXT_SPAN_ID))
-        pinpointPy.add_clues(PP_HTTP_STATUS_CODE, str(ret.status_code))
-        pinpointPy.add_clues(PP_RETURN, str(ret))
+        pinpoint.add_trace_header(Defines.PP_NEXT_SPAN_ID, pinpoint.get_context(Defines.PP_NEXT_SPAN_ID))
+        pinpoint.add_trace_header_v2(Defines.PP_HTTP_STATUS_CODE, str(ret.status_code))
+        pinpoint.add_trace_header_v2(Defines.PP_RETURN, str(ret))
         ###############################################################
         super().onEnd(ret)
         return ret
 
     def onException(self, e):
-        pinpointPy.add_clue(PP_ADD_EXCEPTION,str(e))
+        pinpoint.add_trace_header(Defines.PP_ADD_EXCEPTION, str(e))
 
diff --git a/plugins/PY/pinpoint/libs/urllib/__init__.py b/plugins/PY/pinpointPy/libs/urllib/__init__.py
similarity index 95%
rename from plugins/PY/pinpoint/libs/urllib/__init__.py
rename to plugins/PY/pinpointPy/libs/urllib/__init__.py
index 4f25e8cca..160d62843 100644
--- a/plugins/PY/pinpoint/libs/urllib/__init__.py
+++ b/plugins/PY/pinpointPy/libs/urllib/__init__.py
@@ -19,8 +19,10 @@
 
 # Created by eeliu at 8/20/20
 
+from ...Interceptor import Interceptor,intercept_once
+
+@intercept_once
 def monkey_patch():
-    from pinpoint.common import Interceptor
     try:
         import urllib.request
         from .UrlOpenPlugin import UrlOpenPlugin
diff --git a/plugins/PY/pinpointPy/pinpoint.py b/plugins/PY/pinpointPy/pinpoint.py
new file mode 100644
index 000000000..94d8501e9
--- /dev/null
+++ b/plugins/PY/pinpointPy/pinpoint.py
@@ -0,0 +1,96 @@
+# ------------------------------------------------------------------------------
+#  Copyright  2020. NAVER Corp.                                                -
+#                                                                              -
+#  Licensed under the Apache License, Version 2.0 (the "License");             -
+#  you may not use this file except in compliance with the License.            -
+#  You may obtain a copy of the License at                                     -
+#                                                                              -
+#   http://www.apache.org/licenses/LICENSE-2.0                                 -
+#                                                                              -
+#  Unless required by applicable law or agreed to in writing, software         -
+#  distributed under the License is distributed on an "AS IS" BASIS,           -
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    -
+#  See the License for the specific language governing permissions and         -
+#  limitations under the License.                                              -
+# ------------------------------------------------------------------------------
+# !/usr/bin/env python
+# -*- coding: UTF-8 -*-
+# Created by eeliu at 4/19/22
+
+import random
+import _pinpointPy
+from collections.abc import Callable
+
+__app_id = 'app_id_str'
+__app_name = 'app_name_str'
+
+
+def app_id():
+    global __app_id
+    return __app_id
+
+
+def app_name():
+    global __app_name
+    return __app_name
+
+
+def with_trace(trace_id=-1):
+    _pinpointPy.start_trace(trace_id)
+
+
+def end_trace(trace_id=-1):
+    _pinpointPy.end_trace(trace_id)
+
+
+def add_trace_header(key: str, value: str, trace_id: int = -1, location: int = 0):
+    _pinpointPy.add_clue(key, value, trace_id, location)
+
+
+def add_trace_header_v2(key: str, value: str, trace_id: int = -1, location: int = 0):
+    _pinpointPy.add_clues(key, value, trace_id, location)
+
+
+def add_context(key: str, value: str, trace_id: int = -1):
+    _pinpointPy.set_context_key(key, value, trace_id)
+
+
+def get_context(key: str, trace_id: int = -1):
+    return _pinpointPy.get_context_key(key,trace_id)
+
+
+def gen_tid():
+    global __app_id
+    return '%s^%s^%s' % (__app_id, str(_pinpointPy.start_time()), str(_pinpointPy.unique_id()))
+
+
+def gen_sid():
+    return str(random.randint(0, 2147483647))
+
+
+def trace_has_root(trace_id=-1):
+    return _pinpointPy.trace_has_root(trace_id)
+
+
+def mark_as_error(message: str, filename: str = '', line: int = 0):
+    _pinpointPy.mark_as_error(message, filename, line)
+
+
+def drop_trace(trace_id: int = -1):
+    _pinpointPy.drop_trace(trace_id)
+
+
+def check_trace_limit(time: int=-1) -> bool:
+    return _pinpointPy.check_tracelimit(time)
+
+
+def set_agent(app_id_str: str, app_name_str: str, collect_agent_host: str, trace_limit: int = -1, debug_callback=True):
+    global __app_id, __app_name
+    __app_id = app_id_str
+    __app_name = app_name_str
+    _pinpointPy.set_agent(collect_agent_host, trace_limit)
+    if type(debug_callback) == bool and debug_callback:
+        _pinpointPy.enable_debug(debug_callback)
+    elif callable(debug_callback):
+        # todo : check type is [[str]->]
+        _pinpointPy.enable_debug(debug_callback)
diff --git a/plugins/PY/pinpoint/pyramid/PyRequestPlugin.py b/plugins/PY/pinpointPy/pyramid/PyRequestPlugin.py
similarity index 79%
rename from plugins/PY/pinpoint/pyramid/PyRequestPlugin.py
rename to plugins/PY/pinpointPy/pyramid/PyRequestPlugin.py
index 65e1a8a0e..4db24fae6 100644
--- a/plugins/PY/pinpoint/pyramid/PyRequestPlugin.py
+++ b/plugins/PY/pinpointPy/pyramid/PyRequestPlugin.py
@@ -20,17 +20,17 @@
 # Created by eeliu at 11/12/20
 
 
-from pinpoint.settings import *
-from pinpoint.common import *
-
+from .. import pinpoint
+from .. import Defines
+from pinpointPy.RequestPlugins import RequestPlugin
 class PyRequestPlugin(RequestPlugin):
     def onBefore(self,*args, **kwargs):
         super().onBefore(*args, **kwargs)
         request = args[0]
-        pinpointPy.add_clue(PP_INTERCEPTOR_NAME, 'Pyramid-middleware')
-        pinpointPy.add_clue(PP_REQ_URI, request.path)
-        pinpointPy.add_clue(PP_REQ_CLIENT, request.remote_addr)
-        pinpointPy.add_clue(PP_REQ_SERVER, request.host)
+        pinpoint.add_trace_header(Defines.PP_INTERCEPTOR_NAME, 'Pyramid-middleware')
+        pinpoint.add_trace_header(Defines.PP_REQ_URI, request.path)
+        pinpoint.add_trace_header(Defines.PP_REQ_CLIENT, request.remote_addr)
+        pinpoint.add_trace_header(Defines.PP_REQ_SERVER, request.host)
 
 
     def onEnd(self, ret):
diff --git a/plugins/PY/pinpoint/pyramid/LoaderLibs.py b/plugins/PY/pinpointPy/pyramid/__init__.py
similarity index 88%
rename from plugins/PY/pinpoint/pyramid/LoaderLibs.py
rename to plugins/PY/pinpointPy/pyramid/__init__.py
index 57b023274..4639f5fab 100644
--- a/plugins/PY/pinpoint/pyramid/LoaderLibs.py
+++ b/plugins/PY/pinpointPy/pyramid/__init__.py
@@ -1,22 +1,24 @@
-#!/usr/bin/env psettingsython
-# -*- coding: UTF-8 -*-
-
-# ------------------------------------------------------------------------------
-#  Copyright  2020. NAVER Corp.                                                -
-#                                                                              -
-#  Licensed under the Apache License, Version 2.0 (the "License");             -
-#  you may not use this file except in compliance with the License.            -
-#  You may obtain a copy of the License at                                     -
-#                                                                              -
-#   http://www.apache.org/licenses/LICENSE-2.0                                 -
-#                                                                              -
-#  Unless required by applicable law or agreed to in writing, software         -
-#  distributed under the License is distributed on an "AS IS" BASIS,           -
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    -
-#  See the License for the specific language governing permissions and         -
-#  limitations under the License.                                              -
-# ------------------------------------------------------------------------------
-
-# Created by eeliu at 11/12/20
-from pinpoint.libs.PyMysql import *
-from pinpoint.libs.sqlalchemy import *
+#!/usr/bin/env psettingsython
+# -*- coding: UTF-8 -*-
+
+# ------------------------------------------------------------------------------
+#  Copyright  2020. NAVER Corp.                                                -
+#                                                                              -
+#  Licensed under the Apache License, Version 2.0 (the "License");             -
+#  you may not use this file except in compliance with the License.            -
+#  You may obtain a copy of the License at                                     -
+#                                                                              -
+#   http://www.apache.org/licenses/LICENSE-2.0                                 -
+#                                                                              -
+#  Unless required by applicable law or agreed to in writing, software         -
+#  distributed under the License is distributed on an "AS IS" BASIS,           -
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    -
+#  See the License for the specific language governing permissions and         -
+#  limitations under the License.                                              -
+# ------------------------------------------------------------------------------
+
+from .PyRequestPlugin import PyRequestPlugin
+# Created by suwei at 4/15/22
+from .tween import *
+
+__all__=['pinpoint_tween','PyRequestPlugin']
\ No newline at end of file
diff --git a/plugins/PY/pinpoint/pyramid/tween.py b/plugins/PY/pinpointPy/pyramid/tween.py
similarity index 95%
rename from plugins/PY/pinpoint/pyramid/tween.py
rename to plugins/PY/pinpointPy/pyramid/tween.py
index 685985e7d..e34e37a9f 100644
--- a/plugins/PY/pinpoint/pyramid/tween.py
+++ b/plugins/PY/pinpointPy/pyramid/tween.py
@@ -20,8 +20,6 @@
 # Created by eeliu at 11/12/20
 
 from .PyRequestPlugin import PyRequestPlugin
-from pinpoint.libs import monkey_patch_for_pinpoint
-monkey_patch_for_pinpoint()
 
 def pinpoint_tween(handler,registry):
 
diff --git a/plugins/PY/pinpoint/pyweb/RequestPlugin.py b/plugins/PY/pinpointPy/pyweb/RequestPlugin.py
similarity index 97%
rename from plugins/PY/pinpoint/pyweb/RequestPlugin.py
rename to plugins/PY/pinpointPy/pyweb/RequestPlugin.py
index 81e574b55..fa4180110 100644
--- a/plugins/PY/pinpoint/pyweb/RequestPlugin.py
+++ b/plugins/PY/pinpointPy/pyweb/RequestPlugin.py
@@ -18,7 +18,7 @@
 # ------------------------------------------------------------------------------
 
 # Created by eeliu at 11/12/20
-from pinpoint.common import WSGIPlugin
+from ..WSGIPlugin import WSGIPlugin
 
 class RequestPlugin(WSGIPlugin):
     pass
\ No newline at end of file
diff --git a/plugins/PY/pinpoint/libs/aioHttp/__init__.py b/plugins/PY/pinpointPy/pyweb/__init__.py
similarity index 87%
rename from plugins/PY/pinpoint/libs/aioHttp/__init__.py
rename to plugins/PY/pinpointPy/pyweb/__init__.py
index dd7028089..b4d85d998 100644
--- a/plugins/PY/pinpoint/libs/aioHttp/__init__.py
+++ b/plugins/PY/pinpointPy/pyweb/__init__.py
@@ -1,22 +1,22 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-
-# ------------------------------------------------------------------------------
-#  Copyright  2020. NAVER Corp.                                                -
-#                                                                              -
-#  Licensed under the Apache License, Version 2.0 (the "License");             -
-#  you may not use this file except in compliance with the License.            -
-#  You may obtain a copy of the License at                                     -
-#                                                                              -
-#   http://www.apache.org/licenses/LICENSE-2.0                                 -
-#                                                                              -
-#  Unless required by applicable law or agreed to in writing, software         -
-#  distributed under the License is distributed on an "AS IS" BASIS,           -
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    -
-#  See the License for the specific language governing permissions and         -
-#  limitations under the License.                                              -
-# ------------------------------------------------------------------------------
-
-# Created by eeliu at 11/11/20
-
-## not supported
\ No newline at end of file
+#!/usr/bin/env python
+# -*- coding: UTF-8 -*-
+# Created by suwei at 4/15/22
+
+# ------------------------------------------------------------------------------
+#  Copyright  2020. NAVER Corp.                                                -
+#                                                                              -
+#  Licensed under the Apache License, Version 2.0 (the "License");             -
+#  you may not use this file except in compliance with the License.            -
+#  You may obtain a copy of the License at                                     -
+#                                                                              -
+#   http://www.apache.org/licenses/LICENSE-2.0                                 -
+#                                                                              -
+#  Unless required by applicable law or agreed to in writing, software         -
+#  distributed under the License is distributed on an "AS IS" BASIS,           -
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    -
+#  See the License for the specific language governing permissions and         -
+#  limitations under the License.                                              -
+# ------------------------------------------------------------------------------
+from .middleware import PinPointMiddleWare
+from .RequestPlugin import RequestPlugin
+__all__=['PinPointMiddleWare','RequestPlugin']
\ No newline at end of file
diff --git a/plugins/PY/pinpoint/pyweb2/middleware.py b/plugins/PY/pinpointPy/pyweb/middleware.py
similarity index 95%
rename from plugins/PY/pinpoint/pyweb2/middleware.py
rename to plugins/PY/pinpointPy/pyweb/middleware.py
index f6f33d6e2..5471a6907 100644
--- a/plugins/PY/pinpoint/pyweb2/middleware.py
+++ b/plugins/PY/pinpointPy/pyweb/middleware.py
@@ -21,9 +21,6 @@
 
 from .RequestPlugin import RequestPlugin
 
-from pinpoint.libs import monkey_patch_for_pinpoint
-monkey_patch_for_pinpoint()
-
 def PinPointMiddleWare(application):
     def handler(environ,start_response):
         plugin = RequestPlugin("pyweb-request")
diff --git a/plugins/PY/pinpoint/pyweb2/RequestPlugin.py b/plugins/PY/pinpointPy/pyweb2/RequestPlugin.py
similarity index 97%
rename from plugins/PY/pinpoint/pyweb2/RequestPlugin.py
rename to plugins/PY/pinpointPy/pyweb2/RequestPlugin.py
index 81e574b55..fa4180110 100644
--- a/plugins/PY/pinpoint/pyweb2/RequestPlugin.py
+++ b/plugins/PY/pinpointPy/pyweb2/RequestPlugin.py
@@ -18,7 +18,7 @@
 # ------------------------------------------------------------------------------
 
 # Created by eeliu at 11/12/20
-from pinpoint.common import WSGIPlugin
+from ..WSGIPlugin import WSGIPlugin
 
 class RequestPlugin(WSGIPlugin):
     pass
\ No newline at end of file
diff --git a/plugins/PY/pinpoint/aiohttp/__init__.py b/plugins/PY/pinpointPy/pyweb2/__init__.py
similarity index 87%
rename from plugins/PY/pinpoint/aiohttp/__init__.py
rename to plugins/PY/pinpointPy/pyweb2/__init__.py
index 4fea69f2a..fc0af2f19 100644
--- a/plugins/PY/pinpoint/aiohttp/__init__.py
+++ b/plugins/PY/pinpointPy/pyweb2/__init__.py
@@ -1,20 +1,23 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-
-# ------------------------------------------------------------------------------
-#  Copyright  2020. NAVER Corp.                                                -
-#                                                                              -
-#  Licensed under the Apache License, Version 2.0 (the "License");             -
-#  you may not use this file except in compliance with the License.            -
-#  You may obtain a copy of the License at                                     -
-#                                                                              -
-#   http://www.apache.org/licenses/LICENSE-2.0                                 -
-#                                                                              -
-#  Unless required by applicable law or agreed to in writing, software         -
-#  distributed under the License is distributed on an "AS IS" BASIS,           -
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    -
-#  See the License for the specific language governing permissions and         -
-#  limitations under the License.                                              -
-# ------------------------------------------------------------------------------
-
-# Created by eeliu at 11/12/20
+#!/usr/bin/env python
+# -*- coding: UTF-8 -*-
+# Created by suwei at 4/15/22
+
+# ------------------------------------------------------------------------------
+#  Copyright  2020. NAVER Corp.                                                -
+#                                                                              -
+#  Licensed under the Apache License, Version 2.0 (the "License");             -
+#  you may not use this file except in compliance with the License.            -
+#  You may obtain a copy of the License at                                     -
+#                                                                              -
+#   http://www.apache.org/licenses/LICENSE-2.0                                 -
+#                                                                              -
+#  Unless required by applicable law or agreed to in writing, software         -
+#  distributed under the License is distributed on an "AS IS" BASIS,           -
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    -
+#  See the License for the specific language governing permissions and         -
+#  limitations under the License.                                              -
+# ------------------------------------------------------------------------------
+from .RequestPlugin import RequestPlugin
+from .middleware import PinPointMiddleWare
+
+__all__=['PinPointMiddleWare','RequestPlugin']
\ No newline at end of file
diff --git a/plugins/PY/pinpoint/pyweb/middleware.py b/plugins/PY/pinpointPy/pyweb2/middleware.py
similarity index 95%
rename from plugins/PY/pinpoint/pyweb/middleware.py
rename to plugins/PY/pinpointPy/pyweb2/middleware.py
index f6f33d6e2..5471a6907 100644
--- a/plugins/PY/pinpoint/pyweb/middleware.py
+++ b/plugins/PY/pinpointPy/pyweb2/middleware.py
@@ -21,9 +21,6 @@
 
 from .RequestPlugin import RequestPlugin
 
-from pinpoint.libs import monkey_patch_for_pinpoint
-monkey_patch_for_pinpoint()
-
 def PinPointMiddleWare(application):
     def handler(environ,start_response):
         plugin = RequestPlugin("pyweb-request")
diff --git a/plugins/PY2.7/Readme.md b/plugins/PY2.7/Readme.md
deleted file mode 100644
index e69de29bb..000000000
diff --git a/plugins/PY2.7/pinpoint/BaseHTTPRequestHandler/BaseHTTPRequestPlugins.py b/plugins/PY2.7/pinpoint/BaseHTTPRequestHandler/BaseHTTPRequestPlugins.py
deleted file mode 100644
index b85d23982..000000000
--- a/plugins/PY2.7/pinpoint/BaseHTTPRequestHandler/BaseHTTPRequestPlugins.py
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-# Created by eeliu at 3/5/20
-
-# ------------------------------------------------------------------------------
-#  Copyright  2020. NAVER Corp.
-#
-#  Licensed under the Apache License, Version 2.0 (the "License");
-#  you may not use this file except in compliance with the License.
-#  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing, software
-#  distributed under the License is distributed on an "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  See the License for the specific language governing permissions and
-#  limitations under the License.
-# ------------------------------------------------------------------------------
-
-
-
-import pinpointPy
-
-from pinpoint.common import *
-from pinpoint.settings import *
-
-class BaseHTTPRequestPlugins(Candy):
-    def __init__(self,name):
-        super(BaseHTTPRequestPlugins,self).__init__(name)
-
-    def onBefore(self,*args, **kwargs):
-        args, kwargs = super(BaseHTTPRequestPlugins,self).onBefore(*args, **kwargs)
-        pinpointPy.add_clue(PP_APP_NAME,APP_NAME)
-        pinpointPy.add_clue(PP_APP_ID, APP_ID)
-        ###############################################################
-        insBaseHttp = args[0]
-        pinpointPy.add_clue(PP_INTERCEPTOR_NAME, 'BaseHTTPRequest request')
-        pinpointPy.add_clue(PP_REQ_URI,insBaseHttp.path)
-        pinpointPy.add_clue(PP_REQ_CLIENT,insBaseHttp.client_address[0])
-        
-        pinpointPy.add_clue(PP_REQ_SERVER,insBaseHttp.headers.get('Host'))
-        pinpointPy.add_clue(PP_SERVER_TYPE,PYTHON)
-
-        sid =  generateSid()
-        tid =  generateTid()
-        pinpointPy.add_clue(PP_TRANSCATION_ID,tid)
-        pinpointPy.add_clue(PP_SPAN_ID,sid)
-        pinpointPy.set_context_key(PP_TRANSCATION_ID, tid)
-        pinpointPy.set_context_key(PP_SPAN_ID, sid)
-        ###############################################################
-        return args, kwargs
-
-    def onEnd(self,ret):
-        ###############################################################
-
-        ###############################################################
-        super(BaseHTTPRequestPlugins,self).onEnd(ret)
-        return ret
-
-
-
diff --git a/plugins/PY2.7/pinpoint/BaseHTTPRequestHandler/__init__.py b/plugins/PY2.7/pinpoint/BaseHTTPRequestHandler/__init__.py
deleted file mode 100644
index 1f95abbb5..000000000
--- a/plugins/PY2.7/pinpoint/BaseHTTPRequestHandler/__init__.py
+++ /dev/null
@@ -1,16 +0,0 @@
-# ******************************************************************************
-#   Copyright  2020. NAVER Corp.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# ******************************************************************************
-
diff --git a/plugins/PY2.7/pinpoint/CinderApi/CinderRequestPlugin.py b/plugins/PY2.7/pinpoint/CinderApi/CinderRequestPlugin.py
deleted file mode 100644
index 498dcf600..000000000
--- a/plugins/PY2.7/pinpoint/CinderApi/CinderRequestPlugin.py
+++ /dev/null
@@ -1,139 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-
-# ------------------------------------------------------------------------------
-#  Copyright  2020. NAVER Corp.                                                -
-#                                                                              -
-#  Licensed under the Apache License, Version 2.0 (the "License");             -
-#  you may not use this file except in compliance with the License.            -
-#  You may obtain a copy of the License at                                     -
-#                                                                              -
-#   http://www.apache.org/licenses/LICENSE-2.0                                 -
-#                                                                              -
-#  Unless required by applicable law or agreed to in writing, software         -
-#  distributed under the License is distributed on an "AS IS" BASIS,           -
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    -
-#  See the License for the specific language governing permissions and         -
-#  limitations under the License.                                              -
-# ------------------------------------------------------------------------------
-
-# Created by eeliu at 3/5/20
-
-import sys,os
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-print sys.path
-import pinpointPy
-from common import *
-from settings import *
-
-class CinderRequestPlugin(Candy):
-    def __init__(self, name):
-        super(CinderRequestPlugin,self).__init__(name)
-
-    def onBefore(self,*args, **kwargs):
-        super(CinderRequestPlugin,self).onBefore(*args, **kwargs)
-        request = args[1]
-        pinpointPy.add_clue(PP_APP_NAME,APP_NAME)
-        pinpointPy.add_clue(PP_APP_ID, APP_ID)
-        ###############################################################
-        # print("------------------- call before -----------------------")
-        pinpointPy.add_clue(PP_INTERCEPTOR_NAME, 'cinder api')
-        pinpointPy.add_clue(PP_REQ_URI, request.path)
-        pinpointPy.add_clue(PP_REQ_CLIENT,request.remote_addr)
-        pinpointPy.add_clue(PP_REQ_SERVER, request.host)
-        pinpointPy.add_clue(PP_SERVER_TYPE, PYTHON)
-
-        # nginx add http
-        if PP_HTTP_PINPOINT_PSPANID in request.headers:
-            pinpointPy.add_clue(PP_PARENT_SPAN_ID, request.headers[PP_HTTP_PINPOINT_PSPANID])
-            print("PINPOINT_PSPANID:", request.headers[PP_HTTP_PINPOINT_PSPANID])
-
-        if PP_HTTP_PINPOINT_SPANID in request.headers:
-            self.sid = request.headers[PP_HTTP_PINPOINT_SPANID]
-        elif PP_HEADER_PINPOINT_SPANID in request.headers:
-            self.sid = request.headers[PP_HEADER_PINPOINT_SPANID]
-        else:
-            self.sid = generateSid()
-        pinpointPy.set_context_key(PP_SPAN_ID,self.sid)
-
-
-        if PP_HTTP_PINPOINT_TRACEID in request.headers:
-            self.tid = request.headers[PP_HTTP_PINPOINT_TRACEID]
-        elif PP_HEADER_PINPOINT_TRACEID in request.headers:
-            self.tid = request.headers[PP_HEADER_PINPOINT_TRACEID]
-        else:
-            self.tid = generateTid()
-        pinpointPy.set_context_key(PP_TRANSCATION_ID,self.tid)
-
-        if PP_HTTP_PINPOINT_PAPPNAME in request.headers:
-            self.pname = request.headers[PP_HTTP_PINPOINT_PAPPNAME]
-            pinpointPy.set_context_key(PP_PARENT_NAME,self.pname)
-            pinpointPy.add_clue(PP_PARENT_NAME,self.pname)
-
-        if PP_HTTP_PINPOINT_PAPPTYPE in request.headers:
-            self.ptype = request.headers[PP_HTTP_PINPOINT_PAPPTYPE]
-            pinpointPy.set_context_key(PP_PARENT_TYPE,self.ptype)
-            pinpointPy.add_clue(PP_PARENT_TYPE,self.ptype)
-
-        if PP_HTTP_PINPOINT_HOST in request.headers:
-            self.Ah = request.headers[PP_HTTP_PINPOINT_HOST]
-            pinpointPy.set_context_key(PP_PARENT_HOST,self.Ah)
-            pinpointPy.add_clue(PP_PARENT_HOST,self.Ah)
-
-        # Not nginx, no http
-        if PP_HEADER_PINPOINT_PSPANID in request.headers:
-            pinpointPy.add_clue(PP_PARENT_SPAN_ID, request.headers[PP_HEADER_PINPOINT_PSPANID])
-            # print("PINPOINT_PSPANID:", request.headers[PP_HEADER_PINPOINT_PSPANID])
-
-        if PP_HEADER_PINPOINT_PAPPNAME in request.headers:
-            self.pname = request.headers[PP_HEADER_PINPOINT_PAPPNAME]
-            pinpointPy.set_context_key(PP_PARENT_NAME, self.pname)
-            pinpointPy.add_clue(PP_PARENT_NAME, self.pname)
-
-        if PP_HEADER_PINPOINT_PAPPTYPE in request.headers:
-            self.ptype = request.headers[PP_HEADER_PINPOINT_PAPPTYPE]
-            pinpointPy.set_context_key(PP_PARENT_TYPE, self.ptype)
-            pinpointPy.add_clue(PP_PARENT_TYPE, self.ptype)
-
-        if PP_HEADER_PINPOINT_HOST in request.headers:
-            self.Ah = request.headers[PP_HEADER_PINPOINT_HOST]
-            pinpointPy.set_context_key(PP_PARENT_HOST, self.Ah)
-            pinpointPy.add_clue(PP_PARENT_HOST, self.Ah)
-        
-        if PP_NGINX_PROXY in request.headers:
-            pinpointPy.add_clue(PP_NGINX_PROXY, request.headers[PP_NGINX_PROXY])
-        
-        if PP_APACHE_PROXY in request.headers:
-            pinpointPy.add_clue(PP_APACHE_PROXY, request.headers[PP_APACHE_PROXY])
-
-        pinpointPy.set_context_key("Pinpoint-Sampled","s1")
-        if (PP_HTTP_SAMPLED in request.headers and request.headers[PP_HTTP_SAMPLED] ==  PP_NOT_SAMPLED) or pinpointPy.check_tracelimit():
-            if request.headers[PP_HTTP_SAMPLED] == PP_NOT_SAMPLED:
-                pinpointPy.drop_trace()
-                pinpointPy.set_context_key("Pinpoint-Sampled", "s0")
-
-        pinpointPy.add_clue(PP_TRANSCATION_ID,self.tid)
-        pinpointPy.add_clue(PP_SPAN_ID,self.sid)
-        pinpointPy.set_context_key(PP_TRANSCATION_ID, self.tid)
-        pinpointPy.set_context_key(PP_SPAN_ID, self.sid)
-        ###############################################################
-        return args, kwargs
-
-    def onEnd(self,ret):
-        ###############################################################
-        if ret:
-            response = ret
-            pinpointPy.add_clues(PP_HTTP_STATUS_CODE,str(response.status_code))
-            if response.status_code >400 :
-                pinpointPy.add_clue(PP_ADD_EXCEPTION,"status_code is %d"%(response.status_code))
-
-        ###############################################################
-        super(CinderRequestPlugin,self).onEnd(ret)
-        return ret
-
-    def onException(self, e):
-        pinpointPy.mark_as_error(str(e),"",0)
-        raise e
-
-from libs import monkey_patch_for_pinpoint
-monkey_patch_for_pinpoint()
\ No newline at end of file
diff --git a/plugins/PY2.7/pinpoint/CinderApi/RequestPlugins.py b/plugins/PY2.7/pinpoint/CinderApi/RequestPlugins.py
deleted file mode 100644
index 2726d2ebf..000000000
--- a/plugins/PY2.7/pinpoint/CinderApi/RequestPlugins.py
+++ /dev/null
@@ -1,138 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-
-# ------------------------------------------------------------------------------
-#  Copyright  2020. NAVER Corp.                                                -
-#                                                                              -
-#  Licensed under the Apache License, Version 2.0 (the "License");             -
-#  you may not use this file except in compliance with the License.            -
-#  You may obtain a copy of the License at                                     -
-#                                                                              -
-#   http://www.apache.org/licenses/LICENSE-2.0                                 -
-#                                                                              -
-#  Unless required by applicable law or agreed to in writing, software         -
-#  distributed under the License is distributed on an "AS IS" BASIS,           -
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    -
-#  See the License for the specific language governing permissions and         -
-#  limitations under the License.                                              -
-# ------------------------------------------------------------------------------
-
-# Created by eeliu at 3/5/20
-
-
-
-import pinpointPy
-
-from pinpoint.common import *
-
-from pinpoint.libs import *
-monkey_patch_for_pinpoint()
-
-from pinpoint.settings import *
-
-class RequestPlugin(Candy):
-    def __init__(self, name):
-        super().__init__(name)
-        self.isLimit = False
-
-    def onBefore(self,*args, **kwargs):
-        super().onBefore(*args, **kwargs)
-        request = args[1]
-        pinpointPy.add_clue(PP_APP_NAME,APP_NAME)
-        pinpointPy.add_clue(PP_APP_ID, APP_ID)
-        ###############################################################
-        # print("------------------- call before -----------------------")
-        pinpointPy.add_clue(PP_INTERCEPTOR_NAME, 'BaseFlaskrequest')
-        pinpointPy.add_clue(PP_REQ_URI, request.path)
-        pinpointPy.add_clue(PP_REQ_CLIENT,request.remote_addr)
-        pinpointPy.add_clue(PP_REQ_SERVER, request.host)
-        pinpointPy.add_clue(PP_SERVER_TYPE, PYTHON)
-
-        # nginx add http
-        if PP_HTTP_PINPOINT_PSPANID in request.headers:
-            pinpointPy.add_clue(PP_PARENT_SPAN_ID, request.headers[PP_HTTP_PINPOINT_PSPANID])
-            print("PINPOINT_PSPANID:", request.headers[PP_HTTP_PINPOINT_PSPANID])
-
-        if PP_HTTP_PINPOINT_SPANID in request.headers:
-            self.sid = request.headers[PP_HTTP_PINPOINT_SPANID]
-        elif PP_HEADER_PINPOINT_SPANID in request.headers:
-            self.sid = request.headers[PP_HEADER_PINPOINT_SPANID]
-        else:
-            self.sid = generateSid()
-        pinpointPy.set_context_key(PP_SPAN_ID,self.sid)
-
-
-        if PP_HTTP_PINPOINT_TRACEID in request.headers:
-            self.tid = request.headers[PP_HTTP_PINPOINT_TRACEID]
-        elif PP_HEADER_PINPOINT_TRACEID in request.headers:
-            self.tid = request.headers[PP_HEADER_PINPOINT_TRACEID]
-        else:
-            self.tid = generateTid()
-        pinpointPy.set_context_key(PP_TRANSCATION_ID,self.tid)
-
-        if PP_HTTP_PINPOINT_PAPPNAME in request.headers:
-            self.pname = request.headers[PP_HTTP_PINPOINT_PAPPNAME]
-            pinpointPy.set_context_key(PP_PARENT_NAME,self.pname)
-            pinpointPy.add_clue(PP_PARENT_NAME,self.pname)
-
-        if PP_HTTP_PINPOINT_PAPPTYPE in request.headers:
-            self.ptype = request.headers[PP_HTTP_PINPOINT_PAPPTYPE]
-            pinpointPy.set_context_key(PP_PARENT_TYPE,self.ptype)
-            pinpointPy.add_clue(PP_PARENT_TYPE,self.ptype)
-
-        if PP_HTTP_PINPOINT_HOST in request.headers:
-            self.Ah = request.headers[PP_HTTP_PINPOINT_HOST]
-            pinpointPy.set_context_key(PP_PARENT_HOST,self.Ah)
-            pinpointPy.add_clue(PP_PARENT_HOST,self.Ah)
-
-        # Not nginx, no http
-        if PP_HEADER_PINPOINT_PSPANID in request.headers:
-            pinpointPy.add_clue(PP_PARENT_SPAN_ID, request.headers[PP_HEADER_PINPOINT_PSPANID])
-            # print("PINPOINT_PSPANID:", request.headers[PP_HEADER_PINPOINT_PSPANID])
-
-        if PP_HEADER_PINPOINT_PAPPNAME in request.headers:
-            self.pname = request.headers[PP_HEADER_PINPOINT_PAPPNAME]
-            pinpointPy.set_context_key(PP_PARENT_NAME, self.pname)
-            pinpointPy.add_clue(PP_PARENT_NAME, self.pname)
-
-        if PP_HEADER_PINPOINT_PAPPTYPE in request.headers:
-            self.ptype = request.headers[PP_HEADER_PINPOINT_PAPPTYPE]
-            pinpointPy.set_context_key(PP_PARENT_TYPE, self.ptype)
-            pinpointPy.add_clue(PP_PARENT_TYPE, self.ptype)
-
-        if PP_HEADER_PINPOINT_HOST in request.headers:
-            self.Ah = request.headers[PP_HEADER_PINPOINT_HOST]
-            pinpointPy.set_context_key(PP_PARENT_HOST, self.Ah)
-            pinpointPy.add_clue(PP_PARENT_HOST, self.Ah)
-        
-        if PP_NGINX_PROXY in request.headers:
-            pinpointPy.add_clue(PP_NGINX_PROXY, request.headers[PP_NGINX_PROXY])
-        
-        if PP_APACHE_PROXY in request.headers:
-            pinpointPy.add_clue(PP_APACHE_PROXY, request.headers[PP_APACHE_PROXY])
-
-        if PP_HTTP_SAMPLED in request.headers:
-            if request.headers[PP_HTTP_SAMPLED] == PP_NOT_SAMPLED:
-                self.isLimit = True
-                pinpointPy.drop_trace()
-        else:
-            pinpointPy.check_tracelimit()
-            # print(self.isLimit)
-        pinpointPy.add_clue(PP_TRANSCATION_ID,self.tid)
-        pinpointPy.add_clue(PP_SPAN_ID,self.sid)
-        ###############################################################
-        return args, kwargs
-
-    def onEnd(self,ret):
-        ###############################################################
-
-
-
-        ###############################################################
-        super().onEnd(ret)
-        self.isLimit = False
-        return ret
-
-    def onException(self, e):
-        pinpointPy.mark_as_error(str(e),"",0)
-        raise e
diff --git a/plugins/PY2.7/pinpoint/CinderApi/__init__.py b/plugins/PY2.7/pinpoint/CinderApi/__init__.py
deleted file mode 100644
index 1f95abbb5..000000000
--- a/plugins/PY2.7/pinpoint/CinderApi/__init__.py
+++ /dev/null
@@ -1,16 +0,0 @@
-# ******************************************************************************
-#   Copyright  2020. NAVER Corp.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# ******************************************************************************
-
diff --git a/plugins/PY2.7/pinpoint/CinderApi/pinpoint.py b/plugins/PY2.7/pinpoint/CinderApi/pinpoint.py
deleted file mode 100644
index fcb6399f1..000000000
--- a/plugins/PY2.7/pinpoint/CinderApi/pinpoint.py
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-# Created by eeliu at 12/1/20
-
-# ******************************************************************************
-#   Copyright  2020. NAVER Corp.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# ******************************************************************************
-
-from oslo_log import log as logging
-import six
-import webob.dec
-import webob.exc
-
-from cinder.api.openstack import wsgi
-from cinder import exception
-from cinder.i18n import _, _LE, _LI
-from cinder import utils
-from cinder.wsgi import common as base_wsgi
-import pinpointPy
-from CinderRequestPlugin import CinderRequestPlugin
-
-LOG = logging.getLogger(__name__)
-
-
-class ProfileWrapper(base_wsgi.Middleware):
-    
-    @webob.dec.wsgify(RequestClass=wsgi.Request)
-    def __call__(self, req):
-        response = None
-        try:
-            plugin = CinderRequestPlugin("cinder filter")
-            plugin.onBefore(self,req)
-            response = req.get_response(self.application)
-        except Exception as e: 
-            response = None
-            plugin.onException(e)
-        finally:
-            plugin.onEnd(response)
-        return response
\ No newline at end of file
diff --git a/plugins/PY2.7/pinpoint/HTTPRequestPlugin.py b/plugins/PY2.7/pinpoint/HTTPRequestPlugin.py
deleted file mode 100644
index 2aa82cd2a..000000000
--- a/plugins/PY2.7/pinpoint/HTTPRequestPlugin.py
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-# Created by eeliu at 3/5/20
-
-# ------------------------------------------------------------------------------
-#  Copyright  2020. NAVER Corp.
-#
-#  Licensed under the Apache License, Version 2.0 (the "License");
-#  you may not use this file except in compliance with the License.
-#  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing, software
-#  distributed under the License is distributed on an "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  See the License for the specific language governing permissions and
-#  limitations under the License.
-# ------------------------------------------------------------------------------
-
-
-from BaseHTTPRequestHandler.BaseHTTPRequestPlugins import BaseHTTPRequestPlugins
diff --git a/plugins/PY2.7/pinpoint/__init__.py b/plugins/PY2.7/pinpoint/__init__.py
deleted file mode 100644
index c05a307e0..000000000
--- a/plugins/PY2.7/pinpoint/__init__.py
+++ /dev/null
@@ -1,19 +0,0 @@
-# ******************************************************************************
-#   Copyright  2020. NAVER Corp.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# ******************************************************************************
-
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-# Created by eeliu at 12/2/20
\ No newline at end of file
diff --git a/plugins/PY2.7/pinpoint/common/Common.py b/plugins/PY2.7/pinpoint/common/Common.py
deleted file mode 100644
index 41e8a9b00..000000000
--- a/plugins/PY2.7/pinpoint/common/Common.py
+++ /dev/null
@@ -1,52 +0,0 @@
-﻿# ******************************************************************************
-#   Copyright  2020. NAVER Corp.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# ******************************************************************************
-
-import random
-import pinpointPy
-from pinpoint.common.Defines import *
-from pinpoint.settings import *
-
-class Candy(object):
-    def __init__(self,name):
-        self.name = name
-
-    def onBefore(self,*args, **kwargs):
-        pinpointPy.start_trace()
-
-    def onEnd(self,ret):
-        pinpointPy.end_trace()
-
-    def onException(self,e):
-        pinpointPy.add_clue(PP_ADD_EXCEPTION, str(e))
-
-    def __call__(self, func):
-        self.func_name=func.__name__
-        def pinpointTrace(*args, **kwargs):
-            ret = None
-            self.onBefore(*args, **kwargs)
-            try:
-                ret = func(*args, **kwargs)
-                return ret
-            except Exception as e:
-                self.onException(e)
-                raise e
-            finally:
-                self.onEnd(ret)
-
-        return pinpointTrace
-
-    def getFuncUniqueName(self):
-        return self.name
\ No newline at end of file
diff --git a/plugins/PY2.7/pinpoint/common/CommonPlugin.py b/plugins/PY2.7/pinpoint/common/CommonPlugin.py
deleted file mode 100644
index 60178e908..000000000
--- a/plugins/PY2.7/pinpoint/common/CommonPlugin.py
+++ /dev/null
@@ -1,55 +0,0 @@
-﻿# ------------------------------------------------------------------------------
-#  Copyright  2020. NAVER Corp.
-#
-#  Licensed under the Apache License, Version 2.0 (the "License");
-#  you may not use this file except in compliance with the License.
-#  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing, software
-#  distributed under the License is distributed on an "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  See the License for the specific language governing permissions and
-#  limitations under the License.
-# ------------------------------------------------------------------------------
-
-import pinpointPy
-import threading
-from Defines import *
-from Common import Candy
-class PinpointCommonPlugin(Candy):
-
-    def onBefore(self,*args, **kwargs):
-        args, kwargs = super(PinpointCommonPlugin,self).onBefore(*args, **kwargs)
-        ###############################################################
-        pinpointPy.add_clue(PP_INTERCEPTOR_NAME,self.getFuncUniqueName())
-        pinpointPy.add_clue(PP_SERVER_TYPE,PP_METHOD_CALL)
-        arg = self.get_arg(*args, **kwargs)
-        pinpointPy.add_clues(PP_ARGS, arg)
-        ###############################################################
-        # print( threading.currentThread().ident)
-        return args,kwargs
-
-    def onEnd(self,ret):
-        ###############################################################
-        pinpointPy.add_clues(PP_RETURN,str(ret))
-        ###############################################################
-        super(PinpointCommonPlugin,self).onEnd(ret)
-        return ret
-
-    def onException(self, e):
-        pinpointPy.add_clue('EXP',str(e))
-
-    def get_arg(self, *args, **kwargs):
-        args_tmp = {}
-        j = 0
-
-        for i in args:
-            args_tmp["arg["+str(j)+"]"] = (str(i))
-            j += 1
-
-        for k in kwargs:
-            args_tmp[k] = kwargs[k]
-
-        return str(args_tmp)
diff --git a/plugins/PY2.7/pinpoint/common/Defines.py b/plugins/PY2.7/pinpoint/common/Defines.py
deleted file mode 100644
index aa6525dea..000000000
--- a/plugins/PY2.7/pinpoint/common/Defines.py
+++ /dev/null
@@ -1,94 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-# Created by eeliu at 7/31/20
-
-# ------------------------------------------------------------------------------
-#  Copyright  2020. NAVER Corp.                                                -
-#                                                                              -
-#  Licensed under the Apache License, Version 2.0 (the "License");             -
-#  you may not use this file except in compliance with the License.            -
-#  You may obtain a copy of the License at                                     -
-#                                                                              -
-#   http://www.apache.org/licenses/LICENSE-2.0                                 -
-#                                                                              -
-#  Unless required by applicable law or agreed to in writing, software         -
-#  distributed under the License is distributed on an "AS IS" BASIS,           -
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    -
-#  See the License for the specific language governing permissions and         -
-#  limitations under the License.                                              -
-# ------------------------------------------------------------------------------
-
-
-PP_HTTP_PINPOINT_PSPANID = 'HTTP_PINPOINT_PSPANID'
-PP_HTTP_PINPOINT_SPANID = 'HTTP_PINPOINT_SPANID'
-PP_HTTP_PINPOINT_TRACEID = 'HTTP_PINPOINT_TRACEID'
-PP_HTTP_PINPOINT_PAPPNAME = 'HTTP_PINPOINT_PAPPNAME'
-PP_HTTP_PINPOINT_PAPPTYPE = 'HTTP_PINPOINT_PAPPTYPE'
-PP_HTTP_PINPOINT_HOST = 'HTTP_PINPOINT_HOST'
-
-PP_HEADER_PINPOINT_PSPANID = 'Pinpoint-Pspanid'
-PP_HEADER_PINPOINT_SPANID = 'Pinpoint-Spanid'
-PP_HEADER_PINPOINT_TRACEID = 'Pinpoint-Traceid'
-PP_HEADER_PINPOINT_PAPPNAME = 'Pinpoint-Pappname'
-PP_HEADER_PINPOINT_PAPPTYPE = 'Pinpoint-Papptype'
-PP_HEADER_PINPOINT_HOST = 'Pinpoint-Host'
-
-PP_HEADER_NGINX_PROXY = 'Pinpoint-ProxyNginx'
-PP_HTTP_NGINX_PROXY = 'HTTP_Pinpoint-ProxyNginx'
-PP_HEADER_APACHE_PROXY = 'PINPOINT_PROXYAPACHE'
-PP_HTTP_APACHE_PROXY = 'HTTP_PINPOINT_PROXYAPACHE'
-
-PP_DESTINATION='dst'
-PP_HTTP_SAMPLED = 'HTTP_PINPOINT_SAMPLED'
-PP_INTERCEPTOR_NAME='name'
-PP_APP_NAME='appname'
-PP_APP_ID='appid'
-PP_REQ_URI='uri'
-PP_REQ_CLIENT='client'
-PP_REQ_SERVER='server'
-PP_SERVER_TYPE='stp'
-PP_PARENT_SPAN_ID='psid'
-
-PP_PARENT_NAME='pname'
-
-PP_PARENT_TYPE='ptype'
-PP_PARENT_HOST='Ah'
-PP_NGINX_PROXY='NP'
-PP_APACHE_PROXY='AP'
-PP_TRANSCATION_ID='tid'
-PP_SPAN_ID='sid'
-PP_NOT_SAMPLED='s0'
-PP_SAMPLED='s1'
-PP_NEXT_SPAN_ID='nsid'
-PP_ADD_EXCEPTION='EXP'
-
-
-PP_SQL_FORMAT='SQL'
-PP_ARGS='-1'
-PP_RETURN='14'
-PYTHON = '1700'
-PP_METHOD_CALL= '1701'
-PP_REMOTE_METHOD = '9900'
-
-PP_HTTP_URL= '40'
-PP_HTTP_PARAM= '41'
-PP_HTTP_PARAM_ENTITY= '42'
-PP_HTTP_COOKIE= '45'
-PP_HTTP_STATUS_CODE= '46'
-PP_HTTP_INTERNAL_DISPLAY=48
-PP_HTTP_IO=49
-PP_MESSAGE_QUEUE_URI=100
-
-
-PP_MYSQL= '2101'
-PP_REDIS= '8200'
-PP_REDIS_REDISSON= '8203'
-PP_REDIS_REDISSON_INTERNAL= '8204'
-PP_POSTGRESQL='2501'
-PP_MEMCACHED= '8050'
-PP_MEMCACHED_FUTURE_GET='8051'
-PP_MONGDB_EXE_QUERY= '2651'
-PP_KAFKA='8660'
-PP_KAFKA_TOPIC='140'
-PP_RABBITMQ_CLIENT='8300'
-PP_RABBITMQ_ROUTINGKEY='131'
diff --git a/plugins/PY2.7/pinpoint/common/Interceptor.py b/plugins/PY2.7/pinpoint/common/Interceptor.py
deleted file mode 100644
index b7da231d4..000000000
--- a/plugins/PY2.7/pinpoint/common/Interceptor.py
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-# Created by eeliu at 8/20/20
-
-# ******************************************************************************
-#   Copyright  2020. NAVER Corp.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# ******************************************************************************
-
-class Interceptor:
-    def __init__(self, scope, point, handle):
-        assert isinstance(point,str)
-        self.full_name = scope.__module__+'.'+point
-        self.point = point
-        # new a handle and bind on full_name
-        self.handle = handle(self.full_name)
-        self.scope = scope
-        self.origin_point = getattr(scope,point)
-
-    def enable(self):
-        assert callable(self.handle)
-        setattr(self.scope, self.point, self.handle(self.origin_point))
-
-    def disable(self):
-        setattr(self.scope, self.point, self.origin_point)
\ No newline at end of file
diff --git a/plugins/PY2.7/pinpoint/common/PinpointCommon.py b/plugins/PY2.7/pinpoint/common/PinpointCommon.py
deleted file mode 100644
index 7e3acdcce..000000000
--- a/plugins/PY2.7/pinpoint/common/PinpointCommon.py
+++ /dev/null
@@ -1,64 +0,0 @@
-﻿# ******************************************************************************
-#   Copyright  2020. NAVER Corp.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# ******************************************************************************
-
-import random
-import pinpointPy
-from .Defines import *
-from ..settings import *
-
-class Candy(object):
-    def __init__(self,class_name,module_name):
-        self.class_name = class_name
-        self.module_name = module_name
-
-
-    def onBefore(self,*args, **kwargs):
-        pinpointPy.start_trace()
-        return (args,kwargs)
-
-    def onEnd(self,ret):
-        pinpointPy.end_trace()
-
-    def onException(self,e):
-        raise NotImplementedError()
-
-    def __call__(self, func):
-        self.func_name=func.__name__
-        def pinpointTrace(*args, **kwargs):
-            ret = None
-            args, kwargs = self.onBefore(*args, **kwargs)
-            try:
-                ret = func(*args, **kwargs)
-                return ret
-            except Exception as e:
-                self.onException(e)
-                raise e
-            finally:
-                self.onEnd(ret)
-
-        return pinpointTrace
-
-    def generateTid(self):
-        return ('%s^%s^%s') % (APP_ID,str(pinpointPy.start_time()), str(pinpointPy.unique_id()))
-
-    def generateSid(self):
-        return str(random.randint(0,2147483647))
-
-    def getFuncUniqueName(self):
-        if self.class_name:
-            return '%s\%s.%s'%(self.module_name,self.class_name,self.func_name)
-        else:
-            return '%s\%s'%(self.module_name,self.func_name)
\ No newline at end of file
diff --git a/plugins/PY2.7/pinpoint/common/PinpointDefine.py b/plugins/PY2.7/pinpoint/common/PinpointDefine.py
deleted file mode 100644
index a47321f88..000000000
--- a/plugins/PY2.7/pinpoint/common/PinpointDefine.py
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-# Created by eeliu at 7/31/20
-
-# ------------------------------------------------------------------------------
-#  Copyright  2020. NAVER Corp.
-#
-#  Licensed under the Apache License, Version 2.0 (the "License");
-#  you may not use this file except in compliance with the License.
-#  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing, software
-#  distributed under the License is distributed on an "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  See the License for the specific language governing permissions and
-#  limitations under the License.
-# ------------------------------------------------------------------------------
-
-HTTP_PINPOINT_PSPANID = 'HTTP_PINPOINT_PSPANID'
-HTTP_PINPOINT_SPANID = 'HTTP_PINPOINT_SPANID'
-HTTP_PINPOINT_TRACEID = 'HTTP_PINPOINT_TRACEID'
-HTTP_PINPOINT_PAPPNAME = 'HTTP_PINPOINT_PAPPNAME'
-HTTP_PINPOINT_PAPPTYPE = 'HTTP_PINPOINT_PAPPTYPE'
-HTTP_PINPOINT_HOST = 'HTTP_PINPOINT_HOST'
-
-PINPOINT_PSPANID = 'Pinpoint-Pspanid'
-PINPOINT_SPANID = 'Pinpoint-Spanid'
-PINPOINT_TRACEID = 'Pinpoint-Traceid'
-PINPOINT_PAPPNAME ='Pinpoint-Pappname'
-PINPOINT_PAPPTYPE ='Pinpoint-Papptype'
-PINPOINT_HOST = 'Pinpoint-Host'
-
-NGINX_PROXY = 'Pinpoint-ProxyNginx'
-HTTP_NGINX_PROXY = 'HTTP_Pinpoint-ProxyNginx'
-APACHE_PROXY = 'PINPOINT_PROXYAPACHE'
-HTTP_APACHE_PROXY = 'HTTP_PINPOINT_PROXYAPACHE'
-DESTINATION='dst'
-SAMPLED = 'Pinpoint-Sampled'
-HTTPD_SAMPLED = 'HTTP_PINPOINT_SAMPLED'
-ServerType='stp'
-FuncName='name'
-SQL_STR='SQL'
-PY_ARGS= '-1'
-PY_RETURN='14'
-PYTHON = '1700'
-PYTHON_METHOD_CALL='1701'
-PYTHON_REMOTE_METHOD = '9900'
-
-HTTP_URL='40'
-HTTP_PARAM='41'
-HTTP_PARAM_ENTITY='42'
-HTTP_COOKIE='45'
-HTTP_STATUS_CODE='46'
-HTTP_INTERNAL_DISPLAY=48
-HTTP_IO=49
-MESSAGE_QUEUE_URI=100
-
-
-MYSQL='2101'
-REDIS='8200'
-REDIS_REDISSON='8203'
-REDIS_REDISSON_INTERNAL='8204'
-MEMCACHED='8050'
-MONGDB_EXE_QUERY='2651'
\ No newline at end of file
diff --git a/plugins/PY2.7/pinpoint/common/Span.py b/plugins/PY2.7/pinpoint/common/Span.py
deleted file mode 100644
index 3db1b56df..000000000
--- a/plugins/PY2.7/pinpoint/common/Span.py
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-# Created by eeliu at 8/20/20
-
-# ******************************************************************************
-#   Copyright  2020. NAVER Corp.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# ******************************************************************************
-
-from urlparse import urlparse
-from settings import *
-from .Defines import *
-import random
-import pinpointPy
-
-tid = None
-nsid = None
-sid = None
-
-def generateTid():
-    global tid
-    tid = ('%s^%s^%s') % (APP_ID, str(pinpointPy.start_time()), str(pinpointPy.unique_id()))
-    return tid
-
-def generateSid():
-    global sid
-    sid = str(random.randint(0, 2147483647))
-    return sid
-
-def generateNextSid():
-    global nsid
-    nsid = str(random.randint(0, 2147483647))
-    return nsid
-
-def generatePinpointHeader(url, headers):
-
-    if pinpointPy.check_tracelimit():
-        headers[PP_HTTP_SAMPLED] = PP_NOT_SAMPLED
-        return
-    else:
-        headers[PP_HTTP_SAMPLED] = PP_SAMPLED
-    headers[PP_HEADER_PINPOINT_PAPPTYPE] = PYTHON
-    headers[PP_HEADER_PINPOINT_PAPPNAME] = APP_NAME
-    headers['Pinpoint-Flags'] = "0"
-    headers[PP_HEADER_PINPOINT_HOST] =  urlparse(url)['netloc']
-    headers[PP_HEADER_PINPOINT_TRACEID] = pinpointPy.get_context_key(PP_TRANSCATION_ID)
-    headers[PP_HEADER_PINPOINT_PSPANID] = pinpointPy.get_context_key(PP_SPAN_ID)
-    nsid = generateSid()
-    pinpointPy.set_context_key(PP_NEXT_SPAN_ID, nsid)
-    headers[PP_HEADER_PINPOINT_SPANID] = nsid
diff --git a/plugins/PY2.7/pinpoint/common/Utils.py b/plugins/PY2.7/pinpoint/common/Utils.py
deleted file mode 100644
index 730990952..000000000
--- a/plugins/PY2.7/pinpoint/common/Utils.py
+++ /dev/null
@@ -1,114 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-
-# ------------------------------------------------------------------------------
-#  Copyright  2020. NAVER Corp.                                                -
-#                                                                              -
-#  Licensed under the Apache License, Version 2.0 (the "License");             -
-#  you may not use this file except in compliance with the License.            -
-#  You may obtain a copy of the License at                                     -
-#                                                                              -
-#   http://www.apache.org/licenses/LICENSE-2.0                                 -
-#                                                                              -
-#  Unless required by applicable law or agreed to in writing, software         -
-#  distributed under the License is distributed on an "AS IS" BASIS,           -
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    -
-#  See the License for the specific language governing permissions and         -
-#  limitations under the License.                                              -
-# ------------------------------------------------------------------------------
-
-# Created by eeliu at 11/10/20
-
-import pinpointPy
-from .Span import *
-
-def startPinpointByEnviron(environ):
-    pinpointPy.add_clue(PP_APP_NAME, APP_NAME)
-    pinpointPy.add_clue(PP_APP_ID, APP_ID)
-    ###############################################################
-    # print("------------------- call before -----------------------")
-    pinpointPy.add_clue(PP_INTERCEPTOR_NAME, 'WSGI handle')
-
-    path,remote_addr,host = environ['PATH_INFO'],environ['REMOTE_ADDR'],environ['HTTP_HOST']
-
-    pinpointPy.add_clue(PP_REQ_URI, path)
-    pinpointPy.add_clue(PP_REQ_CLIENT, remote_addr)
-    pinpointPy.add_clue(PP_REQ_SERVER, host)
-    pinpointPy.add_clue(PP_SERVER_TYPE, PYTHON)
-
-    # nginx add http
-    if PP_HTTP_PINPOINT_PSPANID in environ:
-        pinpointPy.add_clue(PP_PARENT_SPAN_ID, environ[PP_HTTP_PINPOINT_PSPANID])
-
-    if PP_HTTP_PINPOINT_SPANID in environ:
-        sid = environ[PP_HTTP_PINPOINT_SPANID]
-    elif PP_HEADER_PINPOINT_SPANID in environ:
-        sid = environ[PP_HEADER_PINPOINT_SPANID]
-    else:
-        sid = generateSid()
-
-
-    if PP_HTTP_PINPOINT_TRACEID in environ:
-        tid = environ[PP_HTTP_PINPOINT_TRACEID]
-    elif PP_HEADER_PINPOINT_TRACEID in environ:
-        tid = environ[PP_HEADER_PINPOINT_TRACEID]
-    else:
-        tid = generateTid()
-
-
-    if PP_HTTP_PINPOINT_PAPPNAME in environ:
-        pname = environ[PP_HTTP_PINPOINT_PAPPNAME]
-        pinpointPy.set_context_key(PP_PARENT_NAME, pname)
-        pinpointPy.add_clue(PP_PARENT_NAME, pname)
-
-    if PP_HTTP_PINPOINT_PAPPTYPE in environ:
-        ptype = environ[PP_HTTP_PINPOINT_PAPPTYPE]
-        pinpointPy.set_context_key(PP_PARENT_TYPE, ptype)
-        pinpointPy.add_clue(PP_PARENT_TYPE, ptype)
-
-    if PP_HTTP_PINPOINT_HOST in environ:
-        Ah = environ[PP_HTTP_PINPOINT_HOST]
-        pinpointPy.set_context_key(PP_PARENT_HOST, Ah)
-        pinpointPy.add_clue(PP_PARENT_HOST, Ah)
-
-    # Not nginx, no http
-    if PP_HEADER_PINPOINT_PSPANID in environ:
-        pinpointPy.add_clue(PP_PARENT_SPAN_ID, environ[PP_HEADER_PINPOINT_PSPANID])
-        # print("PINPOINT_PSPANID:", environ[PP_HEADER_PINPOINT_PSPANID])
-
-    if PP_HEADER_PINPOINT_PAPPNAME in environ:
-        pname = environ[PP_HEADER_PINPOINT_PAPPNAME]
-        pinpointPy.set_context_key(PP_PARENT_NAME, pname)
-        pinpointPy.add_clue(PP_PARENT_NAME, pname)
-
-    if PP_HEADER_PINPOINT_PAPPTYPE in environ:
-        ptype = environ[PP_HEADER_PINPOINT_PAPPTYPE]
-        pinpointPy.set_context_key(PP_PARENT_TYPE, ptype)
-        pinpointPy.add_clue(PP_PARENT_TYPE, ptype)
-
-    if PP_HEADER_PINPOINT_HOST in environ:
-        Ah = environ[PP_HEADER_PINPOINT_HOST]
-        pinpointPy.set_context_key(PP_PARENT_HOST, Ah)
-        pinpointPy.add_clue(PP_PARENT_HOST, Ah)
-
-    if PP_NGINX_PROXY in environ:
-        pinpointPy.add_clue(PP_NGINX_PROXY, environ[PP_NGINX_PROXY])
-
-    if PP_APACHE_PROXY in environ:
-        pinpointPy.add_clue(PP_APACHE_PROXY, environ[PP_APACHE_PROXY])
-
-    pinpointPy.set_context_key("Pinpoint-Sampled","s1")
-    if (PP_HTTP_SAMPLED in environ and environ[PP_HTTP_SAMPLED] == PP_NOT_SAMPLED) or pinpointPy.check_tracelimit():
-        if environ[PP_HTTP_SAMPLED] == PP_NOT_SAMPLED:
-            pinpointPy.drop_trace()
-            pinpointPy.set_context_key("Pinpoint-Sampled", "s0")
-
-
-    pinpointPy.add_clue(PP_TRANSCATION_ID,tid)
-    pinpointPy.add_clue(PP_SPAN_ID, sid)
-    pinpointPy.set_context_key(PP_TRANSCATION_ID, tid)
-    pinpointPy.set_context_key(PP_SPAN_ID, sid)
-
-def endPinpointByEnviron(ret):
-    # for future use
-    pass
diff --git a/plugins/PY2.7/pinpoint/common/WSGIPlugin.py b/plugins/PY2.7/pinpoint/common/WSGIPlugin.py
deleted file mode 100644
index 197219c86..000000000
--- a/plugins/PY2.7/pinpoint/common/WSGIPlugin.py
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-
-# ------------------------------------------------------------------------------
-#  Copyright  2020. NAVER Corp.                                                -
-#                                                                              -
-#  Licensed under the Apache License, Version 2.0 (the "License");             -
-#  you may not use this file except in compliance with the License.            -
-#  You may obtain a copy of the License at                                     -
-#                                                                              -
-#   http://www.apache.org/licenses/LICENSE-2.0                                 -
-#                                                                              -
-#  Unless required by applicable law or agreed to in writing, software         -
-#  distributed under the License is distributed on an "AS IS" BASIS,           -
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    -
-#  See the License for the specific language governing permissions and         -
-#  limitations under the License.                                              -
-# ------------------------------------------------------------------------------
-
-# Created by eeliu at 11/9/20
-
-from .Utils import *
-from .Common import Candy
-
-class WSGIPlugin(Candy):
-    def __init__(self, name):
-        super().__init__(name)
-
-    def onBefore(self, *args, **kwargs):
-        super().onBefore(*args, **kwargs)
-        environ = args[0]
-        startPinpointByEnviron(environ)
-
-        return (args, kwargs)
-
-    def onEnd(self, ret):
-        endPinpointByEnviron(ret)
-        super().onEnd(ret)
-        return ret
-
-    def onException(self, e):
-        pinpointPy.mark_as_error(str(e),"",0)
\ No newline at end of file
diff --git a/plugins/PY2.7/pinpoint/common/__init__.py b/plugins/PY2.7/pinpoint/common/__init__.py
deleted file mode 100644
index 5a607977c..000000000
--- a/plugins/PY2.7/pinpoint/common/__init__.py
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-# Created by eeliu at 8/20/20
-
-
-# ******************************************************************************
-#   Copyright  2020. NAVER Corp.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# ******************************************************************************
-
-from Defines import *
-from Span import *
-from Interceptor import *
-from Utils import startPinpointByEnviron,endPinpointByEnviron
-from Common import Candy
-from CommonPlugin import PinpointCommonPlugin
diff --git a/plugins/PY2.7/pinpoint/libs/PyMysql/PyMysqlPlugin.py b/plugins/PY2.7/pinpoint/libs/PyMysql/PyMysqlPlugin.py
deleted file mode 100644
index 4b8b9cc80..000000000
--- a/plugins/PY2.7/pinpoint/libs/PyMysql/PyMysqlPlugin.py
+++ /dev/null
@@ -1,56 +0,0 @@
-﻿# ******************************************************************************
-#   Copyright  2020. NAVER Corp.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# ******************************************************************************
-
-
-from pinpoint.common import *
-import pinpointPy
-
-class PyMysqlPlugin(Candy):
-
-    def __init__(self,name):
-        super(PyMysqlPlugin,self).__init__(name)
-
-    def onBefore(self,*args, **kwargs):
-        super(PyMysqlPlugin,self).onBefore(*args, **kwargs)
-        ###############################################################
-        pinpointPy.add_clue(PP_INTERCEPTOR_NAME,self.getFuncUniqueName())
-        pinpointPy.add_clue(PP_SERVER_TYPE, PP_MYSQL)
-        pinpointPy.add_clue(PP_SQL_FORMAT,  args[1])
-        ###############################################################
-        cursor = args[0]
-        dst = cursor.connection.get_host_info()
-        pinpointPy.add_clue(PP_DESTINATION, dst)
-        return args,kwargs
-
-    def onEnd(self,ret):
-        super(PyMysqlPlugin,self).onEnd(ret)
-        return ret
-
-    def onException(self, e):
-        pinpointPy.add_clue(PP_ADD_EXCEPTION,str(e))
-
-    def get_arg(self, *args, **kwargs):
-        args_tmp = {}
-        j = 0
-
-        for i in args:
-            args_tmp["arg["+str(j)+"]"] = (str(i))
-            j += 1
-        # print(str(args_tmp))
-        for k in kwargs:
-            args_tmp[k] = kwargs[k]
-        # print(str(args_tmp))
-        return str(args_tmp)
diff --git a/plugins/PY2.7/pinpoint/libs/PyMysql/__init__.py b/plugins/PY2.7/pinpoint/libs/PyMysql/__init__.py
deleted file mode 100644
index d04252af9..000000000
--- a/plugins/PY2.7/pinpoint/libs/PyMysql/__init__.py
+++ /dev/null
@@ -1,49 +0,0 @@
-# ******************************************************************************
-#   Copyright  2020. NAVER Corp.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# ******************************************************************************
-
-from pinpoint.common import Interceptor
-
-
-def monkey_patch():
-    try:
-        import pymysql
-        from pymysql.cursors import Cursor
-        from .PyMysqlPlugin import PyMysqlPlugin
-
-        # HookSet = [
-        #     ('pymysql', 'connect', pymysql, pymysql.connect),
-        #     ('Cursor','execute', Cursor, Cursor.execute),
-        #     ('Cursor','fetchall', Cursor, Cursor.fetchall)
-        # ]
-        #
-        # for hook in HookSet:
-        #     new_Cursor = PyMysqlPlugin(hook[0], '')
-        #     setattr(hook[2],hook[1], new_Cursor(hook[3]))
-
-        Interceptors = [
-            # Interceptor(pymysql, 'connect', PyMysqlPlugin),
-            Interceptor(Cursor, 'execute', PyMysqlPlugin),
-            # Interceptor(Cursor, 'fetchall', PyMysqlPlugin)
-        ]
-        for interceptor in Interceptors:
-            interceptor.enable()
-
-
-    except ImportError as e:
-        # do nothing
-        print(e)
-
-__all__=['monkey_patch']
\ No newline at end of file
diff --git a/plugins/PY2.7/pinpoint/libs/__init__.py b/plugins/PY2.7/pinpoint/libs/__init__.py
deleted file mode 100644
index b224a8077..000000000
--- a/plugins/PY2.7/pinpoint/libs/__init__.py
+++ /dev/null
@@ -1,62 +0,0 @@
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# ******************************************************************************
-
-
-def monkey_patch_for_pinpoint(mongo=True,pymysql=True,pyredis=True,requests=True,urllib=True,
-                            sqlalchemy=True,aioHttp=False,amqp=True):
-    if pymysql:
-        from libs.PyMysql import monkey_patch
-        monkey_patch()
-
-    # if mongo:
-    #     from libs.pymongo import monkey_patch
-    #     monkey_patch()
-    
-    # if pyredis:
-    #     from libs.pyRedis import monkey_patch
-    #     monkey_patch()
-    
-    if requests:
-        from libs.requests import monkey_patch
-        monkey_patch()
-    
-    if sqlalchemy:
-        from libs.sqlalchemy import monkey_patch
-        monkey_patch()
-    
-    if urllib:
-        from libs.urllib import monkey_patch
-        monkey_patch()
-    if amqp:
-        from libs.amqp import monkey_patch
-        monkey_patch()
-
-
-# ******************************************************************************
-#   Copyright  2020. NAVER Corp.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# ******************************************************************************
-
-__all__=['monkey_patch_for_pinpoint']
\ No newline at end of file
diff --git a/plugins/PY2.7/pinpoint/libs/amqp/AmqpPlugin.py b/plugins/PY2.7/pinpoint/libs/amqp/AmqpPlugin.py
deleted file mode 100644
index 21f8ab02c..000000000
--- a/plugins/PY2.7/pinpoint/libs/amqp/AmqpPlugin.py
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-# Created by eeliu at 12/3/20
-
-# ******************************************************************************
-#   Copyright  2020. NAVER Corp.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# ******************************************************************************
-
-from pinpoint.common import *
-import pinpointPy
-
-class AmqpPlugin(Candy):
-    def __init__(self, name):
-        super(AmqpPlugin, self).__init__(name)
-
-    def onBefore(self, *args, **kwargs):
-        super(AmqpPlugin, self).onBefore(*args, **kwargs)
-        pinpointPy.add_clue(PP_INTERCEPTOR_NAME,self.getFuncUniqueName())
-        ###############################################################
-        channel =args[0]
-        host = channel.connection.client.host
-        pinpointPy.add_clue(PP_DESTINATION, host)
-        pinpointPy.add_clue(PP_SERVER_TYPE, PP_RABBITMQ_CLIENT)
-        pinpointPy.add_clues(PP_RABBITMQ_ROUTINGKEY,kwargs['routing_key'])
-        ###############################################################
-
-        return args, kwargs
-
-    def onEnd(self, ret):
-        super(AmqpPlugin, self).onEnd(ret)
-        return ret
diff --git a/plugins/PY2.7/pinpoint/libs/amqp/__init__.py b/plugins/PY2.7/pinpoint/libs/amqp/__init__.py
deleted file mode 100644
index 67de36edf..000000000
--- a/plugins/PY2.7/pinpoint/libs/amqp/__init__.py
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-# Created by eeliu at 12/3/20
-
-
-# ******************************************************************************
-#   Copyright  2020. NAVER Corp.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# ******************************************************************************
-
-def monkey_patch():
-    from pinpoint.common import Interceptor
-    try:
-        import amqp
-        from .AmqpPlugin import AmqpPlugin
-
-        Interceptors = [
-            Interceptor(amqp.Channel,'basic_publish_confirm', AmqpPlugin)
-        ]
-
-        for interceptor in Interceptors:
-            interceptor.enable()
-
-    except ImportError as e:
-        print(e)
-
-
-__all__=['monkey_patch']
\ No newline at end of file
diff --git a/plugins/PY2.7/pinpoint/libs/pyRedis/PyRedisPlugins.py b/plugins/PY2.7/pinpoint/libs/pyRedis/PyRedisPlugins.py
deleted file mode 100644
index cb37e9af1..000000000
--- a/plugins/PY2.7/pinpoint/libs/pyRedis/PyRedisPlugins.py
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-
-# Created by eeliu at 8/20/20
-
-
-# ******************************************************************************
-#   Copyright  2020. NAVER Corp.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# ******************************************************************************
-
-import pinpointPy
-
-from pinpoint.common import *
-
-
-class PyRedisPlugins(Candy):
-
-    def __init__(self,name):
-        super().__init__(name)
-        self.dst = ''
-
-    def onBefore(self,*args, **kwargs):
-        super().onBefore(*args, **kwargs)
-        ###############################################################
-        pinpointPy.add_clue(PP_INTERCEPTOR_NAME,self.getFuncUniqueName())
-        pinpointPy.add_clue(PP_SERVER_TYPE, PP_REDIS)
-        arg = self.get_arg(*args, **kwargs)
-        pinpointPy.add_clues(PP_ARGS, arg)
-        ###############################################################
-        if self.func_name == 'Redis':
-            if 'host' in kwargs:
-                self.dst = kwargs['host']+str(kwargs['port'])
-            elif 'unix_socket_path' in kwargs:
-                self.dst = kwargs['host'] + str(kwargs['port'])
-
-        pinpointPy.add_clue(PP_DESTINATION, self.dst)
-        return args,kwargs
-
-    def onEnd(self,ret):
-        ###############################################################
-        pinpointPy.add_clues(PP_RETURN,str(ret))
-        ###############################################################
-        super().onEnd(ret)
-        return ret
-
-    def onException(self, e):
-        pinpointPy.add_clue(PP_ADD_EXCEPTION,str(e))
-
-    def get_arg(self, *args, **kwargs):
-        args_tmp = {}
-        j = 0
-
-        for i in args:
-            args_tmp["arg["+str(j)+"]"] = (str(i))
-            j += 1
-        # print(str(args_tmp))
-        for k in kwargs:
-            args_tmp[k] = kwargs[k]
-        # print(str(args_tmp))
-        return str(args_tmp)
diff --git a/plugins/PY2.7/pinpoint/libs/pyRedis/__init__.py b/plugins/PY2.7/pinpoint/libs/pyRedis/__init__.py
deleted file mode 100644
index 4e7538801..000000000
--- a/plugins/PY2.7/pinpoint/libs/pyRedis/__init__.py
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-
-# Created by eeliu at 8/20/20
-
-# ******************************************************************************
-#   Copyright  2020. NAVER Corp.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# ******************************************************************************
-
-def monkey_patch():
-    from pinpoint.common import Interceptor
-    from .PyRedisPlugins import PyRedisPlugins
-    try:
-        import redis
-        Interceptors = [
-            Interceptor(redis, 'Redis', PyRedisPlugins),
-            Interceptor(redis.Redis, 'execute_command', PyRedisPlugins)
-        ]
-        for interceptor in Interceptors:
-            interceptor.enable()
-
-    except ImportError as e:
-        # do nothing
-        print(e)
-
-
-
-__all__=['monkey_patch']
\ No newline at end of file
diff --git a/plugins/PY2.7/pinpoint/libs/pymemcache/PymemcachePlugin.py b/plugins/PY2.7/pinpoint/libs/pymemcache/PymemcachePlugin.py
deleted file mode 100644
index e7a95630b..000000000
--- a/plugins/PY2.7/pinpoint/libs/pymemcache/PymemcachePlugin.py
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-# Created by eeliu at 12/3/20
-
-# ******************************************************************************
-#   Copyright  2020. NAVER Corp.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# ******************************************************************************
-
-from pinpoint.common import *
-import pinpointPy
-
-class PymemcachePlugin(Candy):
-    def __init__(self, name):
-        super(PymemcachePlugin, self).__init__(name)
-
-    def onBefore(self, *args, **kwargs):
-        super(PymemcachePlugin, self).onBefore(*args, **kwargs)
-        pinpointPy.add_clue(PP_INTERCEPTOR_NAME,self.getFuncUniqueName())
-        ###############################################################
-        client = args[0]
-        cmd = args[1]
-        pinpointPy.add_clue(PP_DESTINATION, self._ClientServerStr(client.servers))
-        pinpointPy.add_clues(PP_ARGS,cmd)
-        ###############################################################
-        pinpointPy.add_clue(PP_SERVER_TYPE, PP_MEMCACHED_FUTURE_GET)
-
-        return args, kwargs
-
-    def onEnd(self, ret):
-        super(PymemcachePlugin, self).onEnd(ret)
-        return ret
-    def _ClientServerStr(self,servers):
-        _server = ''
-        for s in servers:
-            _server+='['
-            _server+=s
-            _server+=']'
-        return _server
diff --git a/plugins/PY2.7/pinpoint/libs/pymemcache/__init__.py b/plugins/PY2.7/pinpoint/libs/pymemcache/__init__.py
deleted file mode 100644
index 90129e302..000000000
--- a/plugins/PY2.7/pinpoint/libs/pymemcache/__init__.py
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-# Created by eeliu at 12/3/20
-
-# ******************************************************************************
-#   Copyright  2020. NAVER Corp.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# ******************************************************************************
-
-def monkey_patch():
-    from pinpoint.common import Interceptor
-    try:
-        from pymemcache.client.base import Client
-        from .PymemcachePlugin import PymemcachePlugin
-        Interceptors = [
-            Interceptor(Client,'_fetch_cmd', PymemcachePlugin)
-        ]
-
-        for interceptor in Interceptors:
-            interceptor.enable()
-
-    except ImportError as e:
-        print(e)
-
-
-
-__all__=['monkey_patch']
\ No newline at end of file
diff --git a/plugins/PY2.7/pinpoint/libs/pymongo/__init__.py b/plugins/PY2.7/pinpoint/libs/pymongo/__init__.py
deleted file mode 100644
index 73f5dc566..000000000
--- a/plugins/PY2.7/pinpoint/libs/pymongo/__init__.py
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-
-# Created by eeliu at 8/20/20
-
-# ******************************************************************************
-#   Copyright  2020. NAVER Corp.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# ******************************************************************************
-
-def monkey_patch():
-
-    from pinpoint.common import Interceptor
-    try:
-        import pymongo
-        from .MongoClientPlugin import MongoClientPlugin
-
-        Interceptors = [
-            Interceptor(pymongo.collection,'find', MongoClientPlugin),
-            Interceptor(pymongo.collection, 'insert', MongoClientPlugin),
-            Interceptor(pymongo.collection, 'update', MongoClientPlugin),
-            Interceptor(pymongo.collection, 'update_many', MongoClientPlugin),
-            Interceptor(pymongo.collection, 'delete_one', MongoClientPlugin),
-            Interceptor(pymongo.collection, 'delete_many', MongoClientPlugin),
-            Interceptor(pymongo.collection, 'insert_many', MongoClientPlugin),
-            Interceptor(pymongo.collection, 'insert_one', MongoClientPlugin),
-        ]
-
-        for interceptor in Interceptors:
-            interceptor.enable()
-
-    except ImportError:
-        pass
-
-
-
-__all__=['monkey_patch']
-
diff --git a/plugins/PY2.7/pinpoint/libs/python-memcached/PyMemcachedPlugin.py b/plugins/PY2.7/pinpoint/libs/python-memcached/PyMemcachedPlugin.py
deleted file mode 100644
index 5271ba037..000000000
--- a/plugins/PY2.7/pinpoint/libs/python-memcached/PyMemcachedPlugin.py
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-# Created by eeliu at 12/3/20
-
-# ******************************************************************************
-#   Copyright  2020. NAVER Corp.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# ******************************************************************************
-
-from pinpoint.common import *
-import pinpointPy
-
-class PyMemcachedPlugin(Candy):
-    def __init__(self, name):
-        super(PyMemcachedPlugin, self).__init__(name)
-
-    def onBefore(self, *args, **kwargs):
-        super(PyMemcachedPlugin, self).onBefore(*args, **kwargs)
-        pinpointPy.add_clue(PP_INTERCEPTOR_NAME,self.getFuncUniqueName())
-        ###############################################################
-        client = args[0]
-        method = args[1]
-        host = client.server
-        pinpointPy.add_clue(PP_DESTINATION, host)
-        pinpointPy.add_clue(PP_SERVER_TYPE, PP_MEMCACHED_FUTURE_GET)
-        pinpointPy.add_clues(PP_ARGS,method)
-        ###############################################################
-
-        return args, kwargs
-
-    def onEnd(self, ret):
-        super(PyMemcachedPlugin, self).onEnd(ret)
-        return ret
diff --git a/plugins/PY2.7/pinpoint/libs/python-memcached/__init__.py b/plugins/PY2.7/pinpoint/libs/python-memcached/__init__.py
deleted file mode 100644
index 29603e858..000000000
--- a/plugins/PY2.7/pinpoint/libs/python-memcached/__init__.py
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-# Created by eeliu at 12/3/20
-
-# ******************************************************************************
-#   Copyright  2020. NAVER Corp.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# ******************************************************************************
-
-def monkey_patch():
-    from pinpoint.common import Interceptor
-    try:
-        from memcache import Client
-        from .PyMemcachedPlugin import PyMemcachedPlugin
-        Interceptors = [
-            Interceptor(Client,'_get', PyMemcachedPlugin)
-        ]
-
-        for interceptor in Interceptors:
-            interceptor.enable()
-
-    except ImportError as e:
-        print(e)
-
-
-
-__all__=['monkey_patch']
\ No newline at end of file
diff --git a/plugins/PY2.7/pinpoint/libs/requests/NextSpanPlugin.py b/plugins/PY2.7/pinpoint/libs/requests/NextSpanPlugin.py
deleted file mode 100644
index 01aa160ea..000000000
--- a/plugins/PY2.7/pinpoint/libs/requests/NextSpanPlugin.py
+++ /dev/null
@@ -1,69 +0,0 @@
-# ******************************************************************************
-#   Copyright  2020. NAVER Corp.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# ******************************************************************************
-
-
-
-from pinpoint.common import *
-from .PinpointDefine import *
-import pinpointPy
-from  urllib.parse import urlparse
-
-
-class NextSpanPlugin(Candy):
-
-    def __init__(self,class_name,module_name):
-        super(NextSpanPlugin,self).__init__(class_name,module_name)
-        self.nsid = ''
-        self.url =''
-
-    def onBefore(self,*args, **kwargs):
-        super(NextSpanPlugin,self).onBefore(*args, **kwargs)
-        self.url = args[0]
-        generatePinpointHeader(self.url, kwargs['headers'])
-        ###############################################################
-        pinpointPy.add_clue(PP_INTERCEPTOR_NAME,self.getFuncUniqueName())
-        pinpointPy.add_clue(PP_SERVER_TYPE,PP_METHOD_CALL)
-        pinpointPy.add_clues(PP_ARGS, self.url)
-        ###############################################################
-        return args, kwargs
-
-    def onEnd(self,ret):
-        ###############################################################
-        pinpointPy.add_clue(PP_DESTINATION, urlparse(self.url)['netloc'])
-        pinpointPy.add_clue(PP_SERVER_TYPE, PP_REMOTE_METHOD)
-        pinpointPy.add_clue(PP_NEXT_SPAN_ID, pinpointPy.get_context_key(PP_NEXT_SPAN_ID))
-        pinpointPy.add_clues(PP_HTTP_URL, self.url)
-        pinpointPy.add_clues(PP_HTTP_STATUS_CODE, str(ret.status_code))
-        pinpointPy.add_clues(PP_RETURN, str(ret))
-        ###############################################################
-        super(NextSpanPlugin,self).onEnd(ret)
-        return ret
-
-    def onException(self, e):
-        pinpointPy.add_clue(PP_ADD_EXCEPTION,str(e))
-
-    def get_arg(self, *args, **kwargs):
-        args_tmp = {}
-        j = 0
-
-        for i in args:
-            args_tmp["arg["+str(j)+"]"] = (str(i))
-            j += 1
-
-        for k in kwargs:
-            args_tmp[k] = kwargs[k]
-
-        return str(args_tmp)
diff --git a/plugins/PY2.7/pinpoint/libs/requests/__init__.py b/plugins/PY2.7/pinpoint/libs/requests/__init__.py
deleted file mode 100644
index d7f6e8dbb..000000000
--- a/plugins/PY2.7/pinpoint/libs/requests/__init__.py
+++ /dev/null
@@ -1,38 +0,0 @@
-# ******************************************************************************
-#   Copyright  2020. NAVER Corp.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# ******************************************************************************
-
-
-
-def monkey_patch():
-    from pinpoint.common import Interceptor
-
-    try:
-        import requests
-        from .NextSpanPlugin import NextSpanPlugin
-
-        Interceptors = [
-            Interceptor(requests.post,'find', NextSpanPlugin),
-            Interceptor(requests.get, 'insert', NextSpanPlugin),
-            Interceptor(requests.patch, 'update', NextSpanPlugin),
-        ]
-
-        for interceptor in Interceptors:
-            interceptor.enable()
-
-    except ImportError:
-        pass
-
-__all__=['monkey_patch']
\ No newline at end of file
diff --git a/plugins/PY2.7/pinpoint/libs/sqlalchemy/__init__.py b/plugins/PY2.7/pinpoint/libs/sqlalchemy/__init__.py
deleted file mode 100644
index b41b80e6a..000000000
--- a/plugins/PY2.7/pinpoint/libs/sqlalchemy/__init__.py
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-
-# Created by eeliu at 7/31/20
-
-
-
-def monkey_patch():
-    try:
-        from .sqlalchemyPlugin import before_cursor_execute,after_cursor_execute
-    except ImportError:
-        pass
-
-__all__=['monkey_patch']
\ No newline at end of file
diff --git a/plugins/PY2.7/pinpoint/libs/sqlalchemy/sqlalchemyPlugin.py b/plugins/PY2.7/pinpoint/libs/sqlalchemy/sqlalchemyPlugin.py
deleted file mode 100644
index d0eb67002..000000000
--- a/plugins/PY2.7/pinpoint/libs/sqlalchemy/sqlalchemyPlugin.py
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-
-# Created by eeliu at 7/31/20
-
-
-# ******************************************************************************
-#   Copyright  2020. NAVER Corp.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# ******************************************************************************
-
-from pinpoint.common import *
-from sqlalchemy import event
-from sqlalchemy.engine import Engine
-from urllib.parse import urlparse
-import pinpointPy
-
-
-@event.listens_for(Engine, "before_cursor_execute")
-def before_cursor_execute(conn, cursor, statement,
-                        parameters, context, executemany):
-    pinpointPy.start_trace()
-    pinpointPy.add_clue(PP_INTERCEPTOR_NAME, 'before_cursor_execute')
-    pinpointPy.add_clue(PP_SQL_FORMAT,statement)
-    pinpointPy.add_clues(PP_ARGS, 'user not cared')
-    DBUrl = urlparse(str(conn.engine.url))
-    if 'mysql'  in DBUrl.scheme:
-        pinpointPy.add_clue(PP_SERVER_TYPE, PP_MYSQL)
-    
-    if 'postgresql' in DBUrl.scheme:
-        pinpointPy.add_clue(PP_SERVER_TYPE, PP_POSTGRESQL)
-
-    pinpointPy.add_clue(PP_DESTINATION,DBUrl.hostname)
-
-@event.listens_for(Engine, "after_cursor_execute")
-def after_cursor_execute(conn, cursor, statement,
-                        parameters, context, executemany):
-    pinpointPy.end_trace()
-
diff --git a/plugins/PY2.7/pinpoint/libs/urllib/UrlOpenPlugin.py b/plugins/PY2.7/pinpoint/libs/urllib/UrlOpenPlugin.py
deleted file mode 100644
index 935dda47c..000000000
--- a/plugins/PY2.7/pinpoint/libs/urllib/UrlOpenPlugin.py
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-
-# Created by eeliu at 8/20/20
-
-# ******************************************************************************
-#   Copyright  2020. NAVER Corp.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# ******************************************************************************
-
-from pinpoint.common import *
-import pinpointPy
-
-class UrlOpenPlugin(Candy):
-
-    def __init__(self, name):
-        super(UrlOpenPlugin,self).__init__(name)
-        self.dst = ''
-        self.url =''
-    def onBefore(self,*args, **kwargs):
-        super(UrlOpenPlugin,self).onBefore(*args, **kwargs)
-        self.url = args[0]
-        generatePinpointHeader(self.url,kwargs['headers'])
-        ###############################################################
-        pinpointPy.add_clue(PP_INTERCEPTOR_NAME,self.getFuncUniqueName())
-        pinpointPy.add_clue(PP_SERVER_TYPE,PP_METHOD_CALL)
-        pinpointPy.add_clues(PP_ARGS, self.url)
-        ###############################################################
-
-        return args,kwargs
-
-    def onEnd(self,ret):
-        ###############################################################
-        pinpointPy.add_clue(PP_DESTINATION, urlparse(self.url)['netloc'])
-        pinpointPy.add_clue(PP_SERVER_TYPE, PP_REMOTE_METHOD)
-        pinpointPy.add_clue(PP_NEXT_SPAN_ID, pinpointPy.get_context_key(PP_NEXT_SPAN_ID))
-        pinpointPy.add_clues(PP_HTTP_URL, self.url)
-        pinpointPy.add_clues(PP_HTTP_STATUS_CODE, str(ret.status_code))
-        pinpointPy.add_clues(PP_RETURN, str(ret))
-        ###############################################################
-        super(UrlOpenPlugin,self).onEnd(ret)
-        return ret
-
-    def onException(self, e):
-        pinpointPy.add_clue(PP_ADD_EXCEPTION,str(e))
-
diff --git a/plugins/PY2.7/pinpoint/libs/urllib/__init__.py b/plugins/PY2.7/pinpoint/libs/urllib/__init__.py
deleted file mode 100644
index 04871eded..000000000
--- a/plugins/PY2.7/pinpoint/libs/urllib/__init__.py
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-
-# Created by eeliu at 8/20/20
-
-# ******************************************************************************
-#   Copyright  2020. NAVER Corp.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-# ******************************************************************************
-
-def monkey_patch():
-    from pinpoint.common import Interceptor
-    try:
-        import urllib.request
-        from .UrlOpenPlugin import UrlOpenPlugin
-
-        Interceptors = [
-            Interceptor(urllib.request,'urlopen', UrlOpenPlugin)
-        ]
-
-        for interceptor in Interceptors:
-            interceptor.enable()
-
-    except ImportError:
-        pass
-
-__all__=['monkey_patch']
-
diff --git a/plugins/PY2.7/pinpoint/settings.py b/plugins/PY2.7/pinpoint/settings.py
deleted file mode 100644
index 45d0b0b9c..000000000
--- a/plugins/PY2.7/pinpoint/settings.py
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-# Created by eeliu at 7/31/20
-
-# ------------------------------------------------------------------------------
-#  Copyright  2020. NAVER Corp.
-#
-#  Licensed under the Apache License, Version 2.0 (the "License");
-#  you may not use this file except in compliance with the License.
-#  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing, software
-#  distributed under the License is distributed on an "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  See the License for the specific language governing permissions and
-#  limitations under the License.
-# ------------------------------------------------------------------------------
-
-import pinpointPy
-
-###############################################################
-
-# user should set below before use
-APP_ID ='python-agent' # application id
-APP_NAME ='PYTHON-AGENT' # application name
-# COLLECTOR_HOST='unix:/tmp/collector-agent.sock'
-COLLECTOR_HOST='tcp:dev-collector:9999'
-APP_SUB_ID='1'
-
-###############################################################
-
-pinpointPy.set_agent(collector_host=COLLECTOR_HOST,trace_limit=-1)
-
-# pinpointPy.set_agent(collector_host='Tcp:ip:port',trace_limit=-1)
-
-# def output(msg):
-#     print(msg)
-#
-pinpointPy.enable_debug(None)
diff --git a/setup.py b/setup.py
deleted file mode 100644
index e88d4fb73..000000000
--- a/setup.py
+++ /dev/null
@@ -1,86 +0,0 @@
-from setuptools import setup, Extension
-from distutils.command.build_ext  import build_ext 
-import os,subprocess,sys
-import platform
-
-with open("README", "r") as fh:
-    long_description = fh.read()
-
-if sys.version_info[0] == 3:
-    class CommonBuild(build_ext):
-        build_temp = 'build'
-        def build_common(self):
-            if not os.path.exists(CommonBuild.build_temp):
-                os.makedirs(CommonBuild.build_temp)
-
-            comm_path = os.path.abspath('common')
-            subprocess.check_call(['cmake','-DCMAKE_BUILD_TYPE=Debug',comm_path],cwd=CommonBuild.build_temp)
-            subprocess.check_call(['cmake', '--build', '.'], cwd=CommonBuild.build_temp)
-
-        def run(self):
-            try:
-                out = subprocess.check_output(['cmake', '--version'])
-            except OSError:
-                raise RuntimeError("CMake must be installed to build the following extensions: " +
-                                    ", ".join(e.name for e in self.extensions))
-            self.build_common()
-            super().run()
-
-    pinpointBuild = CommonBuild
-
-else:
-    class CommonBuild(build_ext,object):
-        build_temp = 'build'
-        def build_common(self):
-            if not os.path.exists(CommonBuild.build_temp):
-                os.makedirs(CommonBuild.build_temp)
-
-            comm_path = os.path.abspath('common')
-            subprocess.check_call(['cmake','-DCMAKE_BUILD_TYPE=Debug',comm_path],cwd=CommonBuild.build_temp)
-            subprocess.check_call(['cmake', '--build', '.'], cwd=CommonBuild.build_temp)
-
-        def run(self):
-            try:
-                out = subprocess.check_output(['cmake', '--version'])
-            except OSError:
-                raise RuntimeError("CMake must be installed to build the following extensions: " +
-                                    ", ".join(e.name for e in self.extensions))
-            self.build_common()
-            super(CommonBuild,self).run()
-
-    pinpointBuild = CommonBuild
-
-###############################################
-# check os type
-
-name = platform.system().lower()
-agent_libraries = []   
-if name=='windows':
-    raise RuntimeError('pinpoint-c-agent currently not support MS')
-elif  name == 'darwin':
-    agent_libraries = ['pinpoint_common', 'stdc++']
-elif  name == 'linux':
-    agent_libraries = ['pinpoint_common','rt','stdc++']
-else:
-    raise RuntimeError('Unknow platform to me: '+name)
-###############################################
-
-
-setup(name='pinpointPy',
-      version="1.0.5",
-      author="eeliu", 
-      author_email='eeliu2009@gmail.com',
-      license='Apache License 2.0',
-      url="https://github.com/pinpoint-apm/pinpoint-c-agent",
-      long_description=long_description,
-      long_description_content_type='text/markdown',
-      ext_modules=[
-        Extension('pinpointPy',
-          ['src/PY/pinpoint_py.c'],
-          include_dirs = ['common/include'],
-          library_dirs = [pinpointBuild.build_temp+"/lib"],
-          libraries = agent_libraries
-          )
-        ],
-      cmdclass={'build_ext': pinpointBuild}
-)
\ No newline at end of file
diff --git a/setup.py b/setup.py
new file mode 120000
index 000000000..a9cac7fa4
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,1 @@
+setup_pypi.py
\ No newline at end of file
diff --git a/setup_test.py b/setup_pypi.py
similarity index 89%
rename from setup_test.py
rename to setup_pypi.py
index 962746caa..e851f5105 100644
--- a/setup_test.py
+++ b/setup_pypi.py
@@ -1,4 +1,4 @@
-from setuptools import setup, Extension
+from setuptools import setup, Extension,find_packages
 from distutils.command.build_ext  import build_ext 
 import os,subprocess,sys
 import platform
@@ -67,20 +67,22 @@ def run(self):
 
 
 setup(name='pinpointPy',
-      version="1.0.12",
-      author="eeliu", 
-      author_email='eeliu2009@gmail.com',
+      version="1.0.7",
+      author="cd_pinpoint members", 
+      author_email='dl_cd_pinpoint@navercorp.com',
       license='Apache License 2.0',
       url="https://github.com/pinpoint-apm/pinpoint-c-agent",
       long_description=long_description,
       long_description_content_type='text/markdown',
       ext_modules=[
-        Extension('pinpointPy',
-          ['src/PY/pinpoint_py.c'],
+        Extension('_pinpointPy',
+          ['src/PY/_pinpoint_py.c'],
           include_dirs = ['common/include'],
           library_dirs = [pinpointBuild.build_temp+"/lib"],
           libraries = agent_libraries
           )
         ],
+      package_dir={'':'plugins/PY'},
+      packages=find_packages(where='plugins/PY'),
       cmdclass={'build_ext': pinpointBuild}
 )
\ No newline at end of file
diff --git a/src/PY/pinpoint_py.c b/src/PY/_pinpoint_py.c
similarity index 71%
rename from src/PY/pinpoint_py.c
rename to src/PY/_pinpoint_py.c
index 02dfc6317..83f1eec48 100644
--- a/src/PY/pinpoint_py.c
+++ b/src/PY/_pinpoint_py.c
@@ -15,7 +15,7 @@
  ******************************************************************************/
 #include <Python.h>
 #include <string.h>
-#include "pinpoint_py.h"
+#include "_pinpoint_py.h"
 
 
 PPAgentT global_agent_info;
@@ -64,21 +64,7 @@ void _free_common_shared(void)
 
 #endif
 
-//#if PY_VERSION_HEX >= 0x30701f0
-//// for pinpoint_coro_local
-//#define SubObjName "agent"
-//
-// typedef struct py_agent_obj {
-//    PyObject_HEAD
-//    void *agent; //the agent trace unit for every coroutines
-// } PyAgentObj;
-//
-//static TraceStoreLayer* get_coro_store_layer(void);
-//
-//static TraceStoreLayer _coro_storage;
-//static PyObject* coro_local;
-//#define CORO_LOCAL_NAME "pinpoint_coro_local"
-//#endif
+#define MODNAME "_pinpointPy"
 
 #ifndef CYTHON_UNUSED
 # if defined(__GNUC__)
@@ -102,10 +88,13 @@ static PyObject *py_pinpoint_add_clues(PyObject *self, PyObject *args)
 {
     char* key = NULL;
     char* value = NULL;
-    int id = pinpoint_get_per_thread_id(); 
+    int id = -1;
     int loc = 0;
     if(PyArg_ParseTuple(args,"ss|ii",&key,&value,&id,&loc))
     {
+        // python is special, use thread-id
+        if(id == -1) id = pinpoint_get_per_thread_id();
+            
         pinpoint_add_clues(id,key,value,loc);
     }
     return Py_BuildValue("O",Py_True);
@@ -118,11 +107,13 @@ static PyObject *py_pinpoint_add_clue(PyObject *self, PyObject *args)
 {
     char* key = NULL;
     char* value = NULL;
-    int id = pinpoint_get_per_thread_id(); 
+    int id = -1;
     int loc = 0;
     if(PyArg_ParseTuple(args,"ss|ii",&key,&value,&id,&loc))
     {
-       pinpoint_add_clue(id,key,value,loc);
+        if(id == -1) id = pinpoint_get_per_thread_id();
+
+        pinpoint_add_clue(id,key,value,loc);
     }
     return Py_BuildValue("O",Py_True);
 }
@@ -135,10 +126,12 @@ static PyObject *py_pinpoint_context_key(PyObject *self, PyObject *args)
 {
     char* key = NULL;
     char* value = NULL;
-    int id = pinpoint_get_per_thread_id(); 
+    int id = -1;
     if(PyArg_ParseTuple(args,"ss|i",&key,&value,&id))
     {
-       pinpoint_set_context_key(id,key,value);
+        if (id == -1) id = pinpoint_get_per_thread_id();
+        
+        pinpoint_set_context_key(id,key,value);
     }
     return Py_BuildValue("O",Py_True);
 }
@@ -150,9 +143,11 @@ static PyObject *py_pinpoint_context_key(PyObject *self, PyObject *args)
 static PyObject *py_pinpoint_get_key(PyObject *self, PyObject *args)
 {
     char* key = NULL;
-    int id = pinpoint_get_per_thread_id(); 
+    int id = -1;
     if(PyArg_ParseTuple(args,"s|i",&key,&id))
     {
+        if(id == -1) id = pinpoint_get_per_thread_id();
+
         const char* data = pinpoint_get_context_key(id,key);
         return Py_BuildValue("s",data);
     }
@@ -186,11 +181,14 @@ static PyObject *py_check_tracelimit(PyObject *self, PyObject *args)
 static PyObject *py_force_flush_span(PyObject *self, PyObject *args)
 {
     int32_t timeout= 3;
-    int id = pinpoint_get_per_thread_id(); 
+    int id = -1; 
     if(! PyArg_ParseTuple(args,"|ii",&timeout,&id))
     {
         return NULL;
     }
+
+    if(id == -1) id = pinpoint_get_per_thread_id();
+
     if(global_agent_info.inter_flag & E_DISABLE_GIL)
     {
         pinpoint_force_end_trace(id,timeout);
@@ -318,11 +316,15 @@ static PyObject *py_trace_has_root(PyObject *self, PyObject *args)
 
 static PyObject *py_pinpoint_drop_trace(PyObject *self, PyObject *args)
 {
-    int id = pinpoint_get_per_thread_id();
+    int id = -1;
+
     if(! PyArg_ParseTuple(args,"|i",&id))
     {
         return NULL;
     }
+
+    if(id == -1) id = pinpoint_get_per_thread_id();
+
     mark_current_trace_status(id,E_TRACE_BLOCK);
     
     return Py_BuildValue("O",Py_True);
@@ -436,9 +438,11 @@ static PyObject *py_pinpoint_mark_an_error(PyObject *self, PyObject *args)
     char * msg = NULL;
     char * file_name= NULL;
     uint32_t line_no= 0;
-    int id = pinpoint_get_per_thread_id();
+    int id = -1;
     if(PyArg_ParseTuple(args,"ssi|i",&msg,&file_name,&line_no,&id))
     {
+        if(id == -1) id = pinpoint_get_per_thread_id();
+        
         catch_error(id,msg,file_name,line_no);
     }
 
@@ -450,7 +454,7 @@ static PyMethodDef PinpointMethods[] = {
     {"start_trace", py_pinpoint_start_trace, METH_VARARGS, "def start_trace(int id=-1):# create a new trace and insert into trace chain"},
     {"end_trace", py_pinpoint_end_trace, METH_VARARGS, "def end_trace(int id=-1):# end currently matched trace"},
     {"unique_id", py_generate_unique_id, METH_NOARGS, "def unique_id()-> long"},
-    {"trace_has_root", py_trace_has_root, METH_VARARGS, "def trace_has_root(int id=-1)-> long # check current whether have a root. \n True: \nFalse: \n Note：If the id is invalid, return false" },
+    {"trace_has_root", py_trace_has_root, METH_VARARGS, "def trace_has_root(int id=-1)-> long # check current whether have a root. \n True: \nFalse: \n Note: If the id is invalid, return false" },
     {"drop_trace", py_pinpoint_drop_trace, METH_VARARGS, "def drop_trace(int id=-1):# drop this trace"},
     {"start_time", py_pinpoint_start_time, METH_NOARGS, "def start_time()->long"},
     {"add_clues", py_pinpoint_add_clues, METH_VARARGS, "def add_clues(string key,string value,int id=-1,int loc=0)"},
@@ -470,12 +474,7 @@ static PyMethodDef PinpointMethods[] = {
 static void free_pinpoint_module(void * module)
 {
     Py_XDECREF(py_obj_msg_callback);
-// #if PY_VERSION_HEX >= 0x30701f0
-//     if(coro_local)
-//     {
-//         Py_DECREF(coro_local);
-//     }
-// #endif
+
     if(py_obj_msg_callback)
     {
         Py_DECREF(py_obj_msg_callback);
@@ -483,11 +482,11 @@ static void free_pinpoint_module(void * module)
 }
 
 /* Module structure */
-static struct PyModuleDef pinpointPymodule = {
+static struct PyModuleDef _pinpointPymodule = {
 
     PyModuleDef_HEAD_INIT,
 
-    "pinpointPy",           /* name of module */
+    MODNAME,           /* name of module */
     "python agent for pinpoint platform",  /* Doc string (may be NULL) */
     -1,                 /* Size of per-interpreter state or -1 */
     PinpointMethods,       /* Method table */
@@ -498,120 +497,10 @@ static struct PyModuleDef pinpointPymodule = {
 };
 
 
-#if PY_VERSION_HEX >= 0x30701f0
-
-// static PyObject *Agent_new(PyTypeObject *type, PyObject *args, PyObject *kwds) {
-//     PyAgentObj *self;
-//     self = (PyAgentObj*)type->tp_alloc(type, 0);
-//     if (self != NULL) {
-//         self->agent = NULL;
-//     }
-//     return (PyObject*)self;
-// }
-
-// static void Agent_dealloc(PyAgentObj *self) {
-//     give_back_agent(self->agent);
-//     Py_TYPE(self)->tp_free((PyObject*)self);
-// }
-
-// static PyTypeObject Agent_Type = {
-//     PyVarObject_HEAD_INIT(NULL, 0)
-//     "pinpointPy."SubObjName, /* tp_name */
-//     sizeof(PyAgentObj),         /* tp_basicsize */
-//     0,                         /* tp_itemsize */
-//     (destructor)Agent_dealloc,   /* tp_dealloc */
-//     0,                         /* tp_print */
-//     0,                         /* tp_getattr */
-//     0,                         /* tp_setattr */
-//     0,                         /* tp_compare */
-//     0,                         /* tp_repr */
-//     0,                         /* tp_as_number */
-//     0,                         /* tp_as_sequence */
-//     0,                         /* tp_as_mapping */
-//     0,                         /* tp_hash */
-//     0,                         /* tp_call */
-//     0,                         /* tp_str */
-//     0,                         /* tp_getattro */
-//     0,                         /* tp_setattro */
-//     0,                         /* tp_as_buffer */
-//     Py_TPFLAGS_DEFAULT |
-//         Py_TPFLAGS_BASETYPE,   /* tp_flags */
-//     SubObjName" objects",  /* tp_doc */
-//     0,                         /* tp_traverse */
-//     0,                         /* tp_clear */
-//     0,                         /* tp_richcompare */
-//     0,                         /* tp_weaklistoffset */
-//     0,                         /* tp_iter */
-//     0,                         /* tp_iternext */
-//     0,                         /* tp_methods */
-//     0,                         /* tp_members */
-//     0,               /* tp_getset Agent_getsets */
-//     0,                         /* tp_base */
-//     0,                         /* tp_dict */
-//     0,                         /* tp_descr_get */
-//     0,                         /* tp_descr_set */
-//     0,                         /* tp_dictoffset */
-//     0,                         /* tp_init */
-//     0,                         /* tp_alloc */
-//     Agent_new,                   /* tp_new */
-// };
-
-//static void set_coro_local(void* agent)
-//{
-//    PyObject *pp_agent_obj = PyObject_CallObject((PyObject *) &Agent_Type,NULL);
-//    assert(pp_agent_obj);
-//    ((PyAgentObj*)pp_agent_obj)->agent = agent;
-//    pp_trace("new  agent obj:%p",pp_agent_obj);
-//    PyObject *tok = PyContextVar_Set(coro_local, pp_agent_obj);
-//    if(tok == NULL ){
-//        Py_DECREF(pp_agent_obj);
-//        return;
-//    }
-//    Py_DECREF(tok);
-//    Py_DECREF(pp_agent_obj);
-//    pp_trace("set agent:%p success",agent);
-//}
-//
-//static void* get_coro_local(void)
-//{
-//    PyObject *pp_agent_obj;
-//    if(PyContextVar_Get(coro_local,NULL,&pp_agent_obj)<0){
-//        pp_trace("get coro local failed");
-//        return NULL;
-//    }
-//
-//    if (pp_agent_obj != NULL) {
-//        pp_trace("get_coro_local:%p",((PyAgentObj*)pp_agent_obj)->agent);
-//        Py_DECREF(pp_agent_obj);
-//        return ((PyAgentObj*)pp_agent_obj)->agent;
-//    }
-//    pp_trace("why agent is NULL");
-//    return NULL;
-//}
-
-// TraceStoreLayer* get_coro_store_layer(void)
-// {
-
-//     if(coro_local == NULL)
-//     {
-//         coro_local = PyContextVar_New(CORO_LOCAL_NAME, NULL);
-//     }
-
-//     _coro_storage.get_cur_trace_cb = get_coro_local;
-//     _coro_storage.set_cur_trace_cb = set_coro_local;
-
-//     return &_coro_storage;
-// }
-
-#endif
-
-
-
-
 
 /* Module initialization function */
 PyMODINIT_FUNC
-PyInit_pinpointPy(void) {
+PyInit__pinpointPy(void) {
     
     global_agent_info.agent_type=1700;
     strncpy(global_agent_info.co_host ,"unix:/tmp/collector.sock",MAX_ADDRESS_SIZE);
@@ -620,34 +509,18 @@ PyInit_pinpointPy(void) {
     global_agent_info.trace_limit = -1;
     register_error_cb(NULL);
 
-    PyObject* m = PyModule_Create(&pinpointPymodule);
+    PyObject* m = PyModule_Create(&_pinpointPymodule);
      if (m == NULL) return NULL;
 
-    // register Agent_Type
-// #if PY_VERSION_HEX >= 0x30701f0
-//     if (PyType_Ready(&Agent_Type) < 0)
-//     {
-//         return NULL;
-//     }
-
-//     Py_INCREF(&Agent_Type);
-//     if (PyModule_AddObject(m, SubObjName, (PyObject*)&Agent_Type) <0)
-//     {
-//         Py_DECREF(&Agent_Type);
-//         Py_DECREF(m);
-//         return NULL;
-//     }
-// #endif
 
     return m;
 }
 #else
-#define MODNAME "pinpointPy"
 
 PyDoc_STRVAR(pinpointPy__doc__,"python agent for pinpoint platform");
 
 PyMODINIT_FUNC
-initpinpointPy(void)
+init_pinpointPy(void)
 {
     PyObject *m;
 
diff --git a/src/PY/pinpoint_py.h b/src/PY/_pinpoint_py.h
similarity index 100%
rename from src/PY/pinpoint_py.h
rename to src/PY/_pinpoint_py.h
diff --git a/src/PY/help(pinpointPy).txt b/src/PY/help(pinpointPy).txt
deleted file mode 100644
index a3b861c89..000000000
--- a/src/PY/help(pinpointPy).txt
+++ /dev/null
@@ -1,52 +0,0 @@
-Help on module pinpointPy:
-
-NAME
-    pinpointPy - python agent for pinpoint platform
-
-FILE
-    /home/test/apps/pinpoint-c-agent/env2/lib/python2.7/site-packages/pinpointPy.so
-
-FUNCTIONS
-    add_clue(...)
-        def add_clue(string key,string value,int id=-1,int loc=0)
-    
-    add_clues(...)
-        def add_clues(string key,string value,int id=-1,int loc=0)
-    
-    check_tracelimit(...)
-        def check_tracelimit(long timestamp=-1): #check trace whether is limit
-    
-    drop_trace(...)
-        def drop_trace(int id=-1):# drop this trace
-    
-    enable_debug(...)
-        def enable_debug(callback):#enable logging output(callback )
-    
-    end_trace(...)
-        def end_trace(int id=-1):# end currently matched trace
-    
-    force_flush_trace(...)
-        def force_flush_trace(int id=-1): #force flush span during timeout
-    
-    get_context_key(...)
-        def get_context_key(key,int id=-1)->string
-    
-    mark_as_error(...)
-        def mark_as_error(string msg,string file_name,uint line_no,int id=-1): #This trace found an error
-    
-    set_agent(...)
-        def set_agent(collector_host="unix:/tmp/collector-agent.sock or tcp:host:port",trace_limit=-1): # set pinpint collector information
-    
-    set_context_key(...)
-        def set_context_key(string key,string value,int id=-1): # create a key-value pair that bases on current trace chain
-    
-    start_time(...)
-        def start_time()->long
-    
-    start_trace(...)
-        def start_trace(int id=-1):# create a new trace and insert into trace chain
-    
-    unique_id(...)
-        def unique_id()-> long
-
-(END)


Test patch:
diff --git a/.github/workflows/publish-test.yml b/.github/workflows/publish-test.yml
index 93342f57e..198032dff 100644
--- a/.github/workflows/publish-test.yml
+++ b/.github/workflows/publish-test.yml
@@ -16,7 +16,9 @@ jobs:
           pip install twine
       - name: package
         run: |
-          python setup_test.py sdist
+          rm setup.py
+          ln -s setup_pypi_test.py setup.py
+          python setup.py sdist
           twine check dist/*
       - name: Publish package to pypitest
         uses: pypa/gh-action-pypi-publish@release/v1
diff --git a/collector-agent/agent/RequestCounter_test.go b/collector-agent/agent/RequestCounter_test.go
index 528cabe68..93c38e0ed 100644
--- a/collector-agent/agent/RequestCounter_test.go
+++ b/collector-agent/agent/RequestCounter_test.go
@@ -1,9 +1,10 @@
 package agent
 
 import (
-	"CollectorAgent/common"
 	"testing"
 	"time"
+
+	"github.com/pinpoint-apm/pinpoint-c-agent/collector-agent/common"
 )
 
 func TestRequestProfiler_Interceptor(t *testing.T) {
diff --git a/collector-agent/server/server_test.go b/collector-agent/server/server_test.go
index b13f59774..64afa442e 100644
--- a/collector-agent/server/server_test.go
+++ b/collector-agent/server/server_test.go
@@ -1,7 +1,6 @@
 package server
 
 import (
-	"CollectorAgent/common"
 	"encoding/binary"
 	"net"
 	"os"
@@ -9,6 +8,8 @@ import (
 	"testing"
 	"time"
 
+	"github.com/pinpoint-apm/pinpoint-c-agent/collector-agent/common"
+
 	log "github.com/sirupsen/logrus"
 )
 
diff --git a/common/test/CMakeLists.txt b/common/test/CMakeLists.txt
index 483bb0e8b..f13c6e818 100644
--- a/common/test/CMakeLists.txt
+++ b/common/test/CMakeLists.txt
@@ -6,7 +6,7 @@ target_compile_definitions(unittest PRIVATE "-DUTEST -DCOMMON_DEBUG")
 message("${CMAKE_BINARY_DIR}/lib")
 if (WITH_CODECOVERAGE AND LINUX_)
     message("enable -lgcov")
-    target_link_libraries(unittest pinpoint_common  gtest_main rt gcov)
+    target_link_libraries(unittest pinpoint_common gtest_main rt gcov )
 elseif(APPLE)
     target_link_libraries(unittest pinpoint_common gtest_main)
 elseif(MSVC)
diff --git a/common/test/test_node.cc b/common/test/test_node.cc
index 55464bb08..de8638774 100644
--- a/common/test/test_node.cc
+++ b/common/test/test_node.cc
@@ -7,6 +7,7 @@
 using NodePool::TraceNode;
 using NodePool::PoolManager;
 using namespace testing;
+namespace Json = AliasJson;
 
 static NodePool::PoolManager g_pool;
 
diff --git a/common/test/test_node_pool.cc b/common/test/test_node_pool.cc
index fccf765ca..aa27b2728 100644
--- a/common/test/test_node_pool.cc
+++ b/common/test/test_node_pool.cc
@@ -15,10 +15,10 @@ TEST(poolManger, get_and_give_back)
     NodeID id = _node.getId();
     // give back
     pool.freeNode(id);
-    _node = pool.getNode();
+    TraceNode& _node_01 = pool.getNode();
 
     //ref current
-    TraceNode& ref_new_node =  pool.getNodeById(_node.getId());
+    TraceNode& ref_new_node =  pool.getNodeById(_node_01.getId());
 
     EXPECT_EQ(p,&_node);
     EXPECT_EQ(ref_new_node,_node);
diff --git a/common/test/test_trans_layer.cc b/common/test/test_trans_layer.cc
index 4dad65de0..021d15871 100644
--- a/common/test/test_trans_layer.cc
+++ b/common/test/test_trans_layer.cc
@@ -12,6 +12,7 @@ using namespace testing;
 using ConnectionPool::TransLayer;
 using ConnectionPool::SpanConnectionPool;
 using ConnectionPool::TransConnection;
+namespace Json = AliasJson;
 
 #define unix_socket  "./pinpoint_test.sock"
 #pragma GCC diagnostic push
diff --git a/common/test/test_util.cc b/common/test/test_util.cc
index b5d999b9b..084507e17 100644
--- a/common/test/test_util.cc
+++ b/common/test/test_util.cc
@@ -28,6 +28,7 @@
 using Helper::STT;
 using Cache::SafeSharedState;
 using std::chrono::seconds;
+namespace Json = AliasJson;
 
 TEST(util, sst)
 {
diff --git a/setup_pypi_test.py b/setup_pypi_test.py
new file mode 100644
index 000000000..b46517f09
--- /dev/null
+++ b/setup_pypi_test.py
@@ -0,0 +1,88 @@
+from setuptools import setup, Extension,find_packages
+from distutils.command.build_ext  import build_ext 
+import os,subprocess,sys
+import platform
+
+with open("README", "r") as fh:
+    long_description = fh.read()
+
+if sys.version_info[0] == 3:
+    class CommonBuild(build_ext):
+        build_temp = 'build'
+        def build_common(self):
+            if not os.path.exists(CommonBuild.build_temp):
+                os.makedirs(CommonBuild.build_temp)
+
+            comm_path = os.path.abspath('common')
+            subprocess.check_call(['cmake','-DCMAKE_BUILD_TYPE=Debug',comm_path],cwd=CommonBuild.build_temp)
+            subprocess.check_call(['cmake', '--build', '.'], cwd=CommonBuild.build_temp)
+
+        def run(self):
+            try:
+                out = subprocess.check_output(['cmake', '--version'])
+            except OSError:
+                raise RuntimeError("CMake must be installed to build the following extensions: " +
+                                    ", ".join(e.name for e in self.extensions))
+            self.build_common()
+            super().run()
+
+    pinpointBuild = CommonBuild
+
+else:
+    class CommonBuild(build_ext,object):
+        build_temp = 'build'
+        def build_common(self):
+            if not os.path.exists(CommonBuild.build_temp):
+                os.makedirs(CommonBuild.build_temp)
+
+            comm_path = os.path.abspath('common')
+            subprocess.check_call(['cmake','-DCMAKE_BUILD_TYPE=Debug',comm_path],cwd=CommonBuild.build_temp)
+            subprocess.check_call(['cmake', '--build', '.'], cwd=CommonBuild.build_temp)
+
+        def run(self):
+            try:
+                out = subprocess.check_output(['cmake', '--version'])
+            except OSError:
+                raise RuntimeError("CMake must be installed to build the following extensions: " +
+                                    ", ".join(e.name for e in self.extensions))
+            self.build_common()
+            super(CommonBuild,self).run()
+
+    pinpointBuild = CommonBuild
+
+###############################################
+# check os type
+
+name = platform.system().lower()
+agent_libraries = []   
+if name=='windows':
+    raise RuntimeError('pinpoint-c-agent currently not support MS')
+elif  name == 'darwin':
+    agent_libraries = ['pinpoint_common', 'stdc++']
+elif  name == 'linux':
+    agent_libraries = ['pinpoint_common','rt','stdc++']
+else:
+    raise RuntimeError('Unknow platform to me: '+name)
+###############################################
+
+
+setup(name='pinpointPy',
+      version="1.0.20",
+      author="cd_pinpoint members", 
+      author_email='dl_cd_pinpoint@navercorp.com',
+      license='Apache License 2.0',
+      url="https://github.com/pinpoint-apm/pinpoint-c-agent",
+      long_description=long_description,
+      long_description_content_type='text/markdown',
+      ext_modules=[
+        Extension('_pinpointPy',
+          ['src/PY/_pinpoint_py.c'],
+          include_dirs = ['common/include'],
+          library_dirs = [pinpointBuild.build_temp+"/lib"],
+          libraries = agent_libraries
+          )
+        ],
+      package_dir={'':'plugins/PY'},
+      packages=find_packages(where='plugins/PY'),
+      cmdclass={'build_ext': pinpointBuild}
+)
\ No newline at end of file
diff --git a/src/PY/test/TestCoroutines.py b/src/PY/test/TestCoroutines.py
index 777ed5c34..db10a0fcb 100644
--- a/src/PY/test/TestCoroutines.py
+++ b/src/PY/test/TestCoroutines.py
@@ -1,6 +1,6 @@
 ﻿from unittest import TestCase
 import unittest
-import pinpointPy
+import _pinpointPy
 import asyncio
 import contextvars
 import sys
@@ -10,8 +10,8 @@
 class TestInCoroutines(TestCase):
     @classmethod
     def setUpClass(cls):
-        # pinpointPy.enable_debug(None)
-        pinpointPy.set_agent(collector_host="unix:/tmp/unexist.sock")
+        # _pinpointPy.enable_debug(None)
+        _pinpointPy.set_agent(collector_host="unix:/tmp/unexist.sock")
     
 
     @unittest.skipIf(hex(sys.hexversion) <'0x30701f0', "python version must 3.7.1+")
@@ -19,18 +19,18 @@ def testCoroFlow(self):
         def decorator_pinpoint(func):
             async def pinpoint_trace(*args, **kwargs):
                 id = pinpointId.get()
-                id = pinpointPy.start_trace(id)
+                id = _pinpointPy.start_trace(id)
                 pinpointId.set(id)
                 func_name = func.__name__
-                pinpointPy.add_clue('name',func_name,id,0)
-                pinpointPy.add_clues('start','3434',id)
-                pinpointPy.set_context_key('sid','12345',id)
-                value = pinpointPy.get_context_key('sid',id)
+                _pinpointPy.add_clue('name',func_name,id,0)
+                _pinpointPy.add_clues('start','3434',id)
+                _pinpointPy.set_context_key('sid','12345',id)
+                value = _pinpointPy.get_context_key('sid',id)
                 self.assertEqual(value,'12345')
 
                 ret = await func(*args, **kwargs)
-                pinpointPy.add_clue('end','3434',id)
-                id = pinpointPy.end_trace(id)
+                _pinpointPy.add_clue('end','3434',id)
+                id = _pinpointPy.end_trace(id)
             return pinpoint_trace
 
         @decorator_pinpoint
diff --git a/src/PY/test/TestPinpoint.py b/src/PY/test/TestPinpoint.py
index 2afca9f4c..b75069736 100644
--- a/src/PY/test/TestPinpoint.py
+++ b/src/PY/test/TestPinpoint.py
@@ -1,6 +1,6 @@
 ﻿from unittest import TestCase
 import unittest
-import pinpointPy
+import _pinpointPy
 import sys
 
 
@@ -10,59 +10,59 @@ def output(msg):
 class TestAgent(TestCase):
      
     def setUp(self):
-        # self.assertTrue(pinpointPy.enable_debug(output))
-        # self.assertTrue(pinpointPy.enable_debug(None))
-        self.assertTrue(pinpointPy.set_agent(collector_host='unix:/tmp/collector-agent.sock'))
+        # self.assertTrue(_pinpointPy.enable_debug(output))
+        # self.assertTrue(_pinpointPy.enable_debug(None))
+        self.assertTrue(_pinpointPy.set_agent(collector_host='unix:/tmp/collector-agent.sock'))
 
     def test_trace_life(self):
-        self.assertFalse(pinpointPy.trace_has_root())
-        pinpointPy.start_trace()
-        self.assertTrue(pinpointPy.trace_has_root())
-        pinpointPy.start_trace()
-        self.assertTrue(pinpointPy.trace_has_root())
-        pinpointPy.start_trace()
-        pinpointPy.start_trace()
-        # self.assertRaises(Exception,lambda: pinpointPy.trace_has_root(1025))
-        # self.assertRaises(Exception,lambda: pinpointPy.trace_has_root(-1025))
+        self.assertFalse(_pinpointPy.trace_has_root())
+        _pinpointPy.start_trace()
+        self.assertTrue(_pinpointPy.trace_has_root())
+        _pinpointPy.start_trace()
+        self.assertTrue(_pinpointPy.trace_has_root())
+        _pinpointPy.start_trace()
+        _pinpointPy.start_trace()
+        # self.assertRaises(Exception,lambda: _pinpointPy.trace_has_root(1025))
+        # self.assertRaises(Exception,lambda: _pinpointPy.trace_has_root(-1025))
 
-        pinpointPy.add_clue("key","value")
-        pinpointPy.add_clue("key","value3")
-        pinpointPy.set_context_key('sid','12345')
-        value = pinpointPy.get_context_key('sid')
+        _pinpointPy.add_clue("key","value")
+        _pinpointPy.add_clue("key","value3")
+        _pinpointPy.set_context_key('sid','12345')
+        value = _pinpointPy.get_context_key('sid')
         self.assertEqual(value,'12345')
-        pinpointPy.add_clues("key","values")
-        pinpointPy.add_clues("key","values")
-        pinpointPy.add_clues("key","values")
+        _pinpointPy.add_clues("key","values")
+        _pinpointPy.add_clues("key","values")
+        _pinpointPy.add_clues("key","values")
 
-        pinpointPy.end_trace()
-        pinpointPy.end_trace()
-        pinpointPy.end_trace()
-        pinpointPy.end_trace()
-        pinpointPy.force_flush_trace(10)
-        self.assertFalse(pinpointPy.trace_has_root())
+        _pinpointPy.end_trace()
+        _pinpointPy.end_trace()
+        _pinpointPy.end_trace()
+        _pinpointPy.end_trace()
+        _pinpointPy.force_flush_trace(10)
+        self.assertFalse(_pinpointPy.trace_has_root())
 
     def test_set_collector_host(self):
-        self.assertTrue(pinpointPy.set_agent(collector_host='unix:/tmp/collector1.sock'))
-        self.assertTrue(pinpointPy.set_agent(collector_host='Unix:/tmp/collector1.sock'))
-        self.assertTrue(pinpointPy.set_agent(collector_host='TCP:dev-collector:11331'))
-        self.assertTrue(pinpointPy.set_agent(collector_host='Tcp:dev-collector:11331'))
+        self.assertTrue(_pinpointPy.set_agent(collector_host='unix:/tmp/collector1.sock'))
+        self.assertTrue(_pinpointPy.set_agent(collector_host='Unix:/tmp/collector1.sock'))
+        self.assertTrue(_pinpointPy.set_agent(collector_host='TCP:dev-collector:11331'))
+        self.assertTrue(_pinpointPy.set_agent(collector_host='Tcp:dev-collector:11331'))
 
         try:
-            pinpointPy.set_agent(collector_host='dev-collector:11331')
+            _pinpointPy.set_agent(collector_host='dev-collector:11331')
             self.assertFalse(1)
         except:
             pass
         try:
-            self.assertFalse(pinpointPy.set_agent(collector_host='/tmp/collector1.sock'))
+            self.assertFalse(_pinpointPy.set_agent(collector_host='/tmp/collector1.sock'))
             self.assertFalse(1)
         except:
             pass
         
-        self.assertTrue(pinpointPy.set_agent(collector_host='Tcp:dev-collector:11331',trace_limit=1000))
+        self.assertTrue(_pinpointPy.set_agent(collector_host='Tcp:dev-collector:11331',trace_limit=1000))
 
 
-# pinpointPy.start_trace()
-# pinpointPy.end_trace()
+# _pinpointPy.start_trace()
+# _pinpointPy.end_trace()
 
 if __name__ == '__main__':
     unittest.main()
\ No newline at end of file
diff --git a/src/PY/test/TestUnderProcessMode.py b/src/PY/test/TestUnderProcessMode.py
index 8d0baf2f2..2557aaa5b 100644
--- a/src/PY/test/TestUnderProcessMode.py
+++ b/src/PY/test/TestUnderProcessMode.py
@@ -2,30 +2,30 @@
 import unittest
 from multiprocessing import Process
 import time
-import pinpointPy
+import _pinpointPy
 import random
 
 class TestUnderProcessMode(TestCase):
 
     def tearDown(self):
-        pinpointPy.force_flush_trace(4)
+        _pinpointPy.force_flush_trace(4)
 
     def _test_api_flow(self):
-        self.assertTrue(pinpointPy.set_agent(collector_host='unix:/tmp/unexist.sock'))
-        # self.assertTrue(pinpointPy.enable_debug(None))
+        self.assertTrue(_pinpointPy.set_agent(collector_host='unix:/tmp/unexist.sock'))
+        # self.assertTrue(_pinpointPy.enable_debug(None))
 
         while True:
             id = str(random.randint(1,10000000))
-            pinpointPy.start_trace()
-            pinpointPy.set_context_key('sid',id)
-            pinpointPy.add_clue("key","value3")
-            pinpointPy.add_clues("key","value3")
-            value = pinpointPy.get_context_key('sid')
+            _pinpointPy.start_trace()
+            _pinpointPy.set_context_key('sid',id)
+            _pinpointPy.add_clue("key","value3")
+            _pinpointPy.add_clues("key","value3")
+            value = _pinpointPy.get_context_key('sid')
             self.assertEqual(value,id)
-            pinpointPy.mark_as_error("fghjk","fghjkl",234234)
-            pinpointPy.end_trace()
-            pinpointPy.force_flush_trace()
-            pinpointPy.drop_trace()
+            _pinpointPy.mark_as_error("fghjk","fghjkl",234234)
+            _pinpointPy.end_trace()
+            _pinpointPy.force_flush_trace()
+            _pinpointPy.drop_trace()
 
     def test_process(self):
         p1 = Process(target=self._test_api_flow)
diff --git a/src/PY/test/TestUnderThreadMode.py b/src/PY/test/TestUnderThreadMode.py
index d9c7ed222..a685d8c4a 100644
--- a/src/PY/test/TestUnderThreadMode.py
+++ b/src/PY/test/TestUnderThreadMode.py
@@ -2,7 +2,7 @@
 import unittest
 from threading import Thread
 import time
-import pinpointPy
+import _pinpointPy
 
 
 class TestUnderThreadMode(TestCase):
@@ -11,28 +11,28 @@ def setUp(self):
         self.thread_running = True
 
     def tearDown(self):
-        pinpointPy.force_flush_trace(4)
+        _pinpointPy.force_flush_trace(4)
 
     def _test_api_flow(self):
-        self.assertTrue(pinpointPy.set_agent(collector_host='unix:/tmp/notexist.sock'))
-        # self.assertTrue(pinpointPy.enable_debug(None))
+        self.assertTrue(_pinpointPy.set_agent(collector_host='unix:/tmp/notexist.sock'))
+        # self.assertTrue(_pinpointPy.enable_debug(None))
 
         while self.thread_running:
-            self.assertFalse(pinpointPy.trace_has_root())
-            pinpointPy.start_trace()
-            self.assertTrue(pinpointPy.trace_has_root())
-            pinpointPy.set_context_key('sid','12345678')
-            pinpointPy.add_clue("key","value3")
-            pinpointPy.add_clues("key","value3")
-            value = pinpointPy.get_context_key('sid')
+            self.assertFalse(_pinpointPy.trace_has_root())
+            _pinpointPy.start_trace()
+            self.assertTrue(_pinpointPy.trace_has_root())
+            _pinpointPy.set_context_key('sid','12345678')
+            _pinpointPy.add_clue("key","value3")
+            _pinpointPy.add_clues("key","value3")
+            value = _pinpointPy.get_context_key('sid')
             self.assertEqual(value,'12345678')
-            pinpointPy.mark_as_error("fghjk","fghjkl",234234)
-            pinpointPy.end_trace()
-            pinpointPy.force_flush_trace()
-            pinpointPy.drop_trace()
-            value = pinpointPy.get_context_key('sid')
+            _pinpointPy.mark_as_error("fghjk","fghjkl",234234)
+            _pinpointPy.end_trace()
+            _pinpointPy.force_flush_trace()
+            _pinpointPy.drop_trace()
+            value = _pinpointPy.get_context_key('sid')
             self.assertFalse(value)
-            self.assertFalse(pinpointPy.trace_has_root())
+            self.assertFalse(_pinpointPy.trace_has_root())
 
 
     def test_thread_safe(self):
diff --git a/testapps/PHP/.gitignore b/testapps/PHP/.gitignore
index 8549d73f7..7846e89ed 100644
--- a/testapps/PHP/.gitignore
+++ b/testapps/PHP/.gitignore
@@ -1,9 +1,4 @@
-composer.phar
-vendor
-.idea/
-Cache
-__class_index_table
-*.ast
-# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control
-# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
+.idea
 composer.lock
+*.log
+thinkphp
diff --git a/testapps/PHP/.travis.yml b/testapps/PHP/.travis.yml
new file mode 100644
index 000000000..36f7b6f90
--- /dev/null
+++ b/testapps/PHP/.travis.yml
@@ -0,0 +1,42 @@
+sudo: false
+
+language: php
+
+branches:
+  only:
+    - stable
+
+cache:
+  directories:
+    - $HOME/.composer/cache
+
+before_install:
+  - composer self-update
+
+install:
+  - composer install --no-dev --no-interaction --ignore-platform-reqs
+  - zip -r --exclude='*.git*' --exclude='*.zip' --exclude='*.travis.yml' ThinkPHP_Core.zip .
+  - composer require --update-no-dev --no-interaction "topthink/think-image:^1.0"
+  - composer require --update-no-dev --no-interaction "topthink/think-migration:^1.0"
+  - composer require --update-no-dev --no-interaction "topthink/think-captcha:^1.0"
+  - composer require --update-no-dev --no-interaction "topthink/think-mongo:^1.0"
+  - composer require --update-no-dev --no-interaction "topthink/think-worker:^1.0"
+  - composer require --update-no-dev --no-interaction "topthink/think-helper:^1.0"
+  - composer require --update-no-dev --no-interaction "topthink/think-queue:^1.0"
+  - composer require --update-no-dev --no-interaction "topthink/think-angular:^1.0"
+  - composer require --dev --update-no-dev --no-interaction "topthink/think-testing:^1.0"
+  - zip -r --exclude='*.git*' --exclude='*.zip' --exclude='*.travis.yml' ThinkPHP_Full.zip .
+
+script:
+  - php think unit
+
+deploy:
+  provider: releases
+  api_key:
+    secure: TSF6bnl2JYN72UQOORAJYL+CqIryP2gHVKt6grfveQ7d9rleAEoxlq6PWxbvTI4jZ5nrPpUcBUpWIJHNgVcs+bzLFtyh5THaLqm39uCgBbrW7M8rI26L8sBh/6nsdtGgdeQrO/cLu31QoTzbwuz1WfAVoCdCkOSZeXyT/CclH99qV6RYyQYqaD2wpRjrhA5O4fSsEkiPVuk0GaOogFlrQHx+C+lHnf6pa1KxEoN1A0UxxVfGX6K4y5g4WQDO5zT4bLeubkWOXK0G51XSvACDOZVIyLdjApaOFTwamPcD3S1tfvuxRWWvsCD5ljFvb2kSmx5BIBNwN80MzuBmrGIC27XLGOxyMerwKxB6DskNUO9PflKHDPI61DRq0FTy1fv70SFMSiAtUv9aJRT41NQh9iJJ0vC8dl+xcxrWIjU1GG6+l/ZcRqVx9V1VuGQsLKndGhja7SQ+X1slHl76fRq223sMOql7MFCd0vvvxVQ2V39CcFKao/LB1aPH3VhODDEyxwx6aXoTznvC/QPepgWsHOWQzKj9ftsgDbsNiyFlXL4cu8DWUty6rQy8zT2b4O8b1xjcwSUCsy+auEjBamzQkMJFNlZAIUrukL/NbUhQU37TAbwsFyz7X0E/u/VMle/nBCNAzgkMwAUjiHM6FqrKKBRWFbPrSIixjfjkCnrMEPw=
+  file:
+    - ThinkPHP_Core.zip
+    - ThinkPHP_Full.zip
+  skip_cleanup: true
+  on:
+    tags: true
diff --git a/testapps/PHP/LICENSE.txt b/testapps/PHP/LICENSE.txt
new file mode 100644
index 000000000..774fa76fd
--- /dev/null
+++ b/testapps/PHP/LICENSE.txt
@@ -0,0 +1,32 @@
+
+ThinkPHP遵循Apache2开源协议发布，并提供免费使用。
+版权所有Copyright © 2006-2018 by ThinkPHP (http://thinkphp.cn)
+All rights reserved。
+ThinkPHP® 商标和著作权所有者为上海顶想信息科技有限公司。
+
+Apache Licence是著名的非盈利开源组织Apache采用的协议。
+该协议和BSD类似，鼓励代码共享和尊重原作者的著作权，
+允许代码修改，再作为开源或商业软件发布。需要满足
+的条件： 
+1． 需要给代码的用户一份Apache Licence ；
+2． 如果你修改了代码，需要在被修改的文件中说明；
+3． 在延伸的代码中（修改和有源代码衍生的代码中）需要
+带有原来代码中的协议，商标，专利声明和其他原来作者规
+定需要包含的说明；
+4． 如果再发布的产品中包含一个Notice文件，则在Notice文
+件中需要带有本协议内容。你可以在Notice中增加自己的
+许可，但不可以表现为对Apache Licence构成更改。 
+具体的协议参考：http://www.apache.org/licenses/LICENSE-2.0
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
diff --git a/testapps/PHP/Plugins/AutoGen/app/CommonPlugin.php b/testapps/PHP/Plugins/AutoGen/app/CommonPlugin.php
new file mode 100644
index 000000000..507eed73d
--- /dev/null
+++ b/testapps/PHP/Plugins/AutoGen/app/CommonPlugin.php
@@ -0,0 +1,57 @@
+<?php
+#-------------------------------------------------------------------------------
+# Copyright 2019 NAVER Corp
+# 
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License.  You may obtain a copy
+# of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations under
+# the License.
+#-------------------------------------------------------------------------------
+
+namespace Plugins\AutoGen\app;
+use Pinpoint\Plugins\Common\PinTrace;
+
+///@hook:app\common\AppDate::outputDate
+///@hook:app\common\AopFunction::test_func1
+///@hook:app\common\AopFunction::test_func2  app\util\Foo::test_func_2
+///@hook:app\common\Person::eat app\common\Teacher::eat app\common\Student::eat app\common\Doctor::other app\common\Doctor::eat
+///@hook:app\common\AbstractStudent::eat app\common\AbstractStudent::drink app\common\AbstractStudent::breath
+///@hook:app\common\AbstractStudent::eat app\common\AbstractStudent::drink app\common\AbstractPerson::breath
+///@hook:app\common\InterfaceStudent::setVariable app\common\InterfaceStudent::getHtml app\common\InterfaceStudent::other
+///@hook:app\common\TestClone::setColor app\common\TestClone::getColor app\common\TestClone::__clone
+///@hook:app\common\TestRecursion::test_cumsum1 app\common\TestRecursion::test_cumsum2
+///@hook:app\common\TestAnonymous::createbell
+///@hook:app\common\TestStatic::static_func
+///@hook:app\common\TestFinalClass::test app\common\TestFinalFunc::test
+///@hook:app\common\FuncInTrait::traitfunc app\common\TestTrait::test
+///@hook:app\common\CallBackFunc::fnCallback1 app\common\CallBackFunc::fnCallback2
+///@hook:app\common\LevelClass::public_function app\common\LevelClass::protected_function app\common\LevelClass::private_function
+///@hook:app\common\OverRideLevel::public_function app\common\OverRideLevel::protected_function app\common\OverRideLevel::private_function
+///@hook:app\common\TestArgs::test_args
+///@hook:app\common\TestReturn::test_return
+///@hook:app\common\TestError::throwException app\common\TestError::test_cumsum_e1 app\common\TestError::caughtException app\common\TestError::error app\common\TestError::testParseError app\common\TestError::testTypeError app\common\TestError::testArithmeticError app\common\TestError::testDivisionByZeroError app\common\TestError::testAssertionError
+class CommonPlugin extends PinTrace
+{
+    ///@hook:app\common\DBcontrol::connectDb
+    public function onBefore(){
+        pinpoint_add_clue("stp",PP_PHP_METHOD);
+        pinpoint_add_clues(PP_PHP_ARGS,print_r($this->args,true));
+    }
+
+    ///@hook:app\common\DBcontrol::getData1 app\common\DBcontrol::\array_push
+    public function onEnd(&$ret){
+        pinpoint_add_clues(PP_PHP_RETURN,print_r($ret,true));
+    }
+
+    ///@hook:app\common\DBcontrol::getData2
+    public function onException($e){
+        pinpoint_add_clue("EXP",$e->getMessage());
+    }
+}
diff --git a/plugins/PHP/Plugins/AutoGen/app/Generator.php b/testapps/PHP/Plugins/AutoGen/app/Generator.php
similarity index 96%
rename from plugins/PHP/Plugins/AutoGen/app/Generator.php
rename to testapps/PHP/Plugins/AutoGen/app/Generator.php
index 1da66aaf5..a2a522106 100644
--- a/plugins/PHP/Plugins/AutoGen/app/Generator.php
+++ b/testapps/PHP/Plugins/AutoGen/app/Generator.php
@@ -16,8 +16,8 @@
 #-------------------------------------------------------------------------------
 
 
-namespace Plugins\AutoGen;
-use Plugins\Common\InstancePlugins;
+namespace Plugins\AutoGen\app;
+use Pinpoint\Plugins\Common\InstancePlugins;
 
 class Generator extends InstancePlugins implements \Iterator
 {
diff --git a/plugins/PHP/Plugins/AutoGen/app/GeneratorPlugin.php b/testapps/PHP/Plugins/AutoGen/app/GeneratorPlugin.php
similarity index 85%
rename from plugins/PHP/Plugins/AutoGen/app/GeneratorPlugin.php
rename to testapps/PHP/Plugins/AutoGen/app/GeneratorPlugin.php
index 62c4de134..f80b174ef 100644
--- a/plugins/PHP/Plugins/AutoGen/app/GeneratorPlugin.php
+++ b/testapps/PHP/Plugins/AutoGen/app/GeneratorPlugin.php
@@ -15,12 +15,12 @@
 # the License.
 #-------------------------------------------------------------------------------
 
-namespace Plugins\AutoGen;
-use Plugins\Common\Candy;
-use Plugins\AutoGen\Generator;
+namespace Plugins\AutoGen\app;
+use Pinpoint\Plugins\Common\PinTrace;
+use Plugins\AutoGen\app\Generator;
 
-///@hook:app\TestGenerator::generator
-class GeneratorPlugin extends Candy
+///@hook:app\common\TestGenerator::generator
+class GeneratorPlugin extends PinTrace
 {
     public function onBefore(){
         pinpoint_add_clue("stp",PP_PHP_METHOD);
diff --git a/testapps/PHP/Plugins/setting.ini b/testapps/PHP/Plugins/setting.ini
new file mode 100644
index 000000000..180dea527
--- /dev/null
+++ b/testapps/PHP/Plugins/setting.ini
@@ -0,0 +1,33 @@
+[nm_class]
+;rename below class
+PDO=Pinpoint\Plugins\Sys\PDO\PDO
+Memcached=Pinpoint\Plugins\Sys\Memcached\Memcached
+Redis=Pinpoint\Plugins\Sys\phpredis\PRedis
+mysqli=Pinpoint\Plugins\Sys\mysqli\mysqli
+RdKafka\Producer=Pinpoint\Plugins\Sys\RdKafka\Producer
+
+[nm_func]
+;rename below system function
+date=Pinpoint\Plugins\Sys\date\date
+curl_init=Pinpoint\Plugins\Sys\curl\curl_init
+curl_setopt=Pinpoint\Plugins\Sys\curl\curl_setopt
+curl_exec=Pinpoint\Plugins\Sys\curl\curl_exec
+curl_close=Pinpoint\Plugins\Sys\curl\curl_close
+curl_setopt_array=Pinpoint\Plugins\Sys\curl\curl_setopt_array
+
+[nm_string]
+; I am not lazy, does user real need this?
+[nm_add_class]
+;expand above setting into below class
+; class_name[]=app\common\TestMemcached
+; class_name[]=app\common\TestMysqli
+; class_name[]=app\common\TestKafka
+class_name[]=app\common\TestGuzzle
+class_name[]=app\common\AccessRemote
+class_name[]=app\common\TestRedis
+class_name[]=app\common\AppDate
+class_name[]=think\db\Connection
+class_name[]=think\cache\driver\Redis
+
+[nm_ignore_class]
+;ho ho, do not change in below class
diff --git a/testapps/PHP/Readme.md b/testapps/PHP/Readme.md
index 6e7119acd..b1dd1e34a 100644
--- a/testapps/PHP/Readme.md
+++ b/testapps/PHP/Readme.md
@@ -1,77 +1,31 @@
-## How to write your own plugins 
-
-### Tutorial
-
-1. First, you need to know how to use [ pinpoint-php-aop ☚](https://github.com/pinpoint-apm/pinpoint-php-aop) and how it works. 
-2. Write your own XXXPlugin.php class.
-   
-   ```php
-
-    class XXXPlugins extends Candy
-    {
-        public function onBefore(){
-            pinpoint_add_clue("stp",PHP_METHOD);
-            pinpoint_add_clues(PHP_ARGS,"fetch data from $this->args");
-        }
-
-        public function onEnd(&$ret){
-            pinpoint_add_clues(PHP_RETURN,"parse data from $ret");
-        }
-
-        public function onException($e){
-            pinpoint_add_clue("EXP",$e->getMessage());
-        }
-    }
-   ```
-   > You could find some out of box plugins in [[Example/PHP/Plugins](../../Example/PHP/Plugins)].
-    When you add clue(clues), DO NOT assignment with large string or string included some special characters(https://www.freeformatter.com/json-escape.html)
-3. Add the function that you care about such as "///@hook:app\User::adduser" before ClassName(XXXPlugins), onBefore, onEnd or onException. If you care about all cases, please call before&after&around function.
-
-4. Remove the "__class_index_table" file under AOP_CACHE_DIR.
-
-5. Copy your plugins files into source tree/plugins_dir, and add this directory into composer.json{"autoload"}.
-   
+## How to start testapp
+1. Install Composer. [How to Use Composer?](https://getcomposer.org/doc/00-intro.md)
+2. Execute `composer install` or `composer update`.
+3. Import pinpoint entry header into public/index.php as below
+    ## start.php
     ```
-    "autoload": {
-            "psr-4": {
-                ......
-                "Plugins\\": "your source tree/plugins_dir"
-            }
-        },
-    ```
-    
-6. Update your autoload. $ composer update.
-7. Enjoy the pinpoint-php-aop.
-## Protocol
+    <?php
 
-> Json -> Thrift/GRPC
+    ...
 
-```
-                   +------------------+
-                   |  php-fpm         |
-                   |  pinpoint_php.so |
-                   +------------------+
-                           |
-                json       |
-            unix:socket    |
-                           v
-                    +----------------+
-                    |collector-agent |
-                    |                |
-                    +----------------+
-                           |
-                           |    thrift TCP&UDP
-                           |    GRPC
-                           v
-                  +----------------------+
-                  |  pinpoint collector  |
-                  +----------------------+
+    // [ 应用入口文件 ]
+    namespace think;
 
-```
+    // 加载基础文件
+    require __DIR__ . '/../thinkphp/base.php';
 
-## Example
+    //###################################################################
+    define('AOP_CACHE_DIR', __DIR__ . '/../Cache/');
+    define('PLUGINS_DIR', __DIR__ . '/../Plugins/');
+    define('APPLICATION_NAME','thinkphp5.1'); // your application name
+    define('APPLICATION_ID','thinkphp5.1');  // your application id
+    define('PINPOINT_USE_CACHE','YES');
+    require_once __DIR__ . '/../vendor/pinpoint-apm/pinpoint-php-aop/auto_pinpointed.php';
+    //###################################################################
 
-https://github.com/pinpoint-apm/pinpoint-c-agent/tree/v0.3.1/Example/PHP/Plugins
+    // 支持事先使用静态方法设置Request对象和Config对象
 
-## API of Pinpoint_php_ext
-[Goto pinpoint_ext_api ☚](https://github.com/pinpoint-apm/pinpoint-c-agent/blob/v0.3.1/src/PHP/pinpoint_php_api.php)
\ No newline at end of file
+    // 执行应用并响应
+    Container::get('app')->run()->send();
+    ```
+4. Start testapp by executing `php think run`.
\ No newline at end of file
diff --git a/testapps/PHP/app/DBcontrol.php b/testapps/PHP/app/DBcontrol.php
deleted file mode 100644
index 81f54e096..000000000
--- a/testapps/PHP/app/DBcontrol.php
+++ /dev/null
@@ -1,58 +0,0 @@
-<?php
-/**
- * User: eeliu
- * Date: 1/4/19
- * Time: 2:32 PM
- */
-
-namespace app;
-use Exception;
-use \PDO;
-
-
-
-class DBcontrol
-{
-    private $servername;//= "dev-test-mysql:3306";
-
-    private $username ;// = "root";
-
-    private $password ;//= "root";
-
-    private $con;
-
-    public function __construct($dburl, $dbname, $dbpasswd)
-    {
-        $this->password = $dbpasswd;
-        $this->username = $dbname;
-        $this->servername = $dburl;
-    }
-
-    public function connectDb()
-    {
-        $this->con = new PDO("mysql:host=".$this->servername, $this->username,$this->password);
-    }
-
-    public function getData1()
-    {
-        $ret = array();
-        $sql = 'show databases;';
-        foreach ($this->con->query($sql) as $row) {
-            $ret[] = $row;
-        }
-        return $ret;
-    }
-
-    /**
-     * @param $a
-     * @return array
-     */
-    public function getData2()
-    {
-        $ret = array();
-        $sql = 'illegal sql';
-        $ret[] = $this->con->exec($sql) ;
-        $this->con->errorCode();
-        return $ret;
-    }
-}
\ No newline at end of file
diff --git a/testapps/PHP/app/Doctor.php b/testapps/PHP/app/Doctor.php
deleted file mode 100644
index ea36db796..000000000
--- a/testapps/PHP/app/Doctor.php
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-
-
-namespace app;
-
-
-class Doctor extends Person
-{
-    function other(){
-        echo "nothing<br/>";
-        return "nothing";
-    }
-}
\ No newline at end of file
diff --git a/testapps/PHP/app/NotWatchingAppDate.php b/testapps/PHP/app/NotWatchingAppDate.php
deleted file mode 100644
index 513a2b26f..000000000
--- a/testapps/PHP/app/NotWatchingAppDate.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-
-namespace app;
-
-
-class NotWatchingAppDate
-{
-    static function outputDate(){
-        echo date("Y/m/d")."<br>";
-        echo getenv('REMOTE_ADDR')."<br>";
-        echo getenv('HTTP_HOST')."<br>";
-        echo getenv('HTTP_X_FORWARDED_FOR')."<br>";
-        echo getenv('HTTP_X_FORWARDED_HOST')."<br>";
-        echo getenv('HTTP_X_FORWARDED_SERVER')."<br>";
-//        throw new \Exception("I want throw something");
-//        print_r(ini_get_all('pinpoint_php'));
-//        echo ini_get('pinpoint_php.CollectorHost')."\n";
-//        echo ini_get('pinpoint_php.SendSpanTimeOutMs')."\n";
-//        var_dump(ini_get('pinpoint_php.UnitTest"'));
-//
-//        echo ini_get('pinpoint_php.AppId')."\n";
-//
-//        echo ini_get('pinpoint_php.StartTime');
-//        print_r($_SERVER);
-    }
-}
diff --git a/testapps/PHP/app/OverRideLevel.php b/testapps/PHP/app/OverRideLevel.php
deleted file mode 100644
index d2b84cd49..000000000
--- a/testapps/PHP/app/OverRideLevel.php
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-
-
-namespace app;
-
-#app\OverRideLevel::public_function app\OverRideLevel::protected_function function app\OverRideLevel::private_function
-class OverRideLevel extends LevelClass
-{
-    protected function protected_function($a)
-    {
-        parent::protected_function($a); // TODO: Change the autogenerated stub
-        echo "Protected func in subclass";
-        return $a;
-    }
-
-    public function public_function($a)
-    {
-        parent::public_function($a); // TODO: Change the autogenerated stub
-        echo "Public func in subclass";
-        return $a;
-    }
-}
\ No newline at end of file
diff --git a/testapps/PHP/app/Person.php b/testapps/PHP/app/Person.php
deleted file mode 100644
index 342a4b83e..000000000
--- a/testapps/PHP/app/Person.php
+++ /dev/null
@@ -1,12 +0,0 @@
-<?php
-
-
-namespace app;
-
-class Person
-{
-    function eat(){
-        echo "father eating!<br/>";
-        return "father";
-    }
-}
\ No newline at end of file
diff --git a/testapps/PHP/app/Student.php b/testapps/PHP/app/Student.php
deleted file mode 100644
index 4162666fc..000000000
--- a/testapps/PHP/app/Student.php
+++ /dev/null
@@ -1,14 +0,0 @@
-<?php
-
-
-namespace app;
-use app\Person;
-
-class Student extends Person
-{
-    function eat()
-    {
-        echo "Student eating<br/>";
-        return "Student";
-    }
-}
\ No newline at end of file
diff --git a/testapps/PHP/app/Teacher.php b/testapps/PHP/app/Teacher.php
deleted file mode 100644
index 755ca70e8..000000000
--- a/testapps/PHP/app/Teacher.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-
-
-namespace app;
-
-
-class Teacher extends Person
-{
-    function eat()
-    {
-        echo parent::eat(); // TODO: Change the autogenerated stub
-        echo "Teacher eating too!<br/>";
-        return "teacher";
-    }
-}
\ No newline at end of file
diff --git a/testapps/PHP/app/TestArgs.php b/testapps/PHP/app/TestArgs.php
deleted file mode 100644
index 6a7ab9c10..000000000
--- a/testapps/PHP/app/TestArgs.php
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
-
-
-namespace app;
-
-
-class TestArgs
-{
-    public function  test_args($null_arg, $long_arg, $double_arg, $bool_arg, $array_arg, $object_arg, $object_tostring_arg, $string_arg, $resource_arg, $constant_arg){
-        echo $null_arg.'<br>', $long_arg.'<br>', $double_arg.'<br>', $bool_arg.'<br>', $object_tostring_arg.'<br>', $string_arg.'<br>', $constant_arg.'<br>';
-        var_dump($array_arg);
-        echo '<br>';
-        var_dump($object_arg);
-        echo '<br>';
-        var_dump($resource_arg);
-        echo '<br>';
-    }
-}
\ No newline at end of file
diff --git a/testapps/PHP/app/TestFinalFunc.php b/testapps/PHP/app/TestFinalFunc.php
deleted file mode 100644
index 74e1d9cc7..000000000
--- a/testapps/PHP/app/TestFinalFunc.php
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-
-
-namespace app;
-
-
-class TestFinalFunc
-{
-    public final function test($a) {
-        echo "Final function test() called\n";
-        return $a;
-    }
-}
\ No newline at end of file
diff --git a/testapps/PHP/app/TestPDO.php b/testapps/PHP/app/TestPDO.php
deleted file mode 100644
index eb3e49b20..000000000
--- a/testapps/PHP/app/TestPDO.php
+++ /dev/null
@@ -1,74 +0,0 @@
-<?php
-/**
- * User: eeliu
- * Date: 1/4/19
- * Time: 2:32 PM
- */
-
-namespace app;
-use Exception;
-use \PDO;
-use app\User;
-
-
-class TestPDO
-{
-    private $con;
-
-    public function connectDb()
-    {
-        $dsn = 'mysql:host=dev-mysql;port=3306;dbname=pinpoint';
-        $this->con = new PDO($dsn, "root","root");
-    }
-
-    public function getData1()
-    {
-        $ret = array();
-        $sql = 'show databases;';
-        foreach ($this->con->query($sql) as $row) {
-            $ret[] = $row;
-        }
-        return $ret;
-    }
-
-    public function getData2($a)
-    {
-        $this->con->query("use pinpoint;");
-//        $ret = array();
-        $sql = 'illegal sql';
-        $ret = $this->con->query($a);
-        $data = $ret->fetchAll();
-        return $data;
-    }
-
-    public function getData3($a)
-    {
-        $this->con->query("use pinpoint;");
-        $sth = $this->con->prepare($a);
-        $ret = $sth->execute();
-        return $ret;
-    }
-
-    public function testerror($a)
-    {
-        $this->con->exec("INSERT INTO bones(skull) VALUES ('lucy')");
-        print $this->con->errorCode();
-    }
-
-    public function testPODStatement()
-    {
-        $sql = "select number,name,email from puser where user_id=:user_id";
-        $sth = $this->con->prepare($sql);
-        $code = '1';
-        $sth->bindParam(':user_id', $code, PDO::PARAM_STR,12);
-        $sth->execute();
-        
-        $sth->bindColumn(1, $name_out);
-        $sth->bindColumn(2, $code_out);
-
-        $result = $sth->fetchAll(PDO::FETCH_BOUND);
-        var_dump($code_out);
-        var_dump($name_out);
-        var_dump($result);
-    }
-}
\ No newline at end of file
diff --git a/testapps/PHP/app/index.html b/testapps/PHP/app/index.html
deleted file mode 100644
index 02372ce8a..000000000
--- a/testapps/PHP/app/index.html
+++ /dev/null
@@ -1,283 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
-    <meta charset="UTF-8">
-    <title>pinpoint-php demo</title>
-</head>
-
-<body>
-
-<h3>Simple server</h3>
-
-<form method="get" action="index.php">
-    <table border="1">
-        <tr>
-            <th>Link</th>
-            <th>Description</th>
-        </tr>
-        <tr>
-            <th>
-                Call internal function "date".
-            </th>
-            <th>
-                <button type="submit" name="type" value="get_date"> click me </button>
-            </th>
-        </tr>
-
-        <tr>
-            <th>
-                Call user-defined function.
-            </th>
-            <th>
-                <button type="submit" name="type" value="test_func1"> click me </button>
-            </th>
-        </tr>
-
-        <tr>
-            <th>
-                Call user-defined function in a namespace
-            </th>
-            <th>
-                <button type="submit" name="type" value="test_func2_caller"> click me </button>
-            </th>
-        </tr>
-
-        <tr>
-            <th>
-                Call inherit function
-            </th>
-            <th>
-                <button type="submit" name="type" value="test_inherit_func"> click me </button>
-            </th>
-        </tr>
-
-        <tr>
-            <th>
-                Call generator
-            </th>
-            <th>
-                <button type="submit" name="type" value="test_generator_func"> click me </button>
-            </th>
-        </tr>
-
-        <tr>
-            <th>
-                Call abstract function
-            </th>
-            <th>
-                <button type="submit" name="type" value="test_abstract_func"> click me </button>
-            </th>
-        </tr>
-
-        <tr>
-            <th>
-                Call interface function
-            </th>
-            <th>
-                <button type="submit" name="type" value="test_interface_func"> click me </button>
-            </th>
-        </tr>
-
-        <tr>
-            <th>
-                Call Clone
-            </th>
-            <th>
-                <button type="submit" name="type" value="test_clone"> click me </button>
-            </th>
-        </tr>
-
-        <tr>
-            <th>
-                Call Recursion
-            </th>
-            <th>
-                <button type="submit" name="type" value="test_recursion"> click me </button>
-            </th>
-        </tr>
-
-        <tr>
-            <th>
-                Call function in Anonymous
-            </th>
-            <th>
-                <button type="submit" name="type" value="test_anonymous"> click me </button>
-            </th>
-        </tr>
-
-        <tr>
-            <th>
-                Call Static function
-            </th>
-            <th>
-                <button type="submit" name="type" value="test_static"> click me </button>
-            </th>
-        </tr>
-
-        <tr>
-            <th>
-                Call function in final class
-            </th>
-            <th>
-                <button type="submit" name="type" value="test_final_class"> click me </button>
-            </th>
-        </tr>
-
-        <tr>
-            <th>
-                Call final function
-            </th>
-            <th>
-                <button type="submit" name="type" value="test_final_func"> click me </button>
-            </th>
-        </tr>
-
-        <tr>
-            <th>
-                Call function in trait
-            </th>
-            <th>
-                <button type="submit" name="type" value="test_trait"> click me </button>
-            </th>
-        </tr>
-
-        <tr>
-            <th>
-                Callback function
-            </th>
-            <th>
-                <button type="submit" name="type" value="test_callback"> click me </button>
-            </th>
-        </tr>
-
-        <tr>
-            <th>
-                Call function with different access
-            </th>
-            <th>
-                <button type="submit" name="type" value="test_level"> click me </button>
-            </th>
-        </tr>
-
-        <tr>
-            <th>
-                Call function with args
-            </th>
-            <th>
-                <button type="submit" name="type" value="test_args"> click me </button>
-            </th>
-        </tr>
-
-        <tr>
-            <th>
-                Call function return datas
-            </th>
-            <th>
-                <button type="submit" name="type" value="test_return"> click me </button>
-            </th>
-        </tr>
-
-    </table>
-</form>
-
-    <h3>Error and exception</h3>
-
-    <form method="get" action="index.php">
-        <table border="2">
-            <tr>
-                <th>Link</th>
-                <th>Description</th>
-            </tr>
-
-            <tr>
-                <th>
-                    Call undefined function.
-                </th>
-
-                <th>
-                    <button type="submit" name="type"
-                            value="test_call_undefined_function"> click me </button>
-                </th>
-            </tr>
-            <tr>
-                <th>
-                    Call Static
-                </th>
-
-                <th>
-                    <button type="submit" name="type"
-                            value="test_call_static"> click me </button>
-                </th>
-            </tr>
-
-            <tr>
-                <th>
-                    Call uncaught exception
-                </th>
-
-                <th>
-                    <button type="submit" name="type" value="test_uncaught_exception"> click me </button>
-                </th>
-            </tr>
-
-            <tr>
-                <th>
-                    Call caught exception
-                </th>
-
-                <th>
-                    <button type="submit" name="type" value="test_caught_exception"> click me </button>
-                </th>
-            </tr>
-
-            <tr>
-                <th>
-                    Call exception in recursion
-                </th>
-
-                <th>
-                    <button type="submit" name="type" value="test_exception_recursion"> click me </button>
-                </th>
-            </tr>
-        </table>
-    </form>
-
-    <h3>Test curl</h3>
-    <form method="get" action="index.php">
-        remote url: <input type="text"  name="remote" value="http://10.34.130.156:8989"/>
-        <input type="submit" name="type" value="test_curl">
-    </form>
-
-    <h3>Test PDO</h3>
-    <form method="get" action="index.php">
-        <input type="submit" name="type" value="test_pdo">
-    </form>
-
-    <h3>Test mysqli</h3>
-    <form method="get" action="index.php">
-        <input type="submit" name="type" value="test_mysqli">
-    </form>
-
-    <h3>Test redis</h3>
-    <form method="get" action="index.php">
-        <input type="submit" name="type" value="test_redis">
-    </form>
-
-    <h3>Test memcached</h3>
-    <form method="get" action="index.php">
-        <input type="submit" name="type" value="test_memcached">
-    </form>
-
-    <h3>Test kafka</h3>
-    <form method="get" action="index.php">
-        <input type="submit" name="type" value="test_kafka">
-    </form>
-
-    <h3>Test Guzzle</h3>
-    <form method="get" action="index.php">
-        <input type="submit" name="type" value="test_guzzle">
-    </form>
-
-</body>
-
-</html>
diff --git a/testapps/PHP/app/index.php b/testapps/PHP/app/index.php
deleted file mode 100644
index 8a4c6a352..000000000
--- a/testapps/PHP/app/index.php
+++ /dev/null
@@ -1,270 +0,0 @@
-<?php
-/**
- * User: eeliu
- * Date: 1/4/19
- * Time: 2:29 PM
- */
-
-require_once __DIR__."/../vendor/autoload.php";
-#################################################
-define('AOP_CACHE_DIR',__DIR__.'/../Cache/');
-define('PLUGINS_DIR',__DIR__.'/../Plugins/');
-define('USER_DEFINED_CLASS_MAP_IMPLEMENT',"\Plugins\Framework\app\ClassMapInFile");
-define('APPLICATION_NAME','APP-2');
-define('APPLICATION_ID','app-2');
-define('PINPOINT_USE_CACHE','NO');
-define('PP_REQ_PLUGINS', '\Plugins\PerRequestPlugins');
-require_once __DIR__. '/../vendor/pinpoint-apm/pinpoint-php-aop/auto_pinpointed.php';
-
-#################################################
-require_once __DIR__.'/Args.php';
-
-use app\AppDate;
-use app\AopFunction;
-use app\TestError;
-use app\AccessRemote;
-use app\Teacher;
-use app\Doctor;
-use app\Student;
-use app\TestGenerator;
-use app\AbstractStudent;
-use app\InterfaceStudent;
-use app\TestClone;
-use app\TestRecursion;
-use app\TestAnonymous;
-use app\TestStatic;
-use app\TestFinalClass;
-use app\TestFinalFunc;
-use app\TestTrait;
-use app\CallBackFunc;
-use app\LevelClass;
-use app\ExtendLevel;
-use app\OverRideLevel;
-use app\TestArgs;
-use app\TestReturn;
-use app\TestPDO;
-use app\TestMysqli;
-use app\TestRedis;
-use app\TestMemcached;
-use app\TestMongo;
-use app\TestGuzzle;
-$type = null;
-if(isset($_GET["type"]))
-{
-    $type =  $_GET["type"];
-}
-
-if (!function_exists('getallheaders'))
-{
-    function getallheaders()
-    {
-        $headers = [];
-        foreach ($_SERVER as $name => $value)
-        {
-            $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;
-        }
-        return $headers;
-    }
-}
-
-//print_r(getallheaders());
-
-
-//if(isset($_SERVER[PINPOINTID]) && isset($_SERVER[NEXTSPAN]))
-//{
-//    echo $_SERVER[PINPOINTID] , $_SERVER[NEXTSPAN];
-//}
-
-switch($type)
-{
-    case 'get_date':
-        AppDate::outputDate();
-        break;
-    case 'test_func1':
-        $instance = new AopFunction();
-        echo $instance->test_func1("one", 3);
-        break;
-    case 'test_func2_caller':
-        $instance = new AopFunction();
-        $instance->test_func2();
-        break;
-    case 'test_inherit_func':
-        $instance = new Student();
-        $instance->eat();
-        $instance = new Teacher();
-        $instance->eat();
-        $instance = new Doctor();
-        $instance->eat();
-        $instance->other();
-        break;
-    case 'test_generator_func':
-        $instance = new TestGenerator();
-        foreach ($instance->generator(1, 10, 2) as $number){echo $number;}
-        break;
-    case 'test_abstract_func':
-        $instance = new AbstractStudent("Evy");
-        echo $instance->eat();
-        echo $instance->drink();
-        echo $instance->breath();
-        break;
-    case 'test_interface_func':
-        $instance = new InterfaceStudent();
-        $instance->setVariable("Evy", "Hua");
-        $instance->setVariable("Sam", "Wei");
-        echo $instance->getHtml("Hello {Evy}");
-        echo $instance->other("Evy");
-        break;
-    case 'test_clone':
-        $instance1 = new TestClone();
-        $instance2 = clone $instance1;
-        $instance2->setColor("green");
-        echo $instance2->getColor();
-        $instance1->setColor("red");
-        echo $instance1->getColor();
-        break;
-    case 'test_recursion':
-        $instance = new TestRecursion();
-        echo $instance->test_cumsum1(3);
-        echo $instance->test_cumsum2(3);
-        break;
-    case 'test_anonymous':
-        $instance = new TestAnonymous();
-        $bell = $instance->createbell(date("Y/m/d"));
-        $bell();
-        break;
-    case 'test_static':
-        TestStatic::static_func(123);
-        break;
-    case 'test_final_class':
-        $instance = new TestFinalClass();
-        $instance->test();
-//        class swtest1 extends TestFinalClass{};
-        break;
-    case 'test_final_func':
-        $instance = new TestFinalFunc();
-        $instance->test("abc");
-//        class swtest2 extends app\TestFinalFunc
-//        {
-//            public final function test(){
-//                echo "123";
-//            }
-//        }
-        break;
-    case 'test_trait':
-        $instance = new TestTrait();
-        echo $instance->traitfunc("Evy");
-        $instance->test();
-        break;
-    case 'test_callback':
-        $className = "app\CallBackFunc";
-        $funcName = "fnCallback1";
-        $instance = new CallBackFunc();
-        call_user_func_array(array($className, $funcName), array("hello", "world"));
-        call_user_func_array(array($instance,"fnCallback2"), array("hello", "world"));
-        break;
-    case 'test_level':
-        $instance = new LevelClass();
-        $instance->public_function(123);
-        $instance = new ExtendLevel();
-        $instance->public_function(123);
-        $instance = new OverRideLevel();
-        $instance->public_function(123);
-        break;
-    case 'test_args':
-        $myfile = fopen(__DIR__.'/Args.php', "r");
-        $instance = new TestArgs();
-        $instance->test_args(null, 123, 3.1415, true, array(1, 2), new SObject(1), new SObjectString("ObjToString"), "abcd", $myfile, constant("GREETING"));
-        break;
-    case 'test_return':
-        $myfile = fopen(__DIR__.'/Args.php', "r");
-        $instance = new TestReturn();
-        $args = array(null, 123, 3.1415, true, array(1, 2), new SObject(1), new SObjectString("ObjToString"), "abcd", $myfile, constant("GREETING"));
-        foreach($args as $value){
-            var_dump($instance->test_return($value));
-        }
-        break;
-    case 'test_uncaught_exception':
-        TestError::throwException();
-        break;
-    case 'test_caught_exception':
-        TestError::caughtException();
-        break;
-    case 'test_exception_recursion':
-        TestError::test_cumsum_e1(3);
-        break;
-    case 'test_call_undefined_function':
-        $error = new TestError();
-        try {
-            $error->error();
-            $error->test_cumsum_e1(3);
-            $p = 123;
-            $error->testRetConst($p, '23');
-            $error->testRetParm($p, '23');
-            $error->testRetConstAndExp($p);
-            $error->testRetArgAndExp($p);
-            $error->testParseError();
-            $error->testTypeError("abc");
-            $error->testArithmeticError();
-            $error->testDivisionByZeroError();
-            $error->testAssertionError();
-        }catch (Exception $ex){
-            echo "Catch exception $ex";
-        }
-        break;
-    case 'test_call_static':
-        TestError::Strict();
-        break;
-    case 'test_curl':
-        $acr =  new AccessRemote();
-        $acr->gotoUrl($_GET['remote']);
-        break;
-    case 'test_pdo':
-        $pdo =  new TestPDO();
-        $pdo->connectDb();
-        // var_dump($pdo->getData1());
-        // echo "<br>";
-        // var_dump($pdo->getData2("select name from user;"));
-        // echo "<br>";
-        // var_dump($pdo->getData3("select * from user;"));
-        $pdo->testPODStatement();
-        break;
-    case 'test_mysqli':
-        $pdo =  new TestMysqli();
-        $pdo->connectDb();
-        var_dump($pdo->getData1());
-        echo "<br>";
-        var_dump($pdo->getData2("select * from user;"));
-        break;
-    case 'test_redis':
-        $rd = new TestRedis();
-        $rd->connect_redis();
-        $rd->setdata("cat", "HuaMer");
-        $rd->getdata("cat");
-        $rd->getkey();
-        $rd->deldata("cat");
-        break;
-    case 'test_memcached':
-        $mc = new TestMemcached();
-        $mc->mem_connect();
-        $mc->mem_add("cat", "HuaMer");
-        echo $mc->mem_get("cat");
-        $mc->mem_replace("cat", "Miao");
-        $mc->mem_del("cat");
-        break;
-    case 'test_mongodb':
-        $mo = new TestMongo('mongodb://mongo-dev:27017/');
-        $mo->testAll();
-        break;
-    case 'test_guzzle':
-        $guzzle = new TestGuzzle();
-        $guzzle->gotoV();
-        $guzzle->gotofoo();
-        break;
-    case  'test_kafka':
-        $test = new \app\TestKafka();
-        $test->test();
-        break;
-    default:
-        echo "not supported type $type";
-}
-
diff --git a/testapps/PHP/app/index_app_3.php b/testapps/PHP/app/index_app_3.php
deleted file mode 100644
index affda0509..000000000
--- a/testapps/PHP/app/index_app_3.php
+++ /dev/null
@@ -1,252 +0,0 @@
-<?php
-/**
- * User: eeliu
- * Date: 1/4/19
- * Time: 2:29 PM
- */
-
-define('AUTOLOAD_FILE_ALIAS',__DIR__."/../vendor/autoload.php");
-define('AOP_CACHE_DIR',__DIR__.'/../Cache/');
-define('PLUGINS_DIR',__DIR__.'/../Plugins/');
-define('APPLICATION_NAME','APP-33');
-define('APPLICATION_ID','app-33');
-
-require_once __DIR__. '/../vendor/naver/pinpoint-php-aop/auto_pinpointed.php';
-require_once __DIR__.'/Args.php';
-//require_once __DIR__."/../vendor/autoload.php";
-
-//require_once AUTOLOAD_FILE_ALIAS;
-use app\AppDate;
-use app\AopFunction;
-use app\TestError;
-use app\AccessRemote;
-use app\Teacher;
-use app\Doctor;
-use app\Student;
-use app\TestGenerator;
-use app\AbstractStudent;
-use app\InterfaceStudent;
-use app\TestClone;
-use app\TestRecursion;
-use app\TestAnonymous;
-use app\TestStatic;
-use app\TestFinalClass;
-use app\TestFinalFunc;
-use app\TestTrait;
-use app\CallBackFunc;
-use app\LevelClass;
-use app\ExtendLevel;
-use app\OverRideLevel;
-use app\TestArgs;
-use app\TestReturn;
-use app\TestPDO;
-use app\TestMysqli;
-use app\TestRedis;
-use app\TestMemcached;
-
-$type = null;
-if(isset($_GET["type"]))
-{
-    $type =  $_GET["type"];
-}
-
-if (!function_exists('getallheaders'))
-{
-    function getallheaders()
-    {
-        $headers = [];
-        foreach ($_SERVER as $name => $value)
-        {
-            $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;
-        }
-        return $headers;
-    }
-}
-
-//print_r(getallheaders());
-
-
-//if(isset($_SERVER[PINPOINTID]) && isset($_SERVER[NEXTSPAN]))
-//{
-//    echo $_SERVER[PINPOINTID] , $_SERVER[NEXTSPAN];
-//}
-
-switch($type)
-{
-    case 'get_date':
-        AppDate::outputDate();
-        break;
-    case 'test_func1':
-        $instance = new AopFunction();
-        echo $instance->test_func1("one", 3);
-        break;
-    case 'test_func2_caller':
-        $instance = new AopFunction();
-        $instance->test_func2();
-        break;
-    case 'test_inherit_func':
-        $instance = new Student();
-        $instance->eat();
-        $instance = new Teacher();
-        $instance->eat();
-        $instance = new Doctor();
-        $instance->eat();
-        $instance->other();
-        break;
-    case 'test_generator_func':
-        $instance = new TestGenerator();
-        foreach ($instance->generator(1, 10, 2) as $number){echo $number;}
-        break;
-    case 'test_abstract_func':
-        $instance = new AbstractStudent("Evy");
-        echo $instance->eat();
-        echo $instance->drink();
-        echo $instance->breath();
-        break;
-    case 'test_interface_func':
-        $instance = new InterfaceStudent();
-        $instance->setVariable("Evy", "Hua");
-        $instance->setVariable("Sam", "Wei");
-        echo $instance->getHtml("Hello {Evy}");
-        echo $instance->other("Evy");
-        break;
-    case 'test_clone':
-        $instance1 = new TestClone();
-        $instance2 = clone $instance1;
-        $instance2->setColor("green");
-        echo $instance2->getColor();
-        $instance1->setColor("red");
-        echo $instance1->getColor();
-        break;
-    case 'test_recursion':
-        $instance = new TestRecursion();
-        echo $instance->test_cumsum1(3);
-        echo $instance->test_cumsum2(3);
-        break;
-    case 'test_anonymous':
-        $instance = new TestAnonymous();
-        $bell = $instance->createbell(date("Y/m/d"));
-        $bell();
-        break;
-    case 'test_static':
-        TestStatic::static_func(123);
-        break;
-    case 'test_final_class':
-        $instance = new TestFinalClass();
-        $instance->test();
-//        class swtest1 extends TestFinalClass{};
-        break;
-    case 'test_final_func':
-        $instance = new TestFinalFunc();
-        $instance->test("abc");
-//        class swtest2 extends app\TestFinalFunc
-//        {
-//            public final function test(){
-//                echo "123";
-//            }
-//        }
-        break;
-    case 'test_trait':
-        $instance = new TestTrait();
-        echo $instance->traitfunc("Evy");
-        $instance->test();
-        break;
-    case 'test_callback':
-        $className = "app\CallBackFunc";
-        $funcName = "fnCallback1";
-        $instance = new CallBackFunc();
-        call_user_func_array(array($className, $funcName), array("hello", "world"));
-        call_user_func_array(array($instance,"fnCallback2"), array("hello", "world"));
-        break;
-    case 'test_level':
-        $instance = new LevelClass();
-        $instance->public_function(123);
-        $instance = new ExtendLevel();
-        $instance->public_function(123);
-        $instance = new OverRideLevel();
-        $instance->public_function(123);
-        break;
-    case 'test_args':
-        $myfile = fopen(__DIR__.'/Args.php', "r");
-        $instance = new TestArgs();
-        $instance->test_args(null, 123, 3.1415, true, array(1, 2), new SObject(1), new SObjectString("ObjToString"), "abcd", $myfile, constant("GREETING"));
-        break;
-    case 'test_return':
-        $myfile = fopen(__DIR__.'/Args.php', "r");
-        $instance = new TestReturn();
-        $args = array(null, 123, 3.1415, true, array(1, 2), new SObject(1), new SObjectString("ObjToString"), "abcd", $myfile, constant("GREETING"));
-        foreach($args as $value){
-            var_dump($instance->test_return($value));
-        }
-        break;
-    case 'test_uncaught_exception':
-        TestError::throwException();
-        break;
-    case 'test_caught_exception':
-        TestError::caughtException();
-        break;
-    case 'test_exception_recursion':
-        TestError::test_cumsum_e1(3);
-        break;
-    case 'test_call_undefined_function':
-        $error = new TestError();
-        try {
-            $error->error();
-            $error->test_cumsum_e1(3);
-            $p = 123;
-            $error->testRetConst($p, '23');
-            $error->testRetParm($p, '23');
-            $error->testRetConstAndExp($p);
-            $error->testRetArgAndExp($p);
-            $error->testParseError();
-            $error->testTypeError("abc");
-            $error->testArithmeticError();
-            $error->testDivisionByZeroError();
-            $error->testAssertionError();
-        }catch (Exception $ex){
-            echo "Catch exception $ex";
-        }
-        break;
-    case 'test_call_static':
-        TestError::Strict();
-        break;
-    case 'test_curl':
-        $acr =  new AccessRemote();
-        $acr->gotoUrl($_GET['remote']);
-        break;
-    case 'test_pdo':
-        $pdo =  new TestPDO();
-        $pdo->connectDb();
-        var_dump($pdo->getData1());
-        echo "<br>";
-        var_dump($pdo->getData2("select name from user;"));
-        echo "<br>";
-        var_dump($pdo->getData3("select * from user;"));
-        break;
-    case 'test_mysqli':
-        $pdo =  new TestMysqli();
-        $pdo->connectDb();
-        var_dump($pdo->getData1());
-        echo "<br>";
-        var_dump($pdo->getData2("select * from user;"));
-        break;
-    case 'test_redis':
-        $rd = new TestRedis();
-        $rd->connect_redis();
-        $rd->setdata("cat", "HuaMer");
-        $rd->getdata("cat");
-        $rd->getkey();
-        $rd->deldata("cat");
-        break;
-    case 'test_memcached':
-        $mc = new TestMemcached();
-        $mc->mem_connect();
-        $mc->mem_add("cat", "HuaMer");
-        $mc->mem_get("cat");
-        $mc->mem_replace("cat", "Miao");
-        $mc->mem_del("cat");
-        break;
-    default:
-        echo "not supported type $type";
-}
-
diff --git a/testapps/PHP/app/non_aop_index.php b/testapps/PHP/app/non_aop_index.php
deleted file mode 100644
index f510521e5..000000000
--- a/testapps/PHP/app/non_aop_index.php
+++ /dev/null
@@ -1,24 +0,0 @@
-<?php
-require_once __DIR__."/../vendor/autoload.php";
-
-use app\NotWatchingAppDate;
-
-
-$type = null;
-if(isset($_GET["type"]))
-{
-    $type =  $_GET["type"];
-}
-
-switch ($type)
-{
-    case "test_get_data":
-        NotWatchingAppDate::outputDate();
-        break;
-    default:
-        echo "not found $type";
-        break;
-}
-
-
-
diff --git a/testapps/PHP/application/.htaccess b/testapps/PHP/application/.htaccess
new file mode 100644
index 000000000..3418e55a6
--- /dev/null
+++ b/testapps/PHP/application/.htaccess
@@ -0,0 +1,1 @@
+deny from all
\ No newline at end of file
diff --git a/testapps/PHP/application/command.php b/testapps/PHP/application/command.php
new file mode 100644
index 000000000..826bb2b23
--- /dev/null
+++ b/testapps/PHP/application/command.php
@@ -0,0 +1,12 @@
+<?php
+// +----------------------------------------------------------------------
+// | ThinkPHP [ WE CAN DO IT JUST THINK ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+// +----------------------------------------------------------------------
+// | Author: yunwuxin <448901948@qq.com>
+// +----------------------------------------------------------------------
+
+return [];
diff --git a/testapps/PHP/application/common.php b/testapps/PHP/application/common.php
new file mode 100644
index 000000000..55d22f266
--- /dev/null
+++ b/testapps/PHP/application/common.php
@@ -0,0 +1,12 @@
+<?php
+// +----------------------------------------------------------------------
+// | ThinkPHP [ WE CAN DO IT JUST THINK ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+// +----------------------------------------------------------------------
+// | Author: 流年 <liu21st@gmail.com>
+// +----------------------------------------------------------------------
+
+// 应用公共文件
diff --git a/testapps/PHP/app/AbstractPerson.php b/testapps/PHP/application/common/AbstractPerson.php
similarity index 88%
rename from testapps/PHP/app/AbstractPerson.php
rename to testapps/PHP/application/common/AbstractPerson.php
index 8eb614183..1aa195338 100644
--- a/testapps/PHP/app/AbstractPerson.php
+++ b/testapps/PHP/application/common/AbstractPerson.php
@@ -1,7 +1,7 @@
 <?php
 
 
-namespace app;
+namespace app\common;
 
 
 abstract class AbstractPerson
@@ -9,6 +9,7 @@ abstract class AbstractPerson
     protected $name;
 //    abstract function eat();
     abstract function drink();
+    
     function breath(){
         return $this->name." is alive.<br/>";
     }
diff --git a/testapps/PHP/app/AbstractStudent.php b/testapps/PHP/application/common/AbstractStudent.php
similarity index 77%
rename from testapps/PHP/app/AbstractStudent.php
rename to testapps/PHP/application/common/AbstractStudent.php
index 5d9c89447..4810d2810 100644
--- a/testapps/PHP/app/AbstractStudent.php
+++ b/testapps/PHP/application/common/AbstractStudent.php
@@ -1,10 +1,10 @@
 <?php
 
 
-namespace app;
-use app\AbstractPerson;
+namespace app\common;
+use app\common\AbstractPerson;
 
-class AbstractStudent extends \app\AbstractPerson
+class AbstractStudent extends AbstractPerson
 {
     protected $name;
     function __construct($name)
diff --git a/testapps/PHP/app/AccessRemote.php b/testapps/PHP/application/common/AccessRemote.php
similarity index 78%
rename from testapps/PHP/app/AccessRemote.php
rename to testapps/PHP/application/common/AccessRemote.php
index a97d8fcc6..ada5b4ded 100644
--- a/testapps/PHP/app/AccessRemote.php
+++ b/testapps/PHP/application/common/AccessRemote.php
@@ -1,7 +1,7 @@
 <?php
 
 
-namespace app;
+namespace app\common;
 
 
 class AccessRemote
@@ -18,10 +18,11 @@ public function gotoUrl($url)
         );
 
         \curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
-        echo \curl_exec($ch);
-
+        $tmp = \curl_exec($ch);
         curl_close($ch);
+        var_dump($tmp);
 //        $this->callExample();
+        return $tmp;
     }
 
     private function callExample()
@@ -30,8 +31,9 @@ private function callExample()
 
         \curl_setopt($ch, CURLOPT_URL, "exmaple.com");
 
-        echo \curl_exec($ch);
+        $tmp = \curl_exec($ch);
 
         curl_close($ch);
+        return $tmp;
     }
 }
\ No newline at end of file
diff --git a/testapps/PHP/app/AopConfig.php b/testapps/PHP/application/common/AopConfig.php
similarity index 100%
rename from testapps/PHP/app/AopConfig.php
rename to testapps/PHP/application/common/AopConfig.php
diff --git a/testapps/PHP/app/AopFunction.php b/testapps/PHP/application/common/AopFunction.php
similarity index 71%
rename from testapps/PHP/app/AopFunction.php
rename to testapps/PHP/application/common/AopFunction.php
index 43cdea6bc..b450d6085 100644
--- a/testapps/PHP/app/AopFunction.php
+++ b/testapps/PHP/application/common/AopFunction.php
@@ -1,7 +1,7 @@
 <?php
 
-namespace app;
-use app1\Foo;
+namespace app\common;
+use app\util\Foo;
 
 class AopFunction
 {
@@ -12,6 +12,6 @@ function test_func1($arg1, $arg2)
 
     function test_func2()
     {
-        Foo::test_func_2("1",23,null);
+        return Foo::test_func_2("1",23,null);
     }
 }
diff --git a/testapps/PHP/app/AppDate.php b/testapps/PHP/application/common/AppDate.php
similarity index 58%
rename from testapps/PHP/app/AppDate.php
rename to testapps/PHP/application/common/AppDate.php
index e6d1852f5..e5ace9bba 100644
--- a/testapps/PHP/app/AppDate.php
+++ b/testapps/PHP/application/common/AppDate.php
@@ -1,18 +1,19 @@
 <?php
 
 
-namespace app;
+namespace app\common;
 
 
 class AppDate
 {
     static function outputDate(){
-        echo date("Y/m/d")."<br>";
-        echo getenv('REMOTE_ADDR')."<br>";
-        echo getenv('HTTP_HOST')."<br>";
-        echo getenv('HTTP_X_FORWARDED_FOR')."<br>";
-        echo getenv('HTTP_X_FORWARDED_HOST')."<br>";
-        echo getenv('HTTP_X_FORWARDED_SERVER')."<br>";
+        return date("Y/m/d")."<br>";
+        // echo getenv('REMOTE_ADDR')."<br>";
+        // echo getenv('HTTP_HOST')."<br>";
+        // echo getenv('HTTP_X_FORWARDED_FOR')."<br>";
+        // echo getenv('HTTP_X_FORWARDED_HOST')."<br>";
+        // echo getenv('HTTP_X_FORWARDED_SERVER')."<br>";
+        // var_dump($_SERVER);
 //        throw new \Exception("I want throw something");
 //        print_r(ini_get_all('pinpoint_php'));
 //        echo ini_get('pinpoint_php.CollectorHost')."\n";
diff --git a/testapps/PHP/app/CallBackFunc.php b/testapps/PHP/application/common/CallBackFunc.php
similarity index 51%
rename from testapps/PHP/app/CallBackFunc.php
rename to testapps/PHP/application/common/CallBackFunc.php
index a5016f028..88fc7c095 100644
--- a/testapps/PHP/app/CallBackFunc.php
+++ b/testapps/PHP/application/common/CallBackFunc.php
@@ -1,17 +1,16 @@
 <?php
 
 
-namespace app;
+namespace app\common;
 
 
 class CallBackFunc
 {
     static function fnCallback1($msg1, $msg2){
-        echo "msg1:".$msg1."<br/>";
-        echo "msg2:".$msg2."<br/>";
+        return "msg1:".$msg1."<br/>"."msg2:".$msg2."<br/>";
     }
 
     public function fnCallback2(){
-        echo "public function.";
+        return "public function.";
     }
 }
\ No newline at end of file
diff --git a/testapps/PHP/application/common/Doctor.php b/testapps/PHP/application/common/Doctor.php
new file mode 100644
index 000000000..14c3fa804
--- /dev/null
+++ b/testapps/PHP/application/common/Doctor.php
@@ -0,0 +1,12 @@
+<?php
+
+
+namespace app\common;
+
+
+class Doctor extends Person
+{
+    function other(){
+        return "nothing<br/>";
+    }
+}
\ No newline at end of file
diff --git a/testapps/PHP/app/ExtendLevel.php b/testapps/PHP/application/common/ExtendLevel.php
similarity index 69%
rename from testapps/PHP/app/ExtendLevel.php
rename to testapps/PHP/application/common/ExtendLevel.php
index c57666d48..eeab6aab6 100644
--- a/testapps/PHP/app/ExtendLevel.php
+++ b/testapps/PHP/application/common/ExtendLevel.php
@@ -1,7 +1,7 @@
 <?php
 
 
-namespace app;
+namespace app\common;
 
 class ExtendLevel extends LevelClass
 {
diff --git a/testapps/PHP/app/Foo.php b/testapps/PHP/application/common/Foo.php
similarity index 98%
rename from testapps/PHP/app/Foo.php
rename to testapps/PHP/application/common/Foo.php
index b7f1378cc..110b482bf 100644
--- a/testapps/PHP/app/Foo.php
+++ b/testapps/PHP/application/common/Foo.php
@@ -1,5 +1,5 @@
 <?php
-namespace app;
+namespace app\common;
 
 class Foo
 {
diff --git a/testapps/PHP/app/FuncInTrait.php b/testapps/PHP/application/common/FuncInTrait.php
similarity index 81%
rename from testapps/PHP/app/FuncInTrait.php
rename to testapps/PHP/application/common/FuncInTrait.php
index 42d481965..a3f32154c 100644
--- a/testapps/PHP/app/FuncInTrait.php
+++ b/testapps/PHP/application/common/FuncInTrait.php
@@ -1,7 +1,7 @@
 <?php
 
 
-namespace app;
+namespace app\common;
 
 
 trait FuncInTrait
diff --git a/testapps/PHP/app/InterfacePerson.php b/testapps/PHP/application/common/InterfacePerson.php
similarity index 85%
rename from testapps/PHP/app/InterfacePerson.php
rename to testapps/PHP/application/common/InterfacePerson.php
index 54a438735..96af86203 100644
--- a/testapps/PHP/app/InterfacePerson.php
+++ b/testapps/PHP/application/common/InterfacePerson.php
@@ -1,7 +1,7 @@
 <?php
 
 
-namespace app;
+namespace app\common;
 
 
 interface InterfacePerson
diff --git a/testapps/PHP/app/InterfaceStudent.php b/testapps/PHP/application/common/InterfaceStudent.php
similarity index 92%
rename from testapps/PHP/app/InterfaceStudent.php
rename to testapps/PHP/application/common/InterfaceStudent.php
index f4c29e6ba..3d0f0109a 100644
--- a/testapps/PHP/app/InterfaceStudent.php
+++ b/testapps/PHP/application/common/InterfaceStudent.php
@@ -1,7 +1,7 @@
 <?php
 
 
-namespace app;
+namespace app\common;
 
 
 class InterfaceStudent implements InterfacePerson
@@ -20,7 +20,6 @@ public function getHtml($template)
     }
     public function other($vars)
     {
-        var_dump($vars);
         return $vars;
     }
 }
\ No newline at end of file
diff --git a/testapps/PHP/app/LevelClass.php b/testapps/PHP/application/common/LevelClass.php
similarity index 52%
rename from testapps/PHP/app/LevelClass.php
rename to testapps/PHP/application/common/LevelClass.php
index 46cb51868..b23848e89 100644
--- a/testapps/PHP/app/LevelClass.php
+++ b/testapps/PHP/application/common/LevelClass.php
@@ -1,26 +1,23 @@
 <?php
 
 
-namespace app;
+namespace app\common;
 
 #app\LevelClass::public_function app\LevelClass::protected_function function app\LevelClass::private_function
 class LevelClass
 {
     private function private_function($a){
-        echo "Private!";
-        return $a;
+        return "Private!".$a;
     }
 
     protected function protected_function($a){
-        echo "Protected!";
-        $this->private_function(123);
-        return $a;
+        $tmp = $this->private_function(123);
+        return "Protected!".$a;
     }
 
     public function public_function($a){
-        echo "Public!";
-        $this->private_function(123);
-        $this->protected_function(123);
-        return $a;
+        $tmp1 = $this->private_function(123);
+        $tmp2 = $this->protected_function(123);
+        return "Public!".$a;
     }
 }
\ No newline at end of file
diff --git a/testapps/PHP/application/common/OverRideLevel.php b/testapps/PHP/application/common/OverRideLevel.php
new file mode 100644
index 000000000..6ed5eb42d
--- /dev/null
+++ b/testapps/PHP/application/common/OverRideLevel.php
@@ -0,0 +1,21 @@
+<?php
+
+
+namespace app\common;
+
+#app\OverRideLevel::public_function app\OverRideLevel::protected_function function app\OverRideLevel::private_function
+class OverRideLevel extends LevelClass
+{
+    protected function protected_function($a)
+    {
+        $tmp = parent::protected_function($a);
+        return "Protected func in subclass".$a;
+    }
+
+    public function public_function($a)
+    {
+        $tmp1 = $this->protected_function($a);
+        $tmp2 = parent::public_function($a);
+        return "Public func in subclass".$a;
+    }
+}
\ No newline at end of file
diff --git a/testapps/PHP/application/common/Person.php b/testapps/PHP/application/common/Person.php
new file mode 100644
index 000000000..7c67fe7b7
--- /dev/null
+++ b/testapps/PHP/application/common/Person.php
@@ -0,0 +1,11 @@
+<?php
+
+
+namespace app\common;
+
+class Person
+{
+    function eat(){
+        return "father eating!<br/>";
+    }
+}
\ No newline at end of file
diff --git a/testapps/PHP/application/common/Student.php b/testapps/PHP/application/common/Student.php
new file mode 100644
index 000000000..d5564b23c
--- /dev/null
+++ b/testapps/PHP/application/common/Student.php
@@ -0,0 +1,13 @@
+<?php
+
+
+namespace app\common;
+use app\common\Person;
+
+class Student extends Person
+{
+    function eat()
+    {
+        return "Student eating<br/>";
+    }
+}
\ No newline at end of file
diff --git a/testapps/PHP/application/common/Teacher.php b/testapps/PHP/application/common/Teacher.php
new file mode 100644
index 000000000..d3a716760
--- /dev/null
+++ b/testapps/PHP/application/common/Teacher.php
@@ -0,0 +1,14 @@
+<?php
+
+
+namespace app\common;
+
+
+class Teacher extends Person
+{
+    function eat()
+    {
+        $tmp = parent::eat();
+        return $tmp."Teacher eating too!<br/>";
+    }
+}
\ No newline at end of file
diff --git a/testapps/PHP/app/TestAnonymous.php b/testapps/PHP/application/common/TestAnonymous.php
similarity index 66%
rename from testapps/PHP/app/TestAnonymous.php
rename to testapps/PHP/application/common/TestAnonymous.php
index 803aefa1b..5a724c02a 100644
--- a/testapps/PHP/app/TestAnonymous.php
+++ b/testapps/PHP/application/common/TestAnonymous.php
@@ -1,23 +1,23 @@
 <?php
 
 
-namespace app;
-use app\AopFunction;
+namespace app\common;
+use app\common\AopFunction;
 
 class TestAnonymous
 {
     public function createbell($time) {
         return function() use ($time) {
 
-            echo "$time". "di di di  di ...";
+            $res1 = "$time". "di di di  di ...";
             $func1 = new AopFunction();
 //            try{
 //                throw new \Exception("exception in the closure.");
 //            }catch (\Exception $e){
 //                echo $e->getMessage();
 //            }
-            echo $func1->test_func1("x", 3);
-            return $time;
+            $res2 = $func1->test_func1("x", 3);
+            return $res1.$res2;
         };
     }
 }
\ No newline at end of file
diff --git a/testapps/PHP/application/common/TestArgs.php b/testapps/PHP/application/common/TestArgs.php
new file mode 100644
index 000000000..b22bbac60
--- /dev/null
+++ b/testapps/PHP/application/common/TestArgs.php
@@ -0,0 +1,13 @@
+<?php
+
+
+namespace app\common;
+
+
+class TestArgs
+{
+    public function  test_args($null_arg, $long_arg, $double_arg, $bool_arg, $array_arg, $object_arg, $object_tostring_arg, $string_arg, $resource_arg, $constant_arg){
+        $tmp = $null_arg.'<br>'.$long_arg.'<br>'.$double_arg.'<br>'.$bool_arg.'<br>'.$object_tostring_arg.'<br>'.$string_arg.'<br>'.$constant_arg.'<br>';
+        return sprintf("%s<br>%s<br>%s<br>%s",$tmp,implode($array_arg),var_dump($object_arg),var_dump($resource_arg));
+    }
+}
\ No newline at end of file
diff --git a/testapps/PHP/app/TestClone.php b/testapps/PHP/application/common/TestClone.php
similarity index 94%
rename from testapps/PHP/app/TestClone.php
rename to testapps/PHP/application/common/TestClone.php
index 96e0e00cc..dde7b0c0c 100644
--- a/testapps/PHP/app/TestClone.php
+++ b/testapps/PHP/application/common/TestClone.php
@@ -1,7 +1,7 @@
 <?php
 
 
-namespace app;
+namespace app\common;
 
 
 class TestClone
diff --git a/testapps/PHP/app/TestError.php b/testapps/PHP/application/common/TestError.php
similarity index 99%
rename from testapps/PHP/app/TestError.php
rename to testapps/PHP/application/common/TestError.php
index 82dd43a7a..59968c258 100644
--- a/testapps/PHP/app/TestError.php
+++ b/testapps/PHP/application/common/TestError.php
@@ -1,7 +1,7 @@
 <?php
 
 
-namespace app;
+namespace app\common;
 use Exception;
 
 class TestError
diff --git a/testapps/PHP/app/TestFinalClass.php b/testapps/PHP/application/common/TestFinalClass.php
similarity index 52%
rename from testapps/PHP/app/TestFinalClass.php
rename to testapps/PHP/application/common/TestFinalClass.php
index de2bcd7f6..331129302 100644
--- a/testapps/PHP/app/TestFinalClass.php
+++ b/testapps/PHP/application/common/TestFinalClass.php
@@ -1,13 +1,13 @@
 <?php
 
 
-namespace app;
+namespace app\common;
 
 
 final class TestFinalClass
 {
     public function test() {
-        echo "FinalClass::test() called\n";
+        return "FinalClass::test() called\n";
     }
 
 }
\ No newline at end of file
diff --git a/testapps/PHP/application/common/TestFinalFunc.php b/testapps/PHP/application/common/TestFinalFunc.php
new file mode 100644
index 000000000..b20499781
--- /dev/null
+++ b/testapps/PHP/application/common/TestFinalFunc.php
@@ -0,0 +1,12 @@
+<?php
+
+
+namespace app\common;
+
+
+class TestFinalFunc
+{
+    public final function test($a) {
+        return "Final function test() called\n".$a;
+    }
+}
\ No newline at end of file
diff --git a/testapps/PHP/app/TestGenerator.php b/testapps/PHP/application/common/TestGenerator.php
similarity index 84%
rename from testapps/PHP/app/TestGenerator.php
rename to testapps/PHP/application/common/TestGenerator.php
index b2dce72ea..1fd7f7b45 100644
--- a/testapps/PHP/app/TestGenerator.php
+++ b/testapps/PHP/application/common/TestGenerator.php
@@ -1,7 +1,7 @@
 <?php
 
 
-namespace app;
+namespace app\common;
 
 
 class TestGenerator
@@ -15,7 +15,7 @@ function generator($start, $limit, $step=1){
             try{
                 yield $i;
             }catch (Exception $exception){
-                echo $exception->getMessage();
+                return $exception->getMessage();
             }
         }
     }
diff --git a/testapps/PHP/app/TestGuzzle.php b/testapps/PHP/application/common/TestGuzzle.php
similarity index 85%
rename from testapps/PHP/app/TestGuzzle.php
rename to testapps/PHP/application/common/TestGuzzle.php
index fbfedb080..6d2cf026f 100644
--- a/testapps/PHP/app/TestGuzzle.php
+++ b/testapps/PHP/application/common/TestGuzzle.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace app;
+namespace app\common;
 use GuzzleHttp\Client;
 use Psr\Http\Message\ResponseInterface;
 use GuzzleHttp\Exception\RequestException;
@@ -14,7 +14,8 @@ public function __construct()
     {
         $this->client = new Client([
             // Base URI is used with relative requests
-            'base_uri' => 'https://example.org',
+//            'base_uri' => 'http://localhost:8088/',
+            'base_uri' => 'http://www.baidu.com/',
             // You can set any number of default request options.
             'timeout'  => 2.0,
         ]);
@@ -28,7 +29,7 @@ public function gotoV()
 
     public function gotofoo()
     {
-        $response = $this->client->request('GET', 'foo',['query'=>['foo'=>'bar']]);
+        $response = $this->client->request('GET', '/dashboard');
         return $response->getStatusCode();
     }
 
@@ -47,4 +48,4 @@ function (RequestException $e) {
     }
 
 
-}
\ No newline at end of file
+}
diff --git a/testapps/PHP/app/TestKafka.php b/testapps/PHP/application/common/TestKafka.php
similarity index 97%
rename from testapps/PHP/app/TestKafka.php
rename to testapps/PHP/application/common/TestKafka.php
index 990d2ddf1..51f4e8797 100644
--- a/testapps/PHP/app/TestKafka.php
+++ b/testapps/PHP/application/common/TestKafka.php
@@ -5,7 +5,7 @@
  * Time: 10:15 AM
  */
 
-namespace app;
+namespace app\common;
 
 use RdKafka;
 
diff --git a/testapps/PHP/app/TestMemcached.php b/testapps/PHP/application/common/TestMemcached.php
similarity index 97%
rename from testapps/PHP/app/TestMemcached.php
rename to testapps/PHP/application/common/TestMemcached.php
index 344feb9b4..c2de7caf9 100644
--- a/testapps/PHP/app/TestMemcached.php
+++ b/testapps/PHP/application/common/TestMemcached.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace app;
+namespace app\common;
 use Memcached;
 
 class TestMemcached
diff --git a/testapps/PHP/app/TestMongo.php b/testapps/PHP/application/common/TestMongo.php
similarity index 97%
rename from testapps/PHP/app/TestMongo.php
rename to testapps/PHP/application/common/TestMongo.php
index 673d264d8..067ed0bfa 100644
--- a/testapps/PHP/app/TestMongo.php
+++ b/testapps/PHP/application/common/TestMongo.php
@@ -1,5 +1,5 @@
 <?php
-namespace app;
+namespace app\common;
 use MongoDB\Client as mClient;
 
 class TestMongo
diff --git a/testapps/PHP/app/TestMysqli.php b/testapps/PHP/application/common/TestMysqli.php
similarity index 97%
rename from testapps/PHP/app/TestMysqli.php
rename to testapps/PHP/application/common/TestMysqli.php
index 2f1884d11..bacfb70b6 100644
--- a/testapps/PHP/app/TestMysqli.php
+++ b/testapps/PHP/application/common/TestMysqli.php
@@ -5,7 +5,7 @@
  * Time: 2:32 PM
  */
 
-namespace app;
+namespace app\common;
 use mysqli;
 
 
diff --git a/testapps/PHP/app/TestRecursion.php b/testapps/PHP/application/common/TestRecursion.php
similarity index 87%
rename from testapps/PHP/app/TestRecursion.php
rename to testapps/PHP/application/common/TestRecursion.php
index b9b12b446..95cd89bc0 100644
--- a/testapps/PHP/app/TestRecursion.php
+++ b/testapps/PHP/application/common/TestRecursion.php
@@ -1,7 +1,7 @@
 <?php
 
 
-namespace app;
+namespace app\common;
 
 
 class TestRecursion
@@ -9,9 +9,6 @@ class TestRecursion
     public function test_cumsum1($n)
     {
         if ($n == 1) return 1;
-        print '*';
-        var_dump($this);
-        print '*';
 #        if ($n < 1) throw new \Exception("n < 1");
         return $n + $this->test_cumsum1($n - 1);
     }
diff --git a/testapps/PHP/app/TestRedis.php b/testapps/PHP/application/common/TestRedis.php
similarity index 95%
rename from testapps/PHP/app/TestRedis.php
rename to testapps/PHP/application/common/TestRedis.php
index 10ec70e40..9e33d063c 100644
--- a/testapps/PHP/app/TestRedis.php
+++ b/testapps/PHP/application/common/TestRedis.php
@@ -1,7 +1,7 @@
 <?php
 
 
-namespace app;
+namespace app\common;
 
 use Redis;
 
diff --git a/testapps/PHP/app/TestReturn.php b/testapps/PHP/application/common/TestReturn.php
similarity index 81%
rename from testapps/PHP/app/TestReturn.php
rename to testapps/PHP/application/common/TestReturn.php
index 2c690d2fb..380076197 100644
--- a/testapps/PHP/app/TestReturn.php
+++ b/testapps/PHP/application/common/TestReturn.php
@@ -1,7 +1,7 @@
 <?php
 
 
-namespace app;
+namespace app\common;
 
 
 class TestReturn
diff --git a/testapps/PHP/app/TestStatic.php b/testapps/PHP/application/common/TestStatic.php
similarity index 73%
rename from testapps/PHP/app/TestStatic.php
rename to testapps/PHP/application/common/TestStatic.php
index ca2188e7e..bf506e3bc 100644
--- a/testapps/PHP/app/TestStatic.php
+++ b/testapps/PHP/application/common/TestStatic.php
@@ -1,13 +1,12 @@
 <?php
 
 
-namespace app;
+namespace app\common;
 
 
 class TestStatic
 {
     public static function static_func($x) {
-        echo "Test";
         return $x+1;
     }
 }
\ No newline at end of file
diff --git a/testapps/PHP/app/TestTrait.php b/testapps/PHP/application/common/TestTrait.php
similarity index 58%
rename from testapps/PHP/app/TestTrait.php
rename to testapps/PHP/application/common/TestTrait.php
index 33989ce9e..37e2b5ad8 100644
--- a/testapps/PHP/app/TestTrait.php
+++ b/testapps/PHP/application/common/TestTrait.php
@@ -1,13 +1,13 @@
 <?php
 
 
-namespace app;
+namespace app\common;
 
 class TestTrait
 {
     use FuncInTrait;
 
     public function test(){
-        echo "Func not in trait! ";
+        return "Func not in trait! ";
     }
 }
\ No newline at end of file
diff --git a/testapps/PHP/application/common/exception/ExceptionHandler.php b/testapps/PHP/application/common/exception/ExceptionHandler.php
new file mode 100644
index 000000000..2f93dcac5
--- /dev/null
+++ b/testapps/PHP/application/common/exception/ExceptionHandler.php
@@ -0,0 +1,18 @@
+<?php
+namespace app\common\exception;
+
+use Exception;
+use think\exception\Handle;
+use think\exception\HttpException;
+class ExceptionHandler extends Handle
+{
+
+    public function render(Exception $e)
+    {
+        // pinpoint_add_clue("EXP",$e->getMessage());
+        
+        pinpoint_mark_as_error($e->getMessage(), __FILE__);
+        return parent::render($e);
+        }
+
+}
\ No newline at end of file
diff --git a/testapps/PHP/application/config.php b/testapps/PHP/application/config.php
new file mode 100644
index 000000000..08abb57d3
--- /dev/null
+++ b/testapps/PHP/application/config.php
@@ -0,0 +1,243 @@
+<?php
+// +----------------------------------------------------------------------
+// | ThinkPHP [ WE CAN DO IT JUST THINK ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+// +----------------------------------------------------------------------
+// | Author: liu21st <liu21st@gmail.com>
+// +----------------------------------------------------------------------
+
+return [
+    // +----------------------------------------------------------------------
+    // | 应用设置
+    // +----------------------------------------------------------------------
+
+    // 应用调试模式
+    'app_debug'              => true,
+    // 应用Trace
+    'app_trace'              => false,
+    // 应用模式状态
+    'app_status'             => '',
+    // 是否支持多模块
+    'app_multi_module'       => true,
+    // 入口自动绑定模块
+    'auto_bind_module'       => false,
+    // 注册的根命名空间
+    'root_namespace'         => [],
+    // 扩展函数文件
+    'extra_file_list'        => [THINK_PATH . 'helper' . EXT],
+    // 默认输出类型
+    'default_return_type'    => 'html',
+    // 默认AJAX 数据返回格式,可选json xml ...
+    'default_ajax_return'    => 'json',
+    // 默认JSONP格式返回的处理方法
+    'default_jsonp_handler'  => 'jsonpReturn',
+    // 默认JSONP处理方法
+    'var_jsonp_handler'      => 'callback',
+    // 默认时区
+    'default_timezone'       => 'PRC',
+    // 是否开启多语言
+    'lang_switch_on'         => false,
+    // 默认全局过滤方法 用逗号分隔多个
+    'default_filter'         => '',
+    // 默认语言
+    'default_lang'           => 'zh-cn',
+    // 应用类库后缀
+    'class_suffix'           => false,
+    // 控制器类后缀
+    'controller_suffix'      => false,
+
+    // +----------------------------------------------------------------------
+    // | 模块设置
+    // +----------------------------------------------------------------------
+
+    // 默认模块名
+    'default_module'         => 'index',
+    // 禁止访问模块
+    'deny_module_list'       => ['common'],
+    // 默认控制器名
+    'default_controller'     => 'Index',
+    // 默认操作名
+    'default_action'         => 'index',
+    // 默认验证器
+    'default_validate'       => '',
+    // 默认的空控制器名
+    'empty_controller'       => 'Error',
+    // 操作方法后缀
+    'action_suffix'          => '',
+    // 自动搜索控制器
+    'controller_auto_search' => false,
+
+    // +----------------------------------------------------------------------
+    // | URL设置
+    // +----------------------------------------------------------------------
+
+    // PATHINFO变量名 用于兼容模式
+    'var_pathinfo'           => 's',
+    // 兼容PATH_INFO获取
+    'pathinfo_fetch'         => ['ORIG_PATH_INFO', 'REDIRECT_PATH_INFO', 'REDIRECT_URL'],
+    // pathinfo分隔符
+    'pathinfo_depr'          => '/',
+    // URL伪静态后缀
+    'url_html_suffix'        => 'html',
+    // URL普通方式参数 用于自动生成
+    'url_common_param'       => false,
+    // URL参数方式 0 按名称成对解析 1 按顺序解析
+    'url_param_type'         => 0,
+    // 是否开启路由
+    'url_route_on'           => true,
+    // 路由使用完整匹配
+    'route_complete_match'   => false,
+    // 路由配置文件（支持配置多个）
+    'route_config_file'      => ['route'],
+    // 是否开启路由解析缓存
+    'route_check_cache'      => false,
+    // 是否强制使用路由
+    'url_route_must'         => false,
+    // 域名部署
+    'url_domain_deploy'      => false,
+    // 域名根，如thinkphp.cn
+    'url_domain_root'        => '',
+    // 是否自动转换URL中的控制器和操作名
+    'url_convert'            => false,
+    // 默认的访问控制器层
+    'url_controller_layer'   => 'controller',
+    // 表单请求类型伪装变量
+    'var_method'             => '_method',
+    // 表单ajax伪装变量
+    'var_ajax'               => '_ajax',
+    // 表单pjax伪装变量
+    'var_pjax'               => '_pjax',
+    // 是否开启请求缓存 true自动缓存 支持设置请求缓存规则
+    'request_cache'          => false,
+    // 请求缓存有效期
+    'request_cache_expire'   => null,
+    // 全局请求缓存排除规则
+    'request_cache_except'   => [],
+
+    // +----------------------------------------------------------------------
+    // | 模板设置
+    // +----------------------------------------------------------------------
+
+    'template'               => [
+        // 模板引擎类型 支持 php think 支持扩展
+        'type'         => 'Think',
+        // 默认模板渲染规则 1 解析为小写+下划线 2 全部转换小写
+        'auto_rule'    => 1,
+        // 模板路径
+        'view_path'    => '',
+        // 模板后缀
+        'view_suffix'  => 'html',
+        // 模板文件名分隔符
+        'view_depr'    => DS,
+        // 模板引擎普通标签开始标记
+        'tpl_begin'    => '{',
+        // 模板引擎普通标签结束标记
+        'tpl_end'      => '}',
+        // 标签库标签开始标记
+        'taglib_begin' => '{',
+        // 标签库标签结束标记
+        'taglib_end'   => '}',
+    ],
+
+    // 视图输出字符串内容替换
+    'view_replace_str'       => [],
+    // 默认跳转页面对应的模板文件
+    'dispatch_success_tmpl'  => THINK_PATH . 'tpl' . DS . 'dispatch_jump.tpl',
+    'dispatch_error_tmpl'    => THINK_PATH . 'tpl' . DS . 'dispatch_jump.tpl',
+
+    // +----------------------------------------------------------------------
+    // | 异常及错误设置
+    // +----------------------------------------------------------------------
+
+    // 异常页面的模板文件
+    'exception_tmpl'         => THINK_PATH . 'tpl' . DS . 'think_exception.tpl',
+
+    // 错误显示信息,非调试模式有效
+    'error_message'          => '页面错误！请稍后再试～',
+    // 显示错误信息
+    'show_error_msg'         => false,
+    // 异常处理handle类 留空使用 \think\exception\Handle
+    'exception_handle'       => '\\app\\common\\exception\\ExceptionHandler',
+
+    // +----------------------------------------------------------------------
+    // | 日志设置
+    // +----------------------------------------------------------------------
+
+    'log'                    => [
+        // 日志记录方式，内置 file socket 支持扩展
+        'type'  => 'File',
+        // 日志保存目录
+        'path'  => LOG_PATH,
+        // 日志记录级别
+        'level' => [],
+    ],
+
+    // +----------------------------------------------------------------------
+    // | Trace设置 开启 app_trace 后 有效
+    // +----------------------------------------------------------------------
+    'trace'                  => [
+        // 内置Html Console 支持扩展
+        'type' => 'Html',
+    ],
+
+    // +----------------------------------------------------------------------
+    // | 缓存设置
+    // +----------------------------------------------------------------------
+
+    'cache'                  => [
+        // 驱动方式
+        'type'   => 'File',
+        // 缓存保存目录
+        'path'   => CACHE_PATH,
+        // 缓存前缀
+        'prefix' => '',
+        // 缓存有效期 0表示永久缓存
+        'expire' => 0,
+    ],
+
+    // +----------------------------------------------------------------------
+    // | 会话设置
+    // +----------------------------------------------------------------------
+
+    'session'                => [
+        'id'             => '',
+        // SESSION_ID的提交变量,解决flash上传跨域
+        'var_session_id' => '',
+        // SESSION 前缀
+        'prefix'         => 'think',
+        // 驱动方式 支持redis memcache memcached
+        'type'           => '',
+        // 是否自动开启 SESSION
+        'auto_start'     => true,
+    ],
+
+    // +----------------------------------------------------------------------
+    // | Cookie设置
+    // +----------------------------------------------------------------------
+    'cookie'                 => [
+        // cookie 名称前缀
+        'prefix'    => '',
+        // cookie 保存时间
+        'expire'    => 0,
+        // cookie 保存路径
+        'path'      => '/',
+        // cookie 有效域名
+        'domain'    => '',
+        //  cookie 启用安全传输
+        'secure'    => false,
+        // httponly设置
+        'httponly'  => '',
+        // 是否使用 setcookie
+        'setcookie' => true,
+    ],
+
+    //分页配置
+    'paginate'               => [
+        'type'      => 'bootstrap',
+        'var_page'  => 'page',
+        'list_rows' => 15,
+    ],
+];
diff --git a/testapps/PHP/application/database.php b/testapps/PHP/application/database.php
new file mode 100644
index 000000000..28f724e3d
--- /dev/null
+++ b/testapps/PHP/application/database.php
@@ -0,0 +1,55 @@
+<?php
+// +----------------------------------------------------------------------
+// | ThinkPHP [ WE CAN DO IT JUST THINK ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+// +----------------------------------------------------------------------
+// | Author: liu21st <liu21st@gmail.com>
+// +----------------------------------------------------------------------
+
+return [
+    // 数据库类型
+    'type'            => 'mysql',
+    // 服务器地址
+    'hostname'        => 'dev-mysql',
+    // 数据库名
+    'database'        => 'DBTest',
+    // 用户名
+    'username'        => 'root',
+    // 密码
+    'password'        => '123456',
+    // 端口
+    'hostport'        => '3306',
+    // 连接dsn
+    'dsn'             => '',
+    // 数据库连接参数
+    'params'          => [],
+    // 数据库编码默认采用utf8
+    'charset'         => 'utf8',
+    // 数据库表前缀
+    'prefix'          => '',
+    // 数据库调试模式
+    'debug'           => true,
+    // 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器)
+    'deploy'          => 0,
+    // 数据库读写是否分离 主从式有效
+    'rw_separate'     => false,
+    // 读写分离后 主服务器数量
+    'master_num'      => 1,
+    // 指定从服务器序号
+    'slave_no'        => '',
+    // 自动读取主库数据
+    'read_master'     => false,
+    // 是否严格检查字段是否存在
+    'fields_strict'   => true,
+    // 数据集返回类型
+    'resultset_type'  => 'array',
+    // 自动写入时间戳字段
+    'auto_timestamp'  => false,
+    // 时间字段取出后的默认时间格式
+    'datetime_format' => 'Y-m-d H:i:s',
+    // 是否需要进行SQL性能分析
+    'sql_explain'     => false,
+];
diff --git a/testapps/PHP/app/Args.php b/testapps/PHP/application/index/controller/Args.php
similarity index 92%
rename from testapps/PHP/app/Args.php
rename to testapps/PHP/application/index/controller/Args.php
index 7c83ff87e..646e9765d 100644
--- a/testapps/PHP/app/Args.php
+++ b/testapps/PHP/application/index/controller/Args.php
@@ -1,4 +1,5 @@
 <?php
+namespace app\index\controller;
 
 define("GREETING","Hello you! How are you today?");
 
diff --git a/testapps/PHP/application/index/controller/Index.php b/testapps/PHP/application/index/controller/Index.php
new file mode 100644
index 000000000..8fba1deef
--- /dev/null
+++ b/testapps/PHP/application/index/controller/Index.php
@@ -0,0 +1,264 @@
+<?php
+namespace app\index\controller;
+
+require_once __DIR__.'/Args.php';
+
+use app\common\AppDate;
+use app\common\AopFunction;
+use app\common\TestError;
+use app\common\AccessRemote;
+use app\common\Teacher;
+use app\common\Doctor;
+use app\common\Student;
+use app\common\TestGenerator;
+use app\common\AbstractStudent;
+use app\common\InterfaceStudent;
+use app\common\TestClone;
+use app\common\TestRecursion;
+use app\common\TestAnonymous;
+use app\common\TestStatic;
+use app\common\TestFinalClass;
+use app\common\TestFinalFunc;
+use app\common\TestTrait;
+use app\common\CallBackFunc;
+use app\common\LevelClass;
+use app\common\ExtendLevel;
+use app\common\OverRideLevel;
+use app\common\TestArgs;
+use app\common\TestReturn;
+use app\common\TestGuzzle;
+use app\index\model\User;
+
+use think\Controller;
+use think\facade\Cache;
+use think\Db;
+
+class Index extends Controller
+{
+    public function index()
+    {
+        return $this->fetch("index");
+    }
+
+    public function get_date()
+    {
+        return AppDate::outputDate();
+    }
+
+    public function test_func1()
+    {
+        $instance = new AopFunction();
+        return $instance->test_func1("one", 3);
+    }
+
+    public function test_func2_caller()
+    {
+        $instance = new AopFunction();
+        return $instance->test_func2();
+    }
+
+    public function test_inherit_func()
+    {
+        $instance = new Student();
+        $r1 = $instance->eat();
+        $instance = new Teacher();
+        $r2 = $instance->eat();
+        $instance = new Doctor();
+        $r3 = $instance->eat();
+        return $r1.$r2.$r3.$instance->other();
+
+    }
+
+    public function test_generator_func()
+    {
+        $instance = new TestGenerator();
+        $sum = 0;
+        foreach ($instance->generator(1, 10, 2) as $number){$sum += $number;}
+        return $sum;
+    }
+
+    public function test_abstract_func()
+    {
+        $instance = new AbstractStudent("Evy");
+        $r1 = $instance->eat();
+        $r2 = $instance->drink();
+        return $r1.$r2.$instance->breath();
+    }
+
+    public function test_interface_func()
+    {
+        $instance = new InterfaceStudent();
+        $instance->setVariable("Evy", "Hua");
+        $instance->setVariable("Sam", "Wei");
+        $r1 = $instance->getHtml("Hello {Evy}");
+        return $r1.$instance->other("Evy");
+    }
+
+    public function test_clone()
+    {
+        $instance1 = new TestClone();
+        $instance2 = clone $instance1;
+        $instance2->setColor("green");
+        $r1 = $instance2->getColor();
+        $instance1->setColor("red");
+        return $r1.$instance1->getColor();
+    }
+
+    public function test_recursion()
+    {
+        $instance = new TestRecursion();
+        $r1 = $instance->test_cumsum1(3);
+//        return $instance->test_cumsum2(3);
+        return $r1;
+    }
+
+    public function test_anonymous()
+    {
+        $instance = new TestAnonymous();
+        $bell = $instance->createbell(date("Y/m/d"));
+        return $bell();
+    }
+
+    public function test_static()
+    {
+        return TestStatic::static_func(123);
+    }
+
+    public function test_final_class()
+    {
+        $instance = new TestFinalClass();
+        return $instance->test();
+//        class swtest1 extends TestFinalClass{};
+    }
+
+    public function test_final_func()
+    {
+        $instance = new TestFinalFunc();
+        return $instance->test("abc");
+//        class swtest2 extends app\TestFinalFunc
+//        {
+//            public final function test(){
+//                echo "123";
+//            }
+//        }
+    }
+
+    public function test_trait()
+    {
+        $instance = new TestTrait();
+        $r1 = $instance->traitfunc("Evy");
+        return $r1.$instance->test();
+    }
+
+    public function test_callback()
+    {
+        $className = "app\common\CallBackFunc";
+        $funcName = "fnCallback1";
+        $instance = new CallBackFunc();
+        $r1 = call_user_func_array(array($className, $funcName), array("hello", "world"));
+        $r2 = call_user_func_array(array($instance,"fnCallback2"), array("hello", "world"));
+        return $r1.$r2;
+    }
+
+    public function test_level()
+    {
+        $instance = new LevelClass();
+        $r1 = $instance->public_function(123);
+        $instance = new ExtendLevel();
+        $r2 = $instance->public_function(123);
+        $instance = new OverRideLevel();
+        return $instance->public_function(123);
+    }
+
+    public function test_args()
+    {
+        $myfile = fopen(__DIR__.'/Args.php', "r");
+        $instance = new TestArgs();
+        return $instance->test_args(null, 123, 3.1415, true, array(1, 2), new SObject(1), new SObjectString("ObjToString"), "abcd", $myfile, constant("GREETING"));
+    }
+
+    public function test_return()
+    {
+        $myfile = fopen(__DIR__.'/Args.php', "r");
+        $instance = new TestReturn();
+        $args = array(null, 123, 3.1415, true, array(1, 2), new SObject(1), new SObjectString("ObjToString"), "abcd", $myfile, constant("GREETING"));
+        $return_array = [];
+        foreach($args as $value){
+            array_push($return_array,$instance->test_return($value));
+        }
+        return count($return_array);
+    }
+
+    public function test_curl()
+    {
+        $acr =  new AccessRemote();
+        $acr->gotoUrl($_GET['remote']);
+        return "Call ".$_GET['remote'];
+    }
+
+    public function test_guzzle()
+    {
+        $guzzle = new TestGuzzle();
+        $tmp = $guzzle->gotoV();
+//        return $guzzle->gotofoo();
+        return $tmp."call remote";
+    }
+
+    public function test_pdo()
+    {
+        // $user =  new User;
+        // $user->data(['name'=>'thinkphp','age'=>10, 'city'=>'thinkphp']);
+        // $user->save();
+        $user = new User;
+        $user->name = 'thinkphp';
+        $user->city    = 'test';
+        $user->save();
+        $user1 = User::get(['name'=>'thinkphp']);
+        $user2 = User::get(function($query){
+            $query->where('name', 'thinkphp');
+        });
+        return $user1;
+    }
+
+    public function test_redis()
+    {
+        Cache::set('name', 'value');
+        return Cache::get('name');
+    }
+
+    public function test_mongo()
+    {
+        return User::get(1);
+    }
+    ###############################Test Exception###################
+    public function test_call_undefined_function()
+    {
+        $error = new TestError();
+        // try {
+        $error->error();
+        // $error->testParseError();
+        // $error->testTypeError("abc");
+        // $error->testArithmeticError();
+        // $error->testDivisionByZeroError();
+        // $error->testAssertionError();
+        // }catch (Exception $ex){
+        //     echo "Catch exception $ex";
+        // }
+    }
+
+    public function test_uncaught_exception()
+    {
+        return TestError::throwException();
+    }
+
+    public function test_caught_exception()
+    {
+        TestError::caughtException();
+    }
+
+    public function test_exception_recursion()
+    {
+        TestError::test_cumsum_e1(3);
+    }
+}
+
diff --git a/testapps/PHP/application/index/model/User.php b/testapps/PHP/application/index/model/User.php
new file mode 100644
index 000000000..4175871be
--- /dev/null
+++ b/testapps/PHP/application/index/model/User.php
@@ -0,0 +1,12 @@
+<?php
+namespace app\index\model;
+
+use think\Model;
+
+class User extends Model
+{
+    protected function initialize()
+    {
+        parent::initialize();
+    }
+}
\ No newline at end of file
diff --git a/testapps/PHP/application/index/view/index/index.html b/testapps/PHP/application/index/view/index/index.html
new file mode 100644
index 000000000..d9fae8acb
--- /dev/null
+++ b/testapps/PHP/application/index/view/index/index.html
@@ -0,0 +1,207 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>pinpoint-php demo</title>
+</head>
+
+<body>
+
+<h3>Simple server</h3>
+
+<form method="get">
+    <table border="2">
+        <tr>
+            <th>Link</th>
+        </tr>
+        <tr>
+            <th>
+                <a href="/get_date">Call internal function "date".</a>
+            </th>
+        </tr>
+
+        <tr>
+            <th>
+                <a href="/test_func1">Call user-defined function.</a>
+            </th>
+        </tr>
+
+        <tr>
+            <th>
+                <a href="/test_func2_caller">Call user-defined function in a namespace.</a>
+            </th>
+        </tr>
+
+        <tr>
+            <th>
+                <a href="/test_inherit_func">Call inherit function.</a>
+            </th>
+        </tr>
+
+        <tr>
+            <th>
+                <a href="/test_generator_func">Call generator.</a>
+            </th>
+        </tr>
+
+        <tr>
+            <th>
+                <a href="/test_abstract_func">Call abstract function.</a>
+            </th>
+        </tr>
+
+        <tr>
+            <th>
+                <a href="/test_interface_func">Call interface function.</a>
+            </th>
+        </tr>
+
+        <tr>
+            <th>
+                <a href="/test_clone">Call Clone.</a>
+            </th>
+        </tr>
+
+        <tr>
+            <th>
+                <a href="/test_recursion">Call Recursion.</a>
+            </th>
+        </tr>
+
+        <tr>
+            <th>
+                <a href="/test_anonymous">Call function in Anonymous.</a>
+            </th>
+        </tr>
+
+        <tr>
+            <th>
+                <a href="/test_static">Call Static function.</a>
+            </th>
+        </tr>
+
+        <tr>
+            <th>
+                <a href="/test_final_class">Call function in final class.</a>
+            </th>
+        </tr>
+
+        <tr>
+            <th>
+                <a href="/test_final_func">Call final function.</a>
+            </th>
+        </tr>
+
+        <tr>
+            <th>
+                <a href="/test_trait">Call function in trait.</a>
+            </th>
+        </tr>
+
+        <tr>
+            <th>
+                <a href="/test_callback">Callback function.</a>
+            </th>
+        </tr>
+
+        <tr>
+            <th>
+                <a href="/test_level">Call function with different access.</a>
+            </th>
+        </tr>
+
+        <tr>
+            <th>
+                <a href="/test_args">Call function with args.</a>
+            </th>
+        </tr>
+
+        <tr>
+            <th>
+                <a href="/test_return">Call function return datas.</a>
+            </th>
+        </tr>
+        <tr>
+            <th>
+                <a href="/test_guzzle">Test Guzzle.</a>
+            </th>
+        </tr>
+        <tr>
+            <th>
+                <a href="/test_pdo">Test PDO.</a>
+            </th>
+        </tr>
+
+        <tr>
+            <th>
+                <a href="/test_redis">Test Redis.</a>
+            </th>
+        </tr>
+
+    </table>
+</form>
+
+<h3>Error and exception</h3>
+
+<form method="get">
+    <table border="2">
+        <tr>
+            <th>Link</th>
+        </tr>
+
+        <tr>
+            <th>
+                <a href="/test_call_undefined_function">Call undefined function.</a>
+            </th>
+        </tr>
+        <tr>
+            <th>
+                <a href="/test_uncaught_exception">Call uncaught exception.</a>
+            </th>
+        </tr>
+
+        <tr>
+            <th>
+                <a href="/test_caught_exception">Call caught exception.</a>
+            </th>
+        </tr>
+
+        <tr>
+            <th>
+                <a href="/test_exception_recursion">Call exception in recursion.</a>
+            </th>
+        </tr>
+    </table>
+</form>
+
+<h3>Test curl</h3>
+<form method="get" action="/test_curl">
+    remote url: <input type="text"  name="remote" value="http://www.baidu.com"/>
+    <input type="submit" value="Call remote" >
+</form>
+
+
+
+    <h3>Test mysqli</h3>
+    <form method="get" action="index.php">
+        <input type="submit" name="type" value="test_mysqli">
+    </form>
+
+    <h3>Test memcached</h3>
+    <form method="get" action="index.php">
+        <input type="submit" name="type" value="test_memcached">
+    </form>
+
+    <h3>Test kafka</h3>
+    <form method="get" action="index.php">
+        <input type="submit" name="type" value="test_kafka">
+    </form>
+
+    <h3>Test Guzzle</h3>
+    <form method="get" action="index.php">
+        <input type="submit" name="type" value="test_guzzle">
+    </form>
+
+</body>
+
+</html>
diff --git a/testapps/PHP/application/provider.php b/testapps/PHP/application/provider.php
new file mode 100644
index 000000000..b07c54ded
--- /dev/null
+++ b/testapps/PHP/application/provider.php
@@ -0,0 +1,14 @@
+<?php
+// +----------------------------------------------------------------------
+// | ThinkPHP [ WE CAN DO IT JUST THINK ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+// +----------------------------------------------------------------------
+// | Author: liu21st <liu21st@gmail.com>
+// +----------------------------------------------------------------------
+
+// 应用容器绑定定义
+return [
+];
diff --git a/testapps/PHP/application/route.php b/testapps/PHP/application/route.php
new file mode 100644
index 000000000..8861b451f
--- /dev/null
+++ b/testapps/PHP/application/route.php
@@ -0,0 +1,46 @@
+<?php
+// +----------------------------------------------------------------------
+// | ThinkPHP [ WE CAN DO IT JUST THINK ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+// +----------------------------------------------------------------------
+// | Author: liu21st <liu21st@gmail.com>
+// +----------------------------------------------------------------------
+
+return [
+    '/get_date' => 'index.php/index/Index/get_date',
+    '/test_func1' => 'index.php/index/Index/test_func1',
+    '/test_func2_caller' => 'index.php/index/Index/test_func2_caller',
+    '/test_inherit_func' => 'index.php/index/Index/test_inherit_func',
+    '/test_generator_func' => 'index.php/index/Index/test_generator_func',
+    '/test_abstract_func' => 'index.php/index/Index/test_abstract_func',
+    '/test_interface_func' => 'index.php/index/Index/test_interface_func',
+    '/test_clone' => 'index.php/index/Index/test_clone',
+    '/test_recursion' => 'index.php/index/Index/test_recursion',
+    '/test_anonymous' => 'index.php/index/Index/test_anonymous',
+    '/test_static' => 'index.php/index/Index/test_static',
+    '/test_final_class' => 'index.php/index/Index/test_final_class',
+    '/test_final_func' => 'index.php/index/Index/test_final_func',
+    '/test_trait' => 'index.php/index/Index/test_trait',
+    '/test_callback' => 'index.php/index/Index/test_callback',
+    '/test_level' => 'index.php/index/Index/test_level',
+    '/test_args' => 'index.php/index/Index/test_args',
+    '/test_return' => 'index.php/index/Index/test_return',
+//// Test Exception
+    '/test_call_undefined_function' => 'index.php/index/Index/test_call_undefined_function',
+    '/test_uncaught_exception' => 'index.php/index/Index/test_uncaught_exception',
+    '/test_caught_exception' => 'index.php/index/Index/test_caught_exception',
+    '/test_exception_recursion' => 'index.php/index/Index/test_exception_recursion',
+///////////////curl
+    '/test_curl' => 'index.php/index/Index/test_curl',
+//////////////PDO
+    '/test_pdo' => 'index.php/index/Index/test_pdo',
+//////////////Redis
+    '/test_redis' => 'index.php/index/Index/test_redis',
+///////////////guzzle
+    '/test_guzzle' => 'index.php/index/Index/test_guzzle',
+///////////////mongo
+    '/test_mongo' => 'index.php/index/Index/test_mongo',
+];
diff --git a/testapps/PHP/application/tags.php b/testapps/PHP/application/tags.php
new file mode 100644
index 000000000..4b18d1050
--- /dev/null
+++ b/testapps/PHP/application/tags.php
@@ -0,0 +1,28 @@
+<?php
+// +----------------------------------------------------------------------
+// | ThinkPHP [ WE CAN DO IT JUST THINK ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+// +----------------------------------------------------------------------
+// | Author: liu21st <liu21st@gmail.com>
+// +----------------------------------------------------------------------
+
+// 应用行为扩展定义文件
+return [
+    // 应用初始化
+    'app_init'     => [],
+    // 应用开始
+    'app_begin'    => [],
+    // 模块初始化
+    'module_init'  => [],
+    // 操作开始执行
+    'action_begin' => [],
+    // 视图内容过滤
+    'view_filter'  => [],
+    // 日志写入
+    'log_write'    => [],
+    // 应用结束
+    'app_end'      => [],
+];
diff --git a/testapps/PHP/app1/Foo.php b/testapps/PHP/application/util/Foo.php
similarity index 66%
rename from testapps/PHP/app1/Foo.php
rename to testapps/PHP/application/util/Foo.php
index 00a90d8e1..a6561d7c5 100644
--- a/testapps/PHP/app1/Foo.php
+++ b/testapps/PHP/application/util/Foo.php
@@ -1,11 +1,10 @@
 <?php
-namespace app1;
+namespace app\util;
 
 class Foo
 {
     static function test_func_2( $p1,$p2,$p3)
     {
-        echo "$p1 , $p2, $p3";
         return $p1;
     }
-}
\ No newline at end of file
+}
diff --git a/testapps/PHP/build.php b/testapps/PHP/build.php
new file mode 100644
index 000000000..a12d26c15
--- /dev/null
+++ b/testapps/PHP/build.php
@@ -0,0 +1,25 @@
+<?php
+// +----------------------------------------------------------------------
+// | ThinkPHP [ WE CAN DO IT JUST THINK ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+// +----------------------------------------------------------------------
+// | Author: liu21st <liu21st@gmail.com>
+// +----------------------------------------------------------------------
+
+return [
+    // 生成应用公共文件
+    '__file__' => ['common.php', 'config.php', 'database.php'],
+
+    // 定义demo模块的自动生成 （按照实际定义的文件名生成）
+    'demo'     => [
+        '__file__'   => ['common.php'],
+        '__dir__'    => ['behavior', 'controller', 'model', 'view'],
+        'controller' => ['Index', 'Test', 'UserType'],
+        'model'      => ['User', 'UserType'],
+        'view'       => ['index/index'],
+    ],
+    // 其他更多的模块定义
+];
diff --git a/testapps/PHP/composer.json b/testapps/PHP/composer.json
index 36681de44..1ebe8a7ee 100644
--- a/testapps/PHP/composer.json
+++ b/testapps/PHP/composer.json
@@ -1,22 +1,41 @@
 {
-    "name": "eeliu/pinpoint-php-example",
-    "minimum-stability": "dev",
+    "name": "topthink/think",
+    "description": "the new thinkphp framework",
+    "type": "project",
+    "keywords": [
+        "framework",
+        "thinkphp",
+        "ORM"
+    ],
+    "homepage": "http://thinkphp.cn/",
+    "license": "Apache-2.0",
     "authors": [
         {
-            "name": "eeliu",
-            "email": "eeliu2009@gmail.com"
+            "name": "liu21st",
+            "email": "liu21st@gmail.com"
         }
     ],
+    "require": {
+        "php": ">=5.6.0",
+        "topthink/framework": "5.1.*",
+    	"pinpoint-apm/pinpoint-php-aop": "dev-master",
+        "predis/predis": "^1.1",
+        "topthink/think-testing": "2.0.*",
+        "guzzlehttp/guzzle": "^6.0"
+    },
     "autoload": {
         "psr-4": {
-            "app\\":"app/",
-            "app1\\": "app1",
-            "Plugins\\": "Plugins/"
+            "app\\": "application",
+	    "Plugins\\": "Plugins"
         }
     },
-    "require": {
-        "pinpoint-apm/pinpoint-php-aop": "v2.0.1",
-        "guzzlehttp/guzzle": "~6.0",
-        "mongodb/mongodb":"~1.6.0"
+    "extra": {
+        "think-path": "thinkphp"
+    },
+    "config": {
+        "preferred-install": "dist",
+        "allow-plugins": {
+            "topthink/think-installer": true
+        }
     }
 }
diff --git a/testapps/PHP/config/app.php b/testapps/PHP/config/app.php
new file mode 100644
index 000000000..e701a88be
--- /dev/null
+++ b/testapps/PHP/config/app.php
@@ -0,0 +1,146 @@
+<?php
+// +----------------------------------------------------------------------
+// | ThinkPHP [ WE CAN DO IT JUST THINK ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+// +----------------------------------------------------------------------
+// | Author: liu21st <liu21st@gmail.com>
+// +----------------------------------------------------------------------
+
+// +----------------------------------------------------------------------
+// | 应用设置
+// +----------------------------------------------------------------------
+
+return [
+    // 应用名称
+    'app_name'               => '',
+    // 应用地址
+    'app_host'               => '',
+    // 应用调试模式
+    'app_debug'              => true,
+    // 应用Trace
+    'app_trace'              => false,
+    // 是否支持多模块
+    'app_multi_module'       => true,
+    // 入口自动绑定模块
+    'auto_bind_module'       => false,
+    // 注册的根命名空间
+    'root_namespace'         => [],
+    // 默认输出类型
+    'default_return_type'    => 'html',
+    // 默认AJAX 数据返回格式,可选json xml ...
+    'default_ajax_return'    => 'json',
+    // 默认JSONP格式返回的处理方法
+    'default_jsonp_handler'  => 'jsonpReturn',
+    // 默认JSONP处理方法
+    'var_jsonp_handler'      => 'callback',
+    // 默认时区
+    'default_timezone'       => 'Asia/Shanghai',
+    // 是否开启多语言
+    'lang_switch_on'         => false,
+    // 默认全局过滤方法 用逗号分隔多个
+    'default_filter'         => '',
+    // 默认语言
+    'default_lang'           => 'zh-cn',
+    // 应用类库后缀
+    'class_suffix'           => false,
+    // 控制器类后缀
+    'controller_suffix'      => false,
+
+    // +----------------------------------------------------------------------
+    // | 模块设置
+    // +----------------------------------------------------------------------
+
+    // 默认模块名
+    'default_module'         => 'index',
+    // 禁止访问模块
+    'deny_module_list'       => ['common'],
+    // 默认控制器名
+    'default_controller'     => 'Index',
+    // 默认操作名
+    'default_action'         => 'index',
+    // 默认验证器
+    'default_validate'       => '',
+    // 默认的空模块名
+    'empty_module'           => '',
+    // 默认的空控制器名
+    'empty_controller'       => 'Error',
+    // 操作方法前缀
+    'use_action_prefix'      => false,
+    // 操作方法后缀
+    'action_suffix'          => '',
+    // 自动搜索控制器
+    'controller_auto_search' => false,
+
+    // +----------------------------------------------------------------------
+    // | URL设置
+    // +----------------------------------------------------------------------
+
+    // PATHINFO变量名 用于兼容模式
+    'var_pathinfo'           => 's',
+    // 兼容PATH_INFO获取
+    'pathinfo_fetch'         => ['ORIG_PATH_INFO', 'REDIRECT_PATH_INFO', 'REDIRECT_URL'],
+    // pathinfo分隔符
+    'pathinfo_depr'          => '/',
+    // HTTPS代理标识
+    'https_agent_name'       => '',
+    // IP代理获取标识
+    'http_agent_ip'          => 'X-REAL-IP',
+    // URL伪静态后缀
+    'url_html_suffix'        => 'html',
+    // URL普通方式参数 用于自动生成
+    'url_common_param'       => false,
+    // URL参数方式 0 按名称成对解析 1 按顺序解析
+    'url_param_type'         => 0,
+    // 是否开启路由延迟解析
+    'url_lazy_route'         => false,
+    // 是否强制使用路由
+    'url_route_must'         => false,
+    // 合并路由规则
+    'route_rule_merge'       => false,
+    // 路由是否完全匹配
+    'route_complete_match'   => false,
+    // 使用注解路由
+    'route_annotation'       => false,
+    // 域名根，如thinkphp.cn
+    'url_domain_root'        => '',
+    // 是否自动转换URL中的控制器和操作名
+    'url_convert'            => true,
+    // 默认的访问控制器层
+    'url_controller_layer'   => 'controller',
+    // 表单请求类型伪装变量
+    'var_method'             => '_method',
+    // 表单ajax伪装变量
+    'var_ajax'               => '_ajax',
+    // 表单pjax伪装变量
+    'var_pjax'               => '_pjax',
+    // 是否开启请求缓存 true自动缓存 支持设置请求缓存规则
+    'request_cache'          => false,
+    // 请求缓存有效期
+    'request_cache_expire'   => null,
+    // 全局请求缓存排除规则
+    'request_cache_except'   => [],
+    // 是否开启路由缓存
+    'route_check_cache'      => false,
+    // 路由缓存的Key自定义设置（闭包），默认为当前URL和请求类型的md5
+    'route_check_cache_key'  => '',
+    // 路由缓存类型及参数
+    'route_cache_option'     => [],
+
+    // 默认跳转页面对应的模板文件
+    'dispatch_success_tmpl'  => Env::get('think_path') . 'tpl/dispatch_jump.tpl',
+    'dispatch_error_tmpl'    => Env::get('think_path') . 'tpl/dispatch_jump.tpl',
+
+    // 异常页面的模板文件
+    'exception_tmpl'         => Env::get('think_path') . 'tpl/think_exception.tpl',
+
+    // 错误显示信息,非调试模式有效
+    'error_message'          => '页面错误！请稍后再试～',
+    // 显示错误信息
+    'show_error_msg'         => false,
+    // 异常处理handle类 留空使用 \think\exception\Handle
+    'exception_handle'       => 'app\common\exception\ExceptionHandler',
+
+];
diff --git a/testapps/PHP/config/cache.php b/testapps/PHP/config/cache.php
new file mode 100644
index 000000000..69fa05255
--- /dev/null
+++ b/testapps/PHP/config/cache.php
@@ -0,0 +1,20 @@
+<?php
+// +----------------------------------------------------------------------
+// | ThinkPHP [ WE CAN DO IT JUST THINK ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+// +----------------------------------------------------------------------
+// | Author: liu21st <liu21st@gmail.com>
+// +----------------------------------------------------------------------
+
+// +----------------------------------------------------------------------
+// | 缓存设置
+// +----------------------------------------------------------------------
+
+return [
+    // 驱动方式
+    'type'   => 'redis',
+    'host'   => 'localhost'
+];
diff --git a/testapps/PHP/config/console.php b/testapps/PHP/config/console.php
new file mode 100644
index 000000000..40cd34611
--- /dev/null
+++ b/testapps/PHP/config/console.php
@@ -0,0 +1,20 @@
+<?php
+// +----------------------------------------------------------------------
+// | ThinkPHP [ WE CAN DO IT JUST THINK ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+// +----------------------------------------------------------------------
+// | Author: liu21st <liu21st@gmail.com>
+// +----------------------------------------------------------------------
+
+// +----------------------------------------------------------------------
+// | 控制台配置
+// +----------------------------------------------------------------------
+return [
+    'name'      => 'Think Console',
+    'version'   => '0.1',
+    'user'      => null,
+    'auto_path' => env('app_path') . 'command' . DIRECTORY_SEPARATOR,
+];
diff --git a/testapps/PHP/config/cookie.php b/testapps/PHP/config/cookie.php
new file mode 100644
index 000000000..81802b968
--- /dev/null
+++ b/testapps/PHP/config/cookie.php
@@ -0,0 +1,30 @@
+<?php
+// +----------------------------------------------------------------------
+// | ThinkPHP [ WE CAN DO IT JUST THINK ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+// +----------------------------------------------------------------------
+// | Author: liu21st <liu21st@gmail.com>
+// +----------------------------------------------------------------------
+
+// +----------------------------------------------------------------------
+// | Cookie设置
+// +----------------------------------------------------------------------
+return [
+    // cookie 名称前缀
+    'prefix'    => '',
+    // cookie 保存时间
+    'expire'    => 0,
+    // cookie 保存路径
+    'path'      => '/',
+    // cookie 有效域名
+    'domain'    => '',
+    //  cookie 启用安全传输
+    'secure'    => false,
+    // httponly设置
+    'httponly'  => '',
+    // 是否使用 setcookie
+    'setcookie' => true,
+];
diff --git a/testapps/PHP/config/database.php b/testapps/PHP/config/database.php
new file mode 100644
index 000000000..120243a2b
--- /dev/null
+++ b/testapps/PHP/config/database.php
@@ -0,0 +1,63 @@
+<?php
+// +----------------------------------------------------------------------
+// | ThinkPHP [ WE CAN DO IT JUST THINK ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+// +----------------------------------------------------------------------
+// | Author: liu21st <liu21st@gmail.com>
+// +----------------------------------------------------------------------
+
+return [
+    // 数据库类型
+    'type'            => 'mysql',
+    // 服务器地址
+    'hostname'        => 'localhost',
+    // 数据库名
+    'database'        => 'DBTest',
+    // 用户名
+    'username'        => 'test',
+    // 密码
+    'password'        => '123456',
+    // 端口
+    'hostport'        => '3306',
+    // 连接dsn
+    'dsn'             => '',
+    // 数据库连接参数
+    'params'          => [],
+    // 数据库编码默认采用utf8
+    'charset'         => 'utf8',
+    // 数据库表前缀
+    'prefix'          => '',
+    // 数据库调试模式
+    'debug'           => true,
+    // 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器)
+    'deploy'          => 0,
+    // 数据库读写是否分离 主从式有效
+    'rw_separate'     => false,
+    // 读写分离后 主服务器数量
+    'master_num'      => 1,
+    // 指定从服务器序号
+    'slave_no'        => '',
+    // 自动读取主库数据
+    'read_master'     => false,
+    // 是否严格检查字段是否存在
+    'fields_strict'   => true,
+    // 数据集返回类型
+    'resultset_type'  => 'array',
+    // 自动写入时间戳字段
+    'auto_timestamp'  => false,
+    // 时间字段取出后的默认时间格式
+    'datetime_format' => 'Y-m-d H:i:s',
+    // 是否需要进行SQL性能分析
+    'sql_explain'     => false,
+    // Builder类
+    'builder'         => '',
+    // Query类
+    'query'           => '\\think\\db\\Query',
+    // 是否需要断线重连
+    'break_reconnect' => false,
+    // 断线标识字符串
+    'break_match_str' => [],
+];
diff --git a/testapps/PHP/config/log.php b/testapps/PHP/config/log.php
new file mode 100644
index 000000000..f735d7456
--- /dev/null
+++ b/testapps/PHP/config/log.php
@@ -0,0 +1,30 @@
+<?php
+// +----------------------------------------------------------------------
+// | ThinkPHP [ WE CAN DO IT JUST THINK ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+// +----------------------------------------------------------------------
+// | Author: liu21st <liu21st@gmail.com>
+// +----------------------------------------------------------------------
+
+// +----------------------------------------------------------------------
+// | 日志设置
+// +----------------------------------------------------------------------
+return [
+    // 日志记录方式，内置 file socket 支持扩展
+    'type'        => 'File',
+    // 日志保存目录
+    'path'        => '',
+    // 日志记录级别
+    'level'       => [],
+    // 单文件日志写入
+    'single'      => false,
+    // 独立日志级别
+    'apart_level' => [],
+    // 最大日志文件数量
+    'max_files'   => 0,
+    // 是否关闭日志写入
+    'close'       => false,
+];
diff --git a/testapps/PHP/config/middleware.php b/testapps/PHP/config/middleware.php
new file mode 100644
index 000000000..294228a54
--- /dev/null
+++ b/testapps/PHP/config/middleware.php
@@ -0,0 +1,18 @@
+<?php
+// +----------------------------------------------------------------------
+// | ThinkPHP [ WE CAN DO IT JUST THINK ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+// +----------------------------------------------------------------------
+// | Author: liu21st <liu21st@gmail.com>
+// +----------------------------------------------------------------------
+
+// +----------------------------------------------------------------------
+// | 中间件配置
+// +----------------------------------------------------------------------
+return [
+    // 默认中间件命名空间
+    'default_namespace' => 'app\\http\\middleware\\',
+];
diff --git a/testapps/PHP/config/session.php b/testapps/PHP/config/session.php
new file mode 100644
index 000000000..79a325c1b
--- /dev/null
+++ b/testapps/PHP/config/session.php
@@ -0,0 +1,26 @@
+<?php
+// +----------------------------------------------------------------------
+// | ThinkPHP [ WE CAN DO IT JUST THINK ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+// +----------------------------------------------------------------------
+// | Author: liu21st <liu21st@gmail.com>
+// +----------------------------------------------------------------------
+
+// +----------------------------------------------------------------------
+// | 会话设置
+// +----------------------------------------------------------------------
+
+return [
+    'id'             => '',
+    // SESSION_ID的提交变量,解决flash上传跨域
+    'var_session_id' => '',
+    // SESSION 前缀
+    'prefix'         => 'think',
+    // 驱动方式 支持redis memcache memcached
+    'type'           => '',
+    // 是否自动开启 SESSION
+    'auto_start'     => true,
+];
diff --git a/testapps/PHP/config/template.php b/testapps/PHP/config/template.php
new file mode 100644
index 000000000..87ba8f72f
--- /dev/null
+++ b/testapps/PHP/config/template.php
@@ -0,0 +1,35 @@
+<?php
+// +----------------------------------------------------------------------
+// | ThinkPHP [ WE CAN DO IT JUST THINK ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+// +----------------------------------------------------------------------
+// | Author: liu21st <liu21st@gmail.com>
+// +----------------------------------------------------------------------
+
+// +----------------------------------------------------------------------
+// | 模板设置
+// +----------------------------------------------------------------------
+
+return [
+    // 模板引擎类型 支持 php think 支持扩展
+    'type'         => 'Think',
+    // 默认模板渲染规则 1 解析为小写+下划线 2 全部转换小写 3 保持操作方法
+    'auto_rule'    => 1,
+    // 模板路径
+    'view_path'    => '',
+    // 模板后缀
+    'view_suffix'  => 'html',
+    // 模板文件名分隔符
+    'view_depr'    => DIRECTORY_SEPARATOR,
+    // 模板引擎普通标签开始标记
+    'tpl_begin'    => '{',
+    // 模板引擎普通标签结束标记
+    'tpl_end'      => '}',
+    // 标签库标签开始标记
+    'taglib_begin' => '{',
+    // 标签库标签结束标记
+    'taglib_end'   => '}',
+];
diff --git a/testapps/PHP/config/trace.php b/testapps/PHP/config/trace.php
new file mode 100644
index 000000000..568054e75
--- /dev/null
+++ b/testapps/PHP/config/trace.php
@@ -0,0 +1,18 @@
+<?php
+// +----------------------------------------------------------------------
+// | ThinkPHP [ WE CAN DO IT JUST THINK ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+// +----------------------------------------------------------------------
+// | Author: liu21st <liu21st@gmail.com>
+// +----------------------------------------------------------------------
+
+// +----------------------------------------------------------------------
+// | Trace设置 开启 app_trace 后 有效
+// +----------------------------------------------------------------------
+return [
+    // 内置Html Console 支持扩展
+    'type' => 'Html',
+];
diff --git a/testapps/PHP/extend/.gitignore b/testapps/PHP/extend/.gitignore
new file mode 100644
index 000000000..c96a04f00
--- /dev/null
+++ b/testapps/PHP/extend/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
\ No newline at end of file
diff --git a/testapps/PHP/phpunit.xml b/testapps/PHP/phpunit.xml
new file mode 100644
index 000000000..5a41bcf74
--- /dev/null
+++ b/testapps/PHP/phpunit.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<phpunit backupGlobals="false"
+         backupStaticAttributes="false"
+         colors="true"
+         convertErrorsToExceptions="true"
+         convertNoticesToExceptions="true"
+         convertWarningsToExceptions="true"
+         processIsolation="false"
+         stopOnFailure="false"
+         syntaxCheck="false">
+    <testsuites>
+        <testsuite name="Application Test Suite">
+            <directory>./tests/</directory>
+        </testsuite>
+    </testsuites>
+    <filter>
+        <whitelist>
+            <directory suffix=".php">application/</directory>
+        </whitelist>
+    </filter>
+</phpunit>
diff --git a/testapps/PHP/public/.htaccess b/testapps/PHP/public/.htaccess
new file mode 100644
index 000000000..cbc786893
--- /dev/null
+++ b/testapps/PHP/public/.htaccess
@@ -0,0 +1,8 @@
+<IfModule mod_rewrite.c>
+  Options +FollowSymlinks -Multiviews
+  RewriteEngine On
+
+  RewriteCond %{REQUEST_FILENAME} !-d
+  RewriteCond %{REQUEST_FILENAME} !-f
+  RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
+</IfModule>
diff --git a/testapps/PHP/public/favicon.ico b/testapps/PHP/public/favicon.ico
new file mode 100644
index 000000000..e71815a66
Binary files /dev/null and b/testapps/PHP/public/favicon.ico differ
diff --git a/testapps/PHP/public/index.php b/testapps/PHP/public/index.php
new file mode 100644
index 000000000..98a199d96
--- /dev/null
+++ b/testapps/PHP/public/index.php
@@ -0,0 +1,30 @@
+<?php
+// +----------------------------------------------------------------------
+// | ThinkPHP [ WE CAN DO IT JUST THINK ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2006-2018 http://thinkphp.cn All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+// +----------------------------------------------------------------------
+// | Author: liu21st <liu21st@gmail.com>
+// +----------------------------------------------------------------------
+
+// [ 应用入口文件 ]
+namespace think;
+
+// 加载基础文件
+require __DIR__ . '/../thinkphp/base.php';
+
+//###################################################################
+define('AOP_CACHE_DIR', __DIR__ . '/../Cache/');
+define('PLUGINS_DIR', __DIR__ . '/../Plugins/');
+define('APPLICATION_NAME','thinkphp5.1'); // your application name
+define('APPLICATION_ID','thinkphp5.1');  // your application id
+define('PINPOINT_USE_CACHE','YES');
+require_once __DIR__ . '/../vendor/pinpoint-apm/pinpoint-php-aop/auto_pinpointed.php';
+//###################################################################
+
+// 支持事先使用静态方法设置Request对象和Config对象
+
+// 执行应用并响应
+Container::get('app')->run()->send();
diff --git a/testapps/PHP/public/robots.txt b/testapps/PHP/public/robots.txt
new file mode 100644
index 000000000..eb0536286
--- /dev/null
+++ b/testapps/PHP/public/robots.txt
@@ -0,0 +1,2 @@
+User-agent: *
+Disallow:
diff --git a/testapps/PHP/public/router.php b/testapps/PHP/public/router.php
new file mode 100644
index 000000000..4f916b407
--- /dev/null
+++ b/testapps/PHP/public/router.php
@@ -0,0 +1,17 @@
+<?php
+// +----------------------------------------------------------------------
+// | ThinkPHP [ WE CAN DO IT JUST THINK ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+// +----------------------------------------------------------------------
+// | Author: liu21st <liu21st@gmail.com>
+// +----------------------------------------------------------------------
+// $Id$
+
+if (is_file($_SERVER["DOCUMENT_ROOT"] . $_SERVER["SCRIPT_NAME"])) {
+    return false;
+} else {
+    require __DIR__ . "/index.php";
+}
diff --git a/testapps/PHP/public/static/.gitignore b/testapps/PHP/public/static/.gitignore
new file mode 100644
index 000000000..c96a04f00
--- /dev/null
+++ b/testapps/PHP/public/static/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
\ No newline at end of file
diff --git a/testapps/PHP/route/route.php b/testapps/PHP/route/route.php
new file mode 100644
index 000000000..23e3e6106
--- /dev/null
+++ b/testapps/PHP/route/route.php
@@ -0,0 +1,52 @@
+<?php
+// +----------------------------------------------------------------------
+// | ThinkPHP [ WE CAN DO IT JUST THINK ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+// +----------------------------------------------------------------------
+// | Author: liu21st <liu21st@gmail.com>
+// +----------------------------------------------------------------------
+
+// Route::get('think', function () {
+//     return 'hello,ThinkPHP5!';
+// });
+
+// Route::get('hello/:name', 'index/hello');
+
+return [
+    '/get_date' => 'index.php/index/Index/get_date',
+    '/test_func1' => 'index.php/index/Index/test_func1',
+    '/test_func2_caller' => 'index.php/index/Index/test_func2_caller',
+    '/test_inherit_func' => 'index.php/index/Index/test_inherit_func',
+    '/test_generator_func' => 'index.php/index/Index/test_generator_func',
+    '/test_abstract_func' => 'index.php/index/Index/test_abstract_func',
+    '/test_interface_func' => 'index.php/index/Index/test_interface_func',
+    '/test_clone' => 'index.php/index/Index/test_clone',
+    '/test_recursion' => 'index.php/index/Index/test_recursion',
+    '/test_anonymous' => 'index.php/index/Index/test_anonymous',
+    '/test_static' => 'index.php/index/Index/test_static',
+    '/test_final_class' => 'index.php/index/Index/test_final_class',
+    '/test_final_func' => 'index.php/index/Index/test_final_func',
+    '/test_trait' => 'index.php/index/Index/test_trait',
+    '/test_callback' => 'index.php/index/Index/test_callback',
+    '/test_level' => 'index.php/index/Index/test_level',
+    '/test_args' => 'index.php/index/Index/test_args',
+    '/test_return' => 'index.php/index/Index/test_return',
+//// Test Exception
+    '/test_call_undefined_function' => 'index.php/index/Index/test_call_undefined_function',
+    '/test_uncaught_exception' => 'index.php/index/Index/test_uncaught_exception',
+    '/test_caught_exception' => 'index.php/index/Index/test_caught_exception',
+    '/test_exception_recursion' => 'index.php/index/Index/test_exception_recursion',
+///////////////curl
+    '/test_curl' => 'index.php/index/Index/test_curl',
+//////////////PDO
+    '/test_pdo' => 'index.php/index/Index/test_pdo',
+//////////////Redis
+    '/test_redis' => 'index.php/index/Index/test_redis',
+///////////////guzzle
+    '/test_guzzle' => 'index.php/index/Index/test_guzzle',
+///////////////mongo
+    '/test_mongo' => 'index.php/index/Index/test_mongo',
+];
diff --git a/testapps/PHP/runtime/.gitignore b/testapps/PHP/runtime/.gitignore
new file mode 100644
index 000000000..c96a04f00
--- /dev/null
+++ b/testapps/PHP/runtime/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
\ No newline at end of file
diff --git a/testapps/PHP/tests/AutoTest.php b/testapps/PHP/tests/AutoTest.php
new file mode 100644
index 000000000..07967d38b
--- /dev/null
+++ b/testapps/PHP/tests/AutoTest.php
@@ -0,0 +1,227 @@
+<?php
+// +----------------------------------------------------------------------
+// | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2006-2015 http://thinkphp.cn All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+// +----------------------------------------------------------------------
+// | Author: yunwuxin <448901948@qq.com>
+// +----------------------------------------------------------------------
+namespace tests;
+
+use think\Exception;
+use think\Db;
+
+require_once __DIR__."/config.php";
+
+class AutoTest extends TestCase
+{
+
+    public function testGetDate()
+    {
+        $this->visit('/get_date');
+        $this->assertResponseOk();
+        $log = $this->util->get_log();
+        $this->assertTrue($this->util->check_error($log), $log);
+        $this->assertTrue($this->util->check_span($log,["app\common\AppDate::outputDate","date"]), $log);
+    }
+
+//     public function testFunc1()
+//     {
+//         $this->visit('/test_func1');
+//         $this->assertResponseOk();
+//         $log = $this->util->get_log();
+//         $this->assertTrue($this->util->check_error($log), $log);
+//         $this->assertTrue($this->util->check_span($log,["app\common\AopFunction::test_func1"]), $log);
+//     }
+
+    public function testFunc2Caller()
+    {
+        $this->visit('/test_func2_caller');
+        $this->assertResponseOk();
+        $log = $this->util->get_log();
+        $this->assertTrue($this->util->check_error($log), $log);
+        $this->assertTrue($this->util->check_span($log,["app\common\AopFunction::test_func2", "app\util\Foo::test_func_2"]), $log);
+    }
+
+    public function testInherit()
+    {
+        $this->visit('/test_inherit_func');
+        $this->assertResponseOk();
+        $log = $this->util->get_log();
+        $this->assertTrue($this->util->check_error($log), $log);
+        $this->assertTrue($this->util->check_span($log,["app\common\Person::eat", "app\common\Teacher::eat", "app\common\Student::eat", "app\common\Doctor::other"]), $log);    # "app\common\Doctor::eat"
+    }
+
+    public function testGenerator()
+    {
+        $this->visit('/test_generator_func');
+        $this->assertResponseOk();
+        $log = $this->util->get_log();
+        $this->assertTrue($this->util->check_error($log), $log);
+        $this->assertTrue($this->util->check_span($log,["app\common\TestGenerator::generator", "next"]), $log);
+    }
+
+    public function testAbstract()
+    {
+        $this->visit('/test_abstract_func');
+        $this->assertResponseOk();
+        $log = $this->util->get_log();
+        $this->assertTrue($this->util->check_error($log), $log);
+        $this->assertTrue($this->util->check_span($log,["app\common\AbstractStudent::eat", "app\common\AbstractStudent::drink", "app\common\AbstractPerson::breath"]), $log);   # "app\common\AbstractStudent::breath"
+    }
+
+    public function testInterface()
+    {
+        $this->visit('/test_interface_func');
+        $this->assertResponseOk();
+        $log = $this->util->get_log();
+        $this->assertTrue($this->util->check_error($log), $log);
+        $this->assertTrue($this->util->check_span($log,["app\common\InterfaceStudent::setVariable", "app\common\InterfaceStudent::getHtml", "app\common\InterfaceStudent::other"]), $log);
+    }
+
+    public function testClone()
+    {
+        $this->visit('/test_clone');
+        $this->assertResponseOk();
+        $log = $this->util->get_log();
+        $this->assertTrue($this->util->check_error($log), $log);
+        $this->assertTrue($this->util->check_span($log,["app\common\TestClone::setColor", "app\common\TestClone::getColor", "app\common\TestClone::__clone"]), $log);
+    }
+
+    public function testRecursion()
+    {
+        $this->visit('/test_recursion');
+        $this->assertResponseOk();
+        $log = $this->util->get_log();
+        $this->assertTrue($this->util->check_error($log), $log);
+        $this->assertTrue($this->util->check_span($log,["app\common\TestRecursion::test_cumsum1"]), $log);    #, "app\common\TestRecursion::test_cumsum2"
+    }
+
+    public function testAnonymous()
+    {
+        $this->visit('/test_anonymous');
+        $this->assertResponseOk();
+        $log = $this->util->get_log();
+        $this->assertTrue($this->util->check_error($log), $log);
+        $this->assertTrue($this->util->check_span($log,["app\common\TestAnonymous::createbell", "app\common\AopFunction::test_func1"]), $log);
+    }
+
+    public function testStatic()
+    {
+        $this->visit('/test_static');
+        $this->assertResponseOk();
+        $log = $this->util->get_log();
+        $this->assertTrue($this->util->check_error($log), $log);
+        $this->assertTrue($this->util->check_span($log,["app\common\TestStatic::static_func"]), $log);
+    }
+
+    public function testFinalClass()
+    {
+        $this->visit('/test_final_class');
+        $this->assertResponseOk();
+        $log = $this->util->get_log();
+        $this->assertTrue($this->util->check_error($log), $log);
+        $this->assertTrue($this->util->check_span($log,["app\common\TestFinalClass::test"]), $log);
+    }
+
+    public function testFinalFunc()
+    {
+        $this->visit('/test_final_func');
+        $this->assertResponseOk();
+        $log = $this->util->get_log();
+        $this->assertTrue($this->util->check_error($log), $log);
+        $this->assertTrue($this->util->check_span($log,["app\common\TestFinalFunc::test"]), $log);
+    }
+
+    public function testTrait()
+    {
+        $this->visit('/test_trait');
+        $this->assertResponseOk();
+        $log = $this->util->get_log();
+        $this->assertTrue($this->util->check_error($log), $log);
+        $this->assertTrue($this->util->check_span($log,["app\common\FuncInTrait::traitfunc", "app\common\TestTrait::test"]), $log);
+    }
+
+    public function testCallback()
+    {
+        $this->visit('/test_callback');
+        $this->assertResponseOk();
+        $log = $this->util->get_log();
+        $this->assertTrue($this->util->check_error($log), $log);
+        $this->assertTrue($this->util->check_span($log,["app\common\CallBackFunc::fnCallback1", "app\common\CallBackFunc::fnCallback2"]), $log);
+    }
+
+    public function testLevel()
+    {
+        $this->visit('/test_level');
+        $this->assertResponseOk();
+        $log = $this->util->get_log();
+        $this->assertTrue($this->util->check_error($log), $log);
+        $this->assertTrue($this->util->check_span($log,["app\common\LevelClass::public_function", "app\common\LevelClass::protected_function", "app\common\LevelClass::private_function", "app\common\OverRideLevel::public_function", "app\common\OverRideLevel::protected_function"]), $log);
+    }
+
+    public function testArgs()
+    {
+        $this->visit('/test_args');
+        $this->assertResponseOk();
+        $log = $this->util->get_log();
+        $this->assertTrue($this->util->check_error($log), $log);
+        $this->assertTrue($this->util->check_span($log,["app\common\TestArgs::test_args","[1] => 123","3.1415","[4] => Array","[5] => app\index\controller\SObject Object", "[6] => app\index\controller\SObjectString Object","[7] => abcd", "[8] => Resource id","[9] => Hello you! How are you today?"]), $log);
+    }
+
+    public function testReturn()
+    {
+        $this->visit('/test_return');
+        $this->assertResponseOk();
+        $log = $this->util->get_log();
+        $this->assertTrue($this->util->check_error($log), $log);
+        $this->assertTrue($this->util->check_span($log,["app\common\TestReturn::test_return","[0] =>", "[0] => 123", "[0] => 3.1415", "[0] => 1", "[0] => Array", "[0] => app\index\controller\SObject Object", "[0] => app\index\controller\SObjectString Object","[0] => abcd", "[0] => Resource id", "[0] => Hello you! How are you today?"]), $log);
+    }
+
+    public function testException()
+    {
+        $this->get('/test_uncaught_exception');
+        $log = $this->util->get_log();
+        $this->assertTrue($this->util->check_error($log), $log);
+        $this->assertTrue($this->util->check_span($log,["app\common\TestError::throwException", "EXP value:throw some thing"]), $log);
+    }
+
+    public function testCurl()
+    {
+        $_GET['remote'] = 'http%3A%2F%2Fwww.baidu.com';
+        $this->get('/test_curl');
+        $this->assertResponseOk();
+        $log = $this->util->get_log();
+        $this->assertTrue($this->util->check_error($log), $log);
+        $this->assertTrue($this->util->check_span($log,["curl_exec", "key:dst", "nsid"]), $log);
+    }
+
+    public function testGuzzle()
+    {
+        $this->visit('/test_guzzle');
+        $this->assertResponseOk();
+        $log = $this->util->get_log();
+        $this->assertTrue($this->util->check_error($log), $log);
+        $this->assertTrue($this->util->check_span($log,["GuzzleHttp\Client::request","key:dst value:www.baidu.com", "nsid"]), $log);
+    }
+
+    public function testPDO()
+    {
+        $this->visit('/test_pdo');
+        $this->assertResponseOk();
+        $log = $this->util->get_log();
+        $this->assertTrue($this->util->check_error($log), $log);
+        $this->assertTrue($this->util->check_span($log,["dst value:localhost", "PDO::prepare", "PDOStatement::execute", "PDOStatement::fetchAll"]), $log);
+    }
+
+    public function testRedis()
+    {
+        $this->visit('/test_redis');
+        $this->assertResponseOk();
+        $log = $this->util->get_log();
+        $this->assertTrue($this->util->check_error($log), $log);
+        $this->assertTrue($this->util->check_span($log,["Redis::set","Redis::get"]), $log);
+    }
+}
diff --git a/testapps/PHP/tests/TestCase.php b/testapps/PHP/tests/TestCase.php
new file mode 100644
index 000000000..cd63f869a
--- /dev/null
+++ b/testapps/PHP/tests/TestCase.php
@@ -0,0 +1,37 @@
+<?php
+// +----------------------------------------------------------------------
+// | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2006-2015 http://thinkphp.cn All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+// +----------------------------------------------------------------------
+// | Author: yunwuxin <448901948@qq.com>
+// +----------------------------------------------------------------------
+namespace tests;
+
+require_once __DIR__."/config.php";
+use tests\Util;
+
+class TestCase extends \think\testing\TestCase
+{
+    protected $baseUrl = 'http://localhost';
+    protected $util;
+
+    /**
+     * @before
+     */
+    public function beforeTest()
+    {
+        file_put_contents(PHP_LOG_PATH, "");
+        $this->util = new Util();
+    }
+
+    /**
+     * @after
+     */
+//    public function clearPhpLog()
+//    {
+//        file_put_contents(PHP_LOG_PATH, "");
+//    }
+}
\ No newline at end of file
diff --git a/testapps/PHP/tests/Util.php b/testapps/PHP/tests/Util.php
new file mode 100644
index 000000000..aa9351e66
--- /dev/null
+++ b/testapps/PHP/tests/Util.php
@@ -0,0 +1,38 @@
+<?php
+
+
+namespace tests;
+
+$errors= ["PHP Warning", "Fatal error", "Deprecated", "Declaration"];
+
+class Util
+{
+    public function get_log(){
+        $logfile = fopen(PHP_LOG_PATH, "r") or die("Unable to open file!");
+        $log = fread($logfile, filesize(PHP_LOG_PATH));
+        fclose($logfile);
+        return $log;
+    }
+
+    public function check_error($str){
+        $errors= ["PHP Warning", "Fatal error", "Deprecated", "Declaration"];
+        foreach($errors as $err){
+            if(strpos($str, $err) !== false){
+                return false;
+            }
+        }
+        return true;
+    }
+
+    public function check_span($span, $values=[]){
+        if(count($values)!==0){
+            foreach($values as $value){
+                if(strpos($span, $value) == false){
+                    return false;
+                }
+            }
+        }
+        return true;
+    }
+
+}
\ No newline at end of file
diff --git a/testapps/PHP/tests/config.php b/testapps/PHP/tests/config.php
new file mode 100644
index 000000000..3398174e1
--- /dev/null
+++ b/testapps/PHP/tests/config.php
@@ -0,0 +1,4 @@
+<?php
+
+## php error log path
+define("PHP_LOG_PATH", __DIR__."/php_error.log");
\ No newline at end of file
diff --git a/testapps/PHP/tests/script.sql b/testapps/PHP/tests/script.sql
new file mode 100644
index 000000000..5de38e553
--- /dev/null
+++ b/testapps/PHP/tests/script.sql
@@ -0,0 +1,13 @@
+CREATE DATABASE DBTest;
+CREATE USER 'test'@'%' IDENTIFIED BY '123456';
+GRANT ALL ON *.* TO 'test'@'%' IDENTIFIED BY '123456';
+flush privileges;
+use DBTest;
+CREATE TABLE `user` (
+        `id` INT NOT NULL AUTO_INCREMENT,
+        `name` VARCHAR(100) NOT NULL,
+        `age` INT,
+        `city` VARCHAR(100),
+	PRIMARY KEY (`id`)
+);
+ALTER TABLE user ADD UNIQUE KEY id_idx (id);
diff --git a/testapps/PHP/tests/think b/testapps/PHP/tests/think
new file mode 100644
index 000000000..d929d1294
--- /dev/null
+++ b/testapps/PHP/tests/think
@@ -0,0 +1,31 @@
+#!/usr/bin/env php
+<?php
+// +----------------------------------------------------------------------
+// | ThinkPHP [ WE CAN DO IT JUST THINK ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2006-2018 http://thinkphp.cn All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+// +----------------------------------------------------------------------
+// | Author: yunwuxin <448901948@qq.com>
+// +----------------------------------------------------------------------
+
+namespace think;
+
+// 加载基础文件
+require __DIR__ . '/thinkphp/base.php';
+
+###################################################################
+define('AOP_CACHE_DIR', __DIR__ . '/Cache/');
+define('PLUGINS_DIR', __DIR__ . '/Plugins/');
+define('APPLICATION_NAME','thinkphp'); // your application name
+define('APPLICATION_ID','thinkphp');  // your application id
+define('PINPOINT_USE_CACHE','YES');
+require_once __DIR__ . '/vendor/pinpoint-apm/pinpoint-php-aop/auto_pinpointed.php';
+###################################################################
+
+// 应用初始化
+Container::get('app')->path(__DIR__ . '/application/')->initialize();
+
+// 控制台初始化
+Console::init();
\ No newline at end of file
diff --git a/testapps/PHP/think b/testapps/PHP/think
new file mode 100644
index 000000000..6a923b354
--- /dev/null
+++ b/testapps/PHP/think
@@ -0,0 +1,22 @@
+#!/usr/bin/env php
+<?php
+// +----------------------------------------------------------------------
+// | ThinkPHP [ WE CAN DO IT JUST THINK ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2006-2018 http://thinkphp.cn All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+// +----------------------------------------------------------------------
+// | Author: yunwuxin <448901948@qq.com>
+// +----------------------------------------------------------------------
+
+namespace think;
+
+// 加载基础文件
+require __DIR__ . '/thinkphp/base.php';
+
+// 应用初始化
+Container::get('app')->path(__DIR__ . '/application/')->initialize();
+
+// 控制台初始化
+Console::init();
\ No newline at end of file
diff --git a/testapps/PY/Readme-CN.md b/testapps/PY/Readme-CN.md
index 0fb50a0de..c57a1712a 100644
--- a/testapps/PY/Readme-CN.md
+++ b/testapps/PY/Readme-CN.md
@@ -22,7 +22,7 @@
     
     
     ```
-    from pinpoint.common import PinpointCommonPlugin
+    from pinpointPy.CommonPlugin import PinpointCommonPlugin
     
     
     @PinpointCommonPlugin( __name__)
diff --git a/testapps/PY/Readme.md b/testapps/PY/Readme.md
index 4b01d3fe6..106d2efa3 100644
--- a/testapps/PY/Readme.md
+++ b/testapps/PY/Readme.md
@@ -22,7 +22,7 @@
     
     
     ```
-    from pinpoint.common import PinpointCommonPlugin
+    from pinpointPy.CommonPlugin import PinpointCommonPlugin
     
     
     @PinpointCommonPlugin(__name__)
diff --git a/testapps/PY/app.py b/testapps/PY/app.py
index 401586c61..cc00d5ad6 100644
--- a/testapps/PY/app.py
+++ b/testapps/PY/app.py
@@ -35,7 +35,9 @@
 import test_decorator
 import test_partial
 import test_band
-from pinpoint.Flask.PinPointMiddleWare import PinPointMiddleWare
+from pinpointPy.Flask.PinPointMiddleWare import PinPointMiddleWare
+from pinpointPy import set_agent,monkey_patch_for_pinpoint
+monkey_patch_for_pinpoint()
 from test_band import BandClass
 import test_mixin
 import test_special
@@ -52,6 +54,8 @@
 
 app = Flask(__name__)
 
+set_agent("flask-agent","FLASK-AGENT",'tcp:dev-collector:9999',-1)
+
 app.wsgi_app = PinPointMiddleWare(app,app.wsgi_app)
 
 @app.route('/', methods=['GET', 'POST'])
@@ -142,7 +146,7 @@ def test_generator_form():
 
 @app.route('/test_higher_order', methods=['GET'])
 def test_higher_order_form():
-    from pinpoint.common import PinpointCommonPlugin
+    from pinpointPy.CommonPlugin import PinpointCommonPlugin
     @PinpointCommonPlugin(__name__)
     def f(x):
         return x * x
diff --git a/testapps/PY/app1/user_function.py b/testapps/PY/app1/user_function.py
index b2426a46e..4d1a43f58 100644
--- a/testapps/PY/app1/user_function.py
+++ b/testapps/PY/app1/user_function.py
@@ -1,10 +1,10 @@
 #!/usr/bin/env python
 # -*- coding: UTF-8 -*-
 
-from pinpoint.common import PinpointCommonPlugin
+from pinpointPy.CommonPlugin import PinpointCommonPlugin
 
 
-@PinpointCommonPlugin(__name__)
+@PinpointCommonPlugin(__name__+".test_func3")
 def test_func3(arg1, arg2):
     return "this is test_func1: arg1=%s, arg2=%s"%(arg1, arg2)
 
@@ -14,6 +14,6 @@ def __init__(self, name, score):
         self.name = name
         self.score = score
 
-    @PinpointCommonPlugin(__name__)
+    @PinpointCommonPlugin(__name__+".TestUserFunc2.test_func4")
     def test_func4(self):
         return "%s\'s score is : %s"%(self.name, self.score)
\ No newline at end of file
diff --git a/testapps/PY/doctor.py b/testapps/PY/doctor.py
index 4a122f8a4..d328ea3e4 100644
--- a/testapps/PY/doctor.py
+++ b/testapps/PY/doctor.py
@@ -2,11 +2,11 @@
 # -*- coding: UTF-8 -*-
 
 from person import Person
-from pinpoint.common import PinpointCommonPlugin
+from pinpointPy.CommonPlugin import PinpointCommonPlugin
 
 
 class Doctor(Person):
 
-    @PinpointCommonPlugin("Doctor"+ __name__)
+    @PinpointCommonPlugin(__name__+".Doctor.other")
     def other(self):
         return "Doctor not eating!"
diff --git a/testapps/PY/person.py b/testapps/PY/person.py
index d1e26915c..0d4357fef 100644
--- a/testapps/PY/person.py
+++ b/testapps/PY/person.py
@@ -1,10 +1,10 @@
 #!/usr/bin/env python
 # -*- coding: UTF-8 -*-
 
-from pinpoint.common import PinpointCommonPlugin
+from pinpointPy.CommonPlugin import PinpointCommonPlugin
 
 
 class Person(object):
-    @PinpointCommonPlugin("Person."+__name__)
+    @PinpointCommonPlugin(__name__+".Person.eat")
     def eat(self):
         return "father eating!"
diff --git a/testapps/PY/student.py b/testapps/PY/student.py
index 433164d27..027824469 100644
--- a/testapps/PY/student.py
+++ b/testapps/PY/student.py
@@ -2,10 +2,10 @@
 # -*- coding: UTF-8 -*-
 
 from person import Person
-from pinpoint.common import PinpointCommonPlugin
+from pinpointPy.CommonPlugin import PinpointCommonPlugin
 
 
 class Student(Person):
-    @PinpointCommonPlugin("Student"+ __name__)
+    @PinpointCommonPlugin(__name__+".Student.eat")
     def eat(self):
         return "Student eating"
diff --git a/testapps/PY/teacher.py b/testapps/PY/teacher.py
index 6f176fadd..95cb41300 100644
--- a/testapps/PY/teacher.py
+++ b/testapps/PY/teacher.py
@@ -2,11 +2,11 @@
 # -*- coding: UTF-8 -*-
 
 from person import Person
-from pinpoint.common import PinpointCommonPlugin
+from pinpointPy.CommonPlugin import PinpointCommonPlugin
 
 
 class Teacher(Person):
 
-    @PinpointCommonPlugin("Teacher"+__name__)
+    @PinpointCommonPlugin(__name__+".Teacher.eat")
     def eat(self):
         return super().eat()+"Teacher eating too!"
diff --git a/testapps/PY/test_abstract.py b/testapps/PY/test_abstract.py
index 5bacb6063..2ddca6268 100644
--- a/testapps/PY/test_abstract.py
+++ b/testapps/PY/test_abstract.py
@@ -3,18 +3,18 @@
 
 
 import abc
-from pinpoint.common import PinpointCommonPlugin
+from pinpointPy.CommonPlugin import PinpointCommonPlugin
 
 
 class AllFle(metaclass=abc.ABCMeta):
     all_type='file'
-    @PinpointCommonPlugin('AllFle'+ __name__)
+    @PinpointCommonPlugin(__name__+'.AllFle.read')
     @abc.abstractmethod
     def read(self):
         pass
 
 
 class Txt(AllFle):
-    @PinpointCommonPlugin('Txt'+__name__)
+    @PinpointCommonPlugin(__name__+'.Txt.read')
     def read(self):
         return "Reading txt!"
diff --git a/testapps/PY/test_args.py b/testapps/PY/test_args.py
index 1e49e5db0..31d8b9d56 100644
--- a/testapps/PY/test_args.py
+++ b/testapps/PY/test_args.py
@@ -1,16 +1,16 @@
 #!/usr/bin/env python
 # -*- coding: UTF-8 -*-
 
-from pinpoint.common import PinpointCommonPlugin
+from pinpointPy.CommonPlugin import PinpointCommonPlugin
 
 
-@PinpointCommonPlugin( __name__)
+@PinpointCommonPlugin( __name__+".test_args1")
 def test_args1(arg):
     h = str(type(arg))[8:-2]
     return h
 
 
-@PinpointCommonPlugin(__name__)
+@PinpointCommonPlugin(__name__+".test_args2")
 def test_args2(a1, a2="Mer", *a3, **a4):
     h = "Positional arg:" + a1 + "<br>Default arg:" + a2 + "<br>Variadic arg:" + "<br>Variadic arg:[" + ','.join(a3) + "]<br>Keyword arg:" + str(a4)
     return h
diff --git a/testapps/PY/test_band.py b/testapps/PY/test_band.py
index 66f468ab1..6812d6ffe 100644
--- a/testapps/PY/test_band.py
+++ b/testapps/PY/test_band.py
@@ -1,10 +1,10 @@
 #!/usr/bin/env python
 # -*- coding: UTF-8 -*-
 
-from pinpoint.common import PinpointCommonPlugin
+from pinpointPy.CommonPlugin import PinpointCommonPlugin
 
 
-@PinpointCommonPlugin(__name__)
+@PinpointCommonPlugin(__name__+".band_func")
 def band_func(self, x):
     self.x = x
     return self.x * self.x
diff --git a/testapps/PY/test_decorator.py b/testapps/PY/test_decorator.py
index 0f590c21c..352cd13e3 100644
--- a/testapps/PY/test_decorator.py
+++ b/testapps/PY/test_decorator.py
@@ -2,7 +2,7 @@
 # -*- coding: UTF-8 -*-
 
 import functools
-from pinpoint.common import PinpointCommonPlugin
+from pinpointPy.CommonPlugin import PinpointCommonPlugin
 
 
 def log(text):
@@ -15,6 +15,6 @@ def wrapper(*args, **kw):
     return decorator
 
 @log('execute')
-@PinpointCommonPlugin(__name__)
+@PinpointCommonPlugin(__name__+".func_in_decorator")
 def func_in_decorator(x):
     return x * x
\ No newline at end of file
diff --git a/testapps/PY/test_exception.py b/testapps/PY/test_exception.py
index 9e4598ba4..e37916202 100644
--- a/testapps/PY/test_exception.py
+++ b/testapps/PY/test_exception.py
@@ -1,10 +1,10 @@
 #!/usr/bin/env python
 # -*- coding: UTF-8 -*-
 
-from pinpoint.common import PinpointCommonPlugin
+from pinpointPy.CommonPlugin import PinpointCommonPlugin
 
 
-@PinpointCommonPlugin(__name__)
+@PinpointCommonPlugin(__name__+"test_nameerror")
 def test_nameerror(arg):
     xxx(arg, 123)
     return "Call an undefined function."
@@ -13,7 +13,7 @@ def test_nameerror(arg):
 #     return "Test SyntaxError!"
 
 
-@PinpointCommonPlugin( __name__)
+@PinpointCommonPlugin( __name__+".test_ZeroDivisionError")
 def test_ZeroDivisionError(arg):
     return 3/arg
 
@@ -28,7 +28,7 @@ def __str__(self):
         return self.value
 
 
-@PinpointCommonPlugin(__name__)
+@PinpointCommonPlugin(__name__+".test_userexception")
 def test_userexception(arg):
     if arg == "Evy":
         raise UserDefineException(arg)
@@ -36,7 +36,7 @@ def test_userexception(arg):
         return arg
 
 
-@PinpointCommonPlugin(__name__)
+@PinpointCommonPlugin(__name__+".test_exception_in_recursion")
 def test_exception_in_recursion(n):
     if n > 0:
         return n/test_exception_in_recursion(n-1)
diff --git a/testapps/PY/test_function.py b/testapps/PY/test_function.py
index 401c8a2e0..acb0313f1 100644
--- a/testapps/PY/test_function.py
+++ b/testapps/PY/test_function.py
@@ -1,9 +1,9 @@
 #!/usr/bin/env python
 # -*- coding: UTF-8 -*-
-from pinpoint.common import PinpointCommonPlugin
+from pinpointPy.CommonPlugin import PinpointCommonPlugin
 
 
-@PinpointCommonPlugin(__name__)
+@PinpointCommonPlugin(__name__+".test_func1")
 def test_func1(arg1, arg2):
     return "this is test_func1: arg1=%s, arg2=%s"%(arg1, arg2)
 
@@ -14,7 +14,7 @@ def __init__(self, name, score):
         self.name = name
         self.score = score
 
-    @PinpointCommonPlugin(__name__)
+    @PinpointCommonPlugin(__name__+".TestUserFunc1.test_func2")
     def test_func2(self):
         return "%s\'s score is : %s"%(self.name, self.score)
 
diff --git a/testapps/PY/test_generatior.py b/testapps/PY/test_generatior.py
index 1f528add0..fe5b00d2a 100644
--- a/testapps/PY/test_generatior.py
+++ b/testapps/PY/test_generatior.py
@@ -1,9 +1,9 @@
 #!/usr/bin/env python
 # -*- coding: UTF-8 -*-
 
-from pinpoint.common import PinpointCommonPlugin
+from pinpointPy.CommonPlugin import PinpointCommonPlugin
 
-@PinpointCommonPlugin( __name__)
+@PinpointCommonPlugin( __name__+".fib")
 def fib(max):
     n, a, b = 0, 0, 1
     while n < max:
diff --git a/testapps/PY/test_higher_order.py b/testapps/PY/test_higher_order.py
index 9884da335..d2281355c 100644
--- a/testapps/PY/test_higher_order.py
+++ b/testapps/PY/test_higher_order.py
@@ -1,8 +1,8 @@
 #!/usr/bin/env python
 # -*- coding: UTF-8 -*-
-from pinpoint.common import PinpointCommonPlugin
+from pinpointPy.CommonPlugin import PinpointCommonPlugin
 
 
-@PinpointCommonPlugin( __name__)
+@PinpointCommonPlugin( __name__+".f")
 def f(x:int):
     return x * x
diff --git a/testapps/PY/test_lambda.py b/testapps/PY/test_lambda.py
index 0b16b69a8..c86645524 100644
--- a/testapps/PY/test_lambda.py
+++ b/testapps/PY/test_lambda.py
@@ -1,15 +1,15 @@
 #!/usr/bin/env python
 # -*- coding: UTF-8 -*-
 
-from pinpoint.common import PinpointCommonPlugin
+from pinpointPy.CommonPlugin import PinpointCommonPlugin
 
 
-@PinpointCommonPlugin(__name__)
+@PinpointCommonPlugin(__name__+".in_lambda")
 def in_lambda(b):
     return b * b
 
 
-@PinpointCommonPlugin( __name__)
+@PinpointCommonPlugin( __name__+".return_lambda")
 def return_lambda(a):
     return lambda: in_lambda(a)
 
diff --git a/testapps/PY/test_mixin.py b/testapps/PY/test_mixin.py
index 7388f561a..4dd52ef4f 100644
--- a/testapps/PY/test_mixin.py
+++ b/testapps/PY/test_mixin.py
@@ -1,22 +1,22 @@
 #!/usr/bin/env python
 # -*- coding: UTF-8 -*-
 
-from pinpoint.common import PinpointCommonPlugin
+from pinpointPy.CommonPlugin import PinpointCommonPlugin
 
 
 class Animal(object):
-    @PinpointCommonPlugin('Animal.'+__name__)
+    @PinpointCommonPlugin(__name__+'.Animal.animal_func')
     def animal_func(self):
         return " and I am an animal"
 
 
 class ThinkMixIn(object):
-    @PinpointCommonPlugin('ThinkMixIn.'+__name__)
+    @PinpointCommonPlugin(__name__+'.ThinkMixIn.think_func')
     def think_func(self):
         return " and I can think"
 
 
 class Human(Animal, ThinkMixIn):
-    @PinpointCommonPlugin('Human.'+ __name__)
+    @PinpointCommonPlugin( __name__+'.Human.human_func')
     def human_func(self):
         return "I am a human"
\ No newline at end of file
diff --git a/testapps/PY/test_partial.py b/testapps/PY/test_partial.py
index 89d8331c6..c2f5aa501 100644
--- a/testapps/PY/test_partial.py
+++ b/testapps/PY/test_partial.py
@@ -1,9 +1,9 @@
 #!/usr/bin/env python
 # -*- coding: UTF-8 -*-
 
-from pinpoint.common import PinpointCommonPlugin
+from pinpointPy.CommonPlugin import PinpointCommonPlugin
 
 
-@PinpointCommonPlugin( __name__)
+@PinpointCommonPlugin( __name__+".func1")
 def func1(a, b="Wool"):
     return a + b
diff --git a/testapps/PY/test_private.py b/testapps/PY/test_private.py
index 2bb4ea953..ec98b8692 100644
--- a/testapps/PY/test_private.py
+++ b/testapps/PY/test_private.py
@@ -1,15 +1,15 @@
 #!/usr/bin/env python
 # -*- coding: UTF-8 -*-
 
-from pinpoint.common import PinpointCommonPlugin
+from pinpointPy.CommonPlugin import PinpointCommonPlugin
 
 
 class Private(object):
-    @PinpointCommonPlugin('Private.'+ __name__)
+    @PinpointCommonPlugin(__name__+'.Private.__private_func')
     def __private_func(self, arg):
         return "Private called by " + arg
 
-    @PinpointCommonPlugin('Private.'+ __name__)
+    @PinpointCommonPlugin(__name__+'.Private.common_func')
     def common_func(self, name):
         r = self.__private_func(name)
         return r
diff --git a/testapps/PY/test_recursion.py b/testapps/PY/test_recursion.py
index 09d6c7c9e..7ac3d1802 100644
--- a/testapps/PY/test_recursion.py
+++ b/testapps/PY/test_recursion.py
@@ -1,10 +1,10 @@
 #!/usr/bin/env python
 # -*- coding: UTF-8 -*-
 
-from pinpoint.common import PinpointCommonPlugin
+from pinpointPy.CommonPlugin import PinpointCommonPlugin
 
 
-@PinpointCommonPlugin(__name__)
+@PinpointCommonPlugin(__name__+".fact")
 def fact(n):
     if n==1:
         return 1
diff --git a/testapps/PY/test_return.py b/testapps/PY/test_return.py
index 06a8f714c..d7b1d302f 100644
--- a/testapps/PY/test_return.py
+++ b/testapps/PY/test_return.py
@@ -1,11 +1,11 @@
 #!/usr/bin/env python
 # -*- coding: UTF-8 -*-
 
-from pinpoint.common import PinpointCommonPlugin
+from pinpointPy.CommonPlugin import PinpointCommonPlugin
 
 
 def lazy_sum(*args):
-    @PinpointCommonPlugin(__name__)
+    @PinpointCommonPlugin(__name__+".sum")
     def sum():
         ax = 0
         for n in args:
diff --git a/testapps/PY/test_returns.py b/testapps/PY/test_returns.py
index eb9022724..1110227fd 100644
--- a/testapps/PY/test_returns.py
+++ b/testapps/PY/test_returns.py
@@ -1,15 +1,15 @@
 #!/usr/bin/env python
 # -*- coding: UTF-8 -*-
 
-from pinpoint.common import PinpointCommonPlugin
+from pinpointPy.CommonPlugin import PinpointCommonPlugin
 
 
-@PinpointCommonPlugin(__name__)
+@PinpointCommonPlugin(__name__+".test_returns1")
 def test_returns1(arg):
     return arg
 
 
-@PinpointCommonPlugin( __name__)
+@PinpointCommonPlugin( __name__+".test_returns2")
 def test_returns2(a1, a2="Mer", *a3, **a4):
     a1 = a1 + " "
     a2 = a2 + "!"
diff --git a/testapps/PY/test_special.py b/testapps/PY/test_special.py
index a140fd03c..fefad326b 100644
--- a/testapps/PY/test_special.py
+++ b/testapps/PY/test_special.py
@@ -1,15 +1,15 @@
 #!/usr/bin/env python
 # -*- coding: UTF-8 -*-
 
-from pinpoint.common import PinpointCommonPlugin
+from pinpointPy.CommonPlugin import PinpointCommonPlugin
 
 
 class Special(object):
-    @PinpointCommonPlugin('Special.'+ __name__)
+    @PinpointCommonPlugin(__name__+'.Special.__init__')
     def __init__(self, name, age):
         self.name = name
         self.age = age
 
-    @PinpointCommonPlugin('Special.'+__name__)
+    @PinpointCommonPlugin(__name__+'.Special.common_func')
     def common_func(self):
         return "%s is %d years old." % (self.name, self.age)
diff --git a/testapps/PY/test_static_class_method.py b/testapps/PY/test_static_class_method.py
index 33fac0f2b..c3655568a 100644
--- a/testapps/PY/test_static_class_method.py
+++ b/testapps/PY/test_static_class_method.py
@@ -1,17 +1,17 @@
 #!/usr/bin/env python
 # -*- coding: UTF-8 -*-
 
-from pinpoint.common import PinpointCommonPlugin
+from pinpointPy.CommonPlugin import PinpointCommonPlugin
 
 
 class Method(object):
 
     @staticmethod
-    @PinpointCommonPlugin('Method'+ __name__)
+    @PinpointCommonPlugin(__name__+'.Method.static_method')
     def static_method(a, b):
         return a + b
 
     @classmethod
-    @PinpointCommonPlugin('Method'+__name__)
+    @PinpointCommonPlugin(__name__+'.Method.class_method')
     def class_method(cls, a, b):
         return cls.__name__ + a + b