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

Issue:
docs(Collector-Agent): Add Collector-Agent(go) doc
1.Add Collector-Agent(go) doc; 2. Delete Collector-Agent(python) doc; 3. Delete Collector-Agent(docker)
remove IMAGE_TAG
remove IMAGE_TAG


Discussion / hints:

Fix patch:
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index cd2a657c1..81bd71721 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -6,7 +6,7 @@ jobs:
   cpp:
     strategy:
       matrix:
-        os: [ubuntu-latest, macos-latest]
+        os: [ubuntu-18.04, macos-latest]
     runs-on: ${{ matrix.os }}
     steps:
       - uses: actions/checkout@v2
diff --git a/DOC/CollectorAgent/Readme-CN.md b/DOC/CollectorAgent/Readme-CN.md
deleted file mode 100644
index cb1d3d93f..000000000
--- a/DOC/CollectorAgent/Readme-CN.md
+++ /dev/null
@@ -1,50 +0,0 @@
-## Collector Agent 安装步骤
-
-#### 步骤
-在 collector-agent 目录下，执行以下命令：
-   1. python3 -m venv env
-   2. source env/bin/activate
-   3. pip3 install -r requirements.txt
-   4. 根据以下内容更改 conf/collector.conf 中的配置文件
-
-        ```ini
-        [Collector]
-        # collectorhost and specific port
-        ### 要使用thrift协议，pinpoint的版本需要在 1.8.0-RC1 以上
-        #CollectorSpanIp=collectorHost
-        #CollectorSpanPort=9905
-        #CollectorStatIp=collectorHost
-        #CollectorStatPort=9906
-        #CollectorTcpIp=collectorHost
-        #CollectorTcpPort=9907
-        ### 要使用grpc协议，pinpoint的版本需要在 2.0 以上
-        collector.grpc.agent.ip=collectorHost
-        collector.grpc.agent.port=9991
-        collector.grpc.stat.ip=collectorHost
-        collector.grpc.stat.port=9992
-        collector.grpc.span.ip=collectorHost
-        collector.grpc.span.port=9993
-        [Common]
-        # your web server (nginx&apache) port
-        Web_Port=8001   
-        # debug in dev
-        Log_Level=ERROR 
-        # 确保 LOG_DIR 是存在的
-        # 可以使用“tail -f”命令在此路径下查看collector-agent的实时日志
-        LOG_DIR=/your log dir/ 
-        [Agent]
-        # the same as below "pinpoint_php.CollectorHost"
-        # sock address
-        Address=/tmp/collector-agent.sock
-        # or TCP address
-        #Address=ip@port
-        ```
-        
-   5. export COLLECTOR_CONFIG=/full path of collector.conf/
-   6. Collector Agent的启动命令如下所示：
-        ```
-        $ ./init_python_env.sh
-        $ python run.py 
-        ```
-## Collector Agent Span Specification
-[Json string map to Pinpoint item](../API/collector-agent/Readme.md)
\ No newline at end of file
diff --git a/DOC/CollectorAgent/Readme.md b/DOC/CollectorAgent/Readme.md
deleted file mode 100644
index b942877bf..000000000
--- a/DOC/CollectorAgent/Readme.md
+++ /dev/null
@@ -1,50 +0,0 @@
-## Collector Agent Installation
-
-#### Steps
-Goto collector-agent
-   1. python3 -m venv env
-   2. source env/bin/activate
-   3. pip3 install -r requirements.txt
-   4. Change configuration file in conf/collector.conf
-
-        ```ini
-        [Collector]
-        # collectorhost and specific port
-        ### For thrift  pinpoint 1.8.0-RC1+
-        #CollectorSpanIp=collectorHost
-        #CollectorSpanPort=9905
-        #CollectorStatIp=collectorHost
-        #CollectorStatPort=9906
-        #CollectorTcpIp=collectorHost
-        #CollectorTcpPort=9907
-        ### For GRPC  pinpoint 2.0+
-        collector.grpc.agent.ip=collectorHost
-        collector.grpc.agent.port=9991
-        collector.grpc.stat.ip=collectorHost
-        collector.grpc.stat.port=9992
-        collector.grpc.span.ip=collectorHost
-        collector.grpc.span.port=9993
-        [Common]
-        # your web server (nginx&apache) port
-        Web_Port=8001   
-        # debug in dev
-        Log_Level=ERROR 
-        # make sure LOG_DIR is exist
-        # The real-time log of collector-agent can be checked under this path with the command " tail -f ".
-        LOG_DIR=/your log dir/ 
-        [Agent]
-        # the same as below "pinpoint_php.CollectorHost"
-        # sock address
-        Address=/tmp/collector-agent.sock
-        # or TCP address
-        #Address=ip@port
-        ```
-        
-   5. export COLLECTOR_CONFIG=/full path of collector.conf/
-   6. run  Collector Agent
-        ```
-        $ ./init_python_env.sh
-        $ python run.py 
-        ```
-## Collector Agent Span Specification
-[Json string map to Pinpoint item](../API/collector-agent/Readme.md)
\ No newline at end of file
diff --git a/DOC/PHP/Readme-CN.md b/DOC/PHP/Readme-CN.md
index 786ed389a..2a6322e11 100644
--- a/DOC/PHP/Readme-CN.md
+++ b/DOC/PHP/Readme-CN.md
@@ -11,7 +11,7 @@ PHP| php `7+` ,`5+`
 GCC| GCC `4.7+`
 cmake| cmake `3.8+`
 *inux|
-Python | `Python 3`
+GO |
 pinpoint| `1.8.0+`, `2.0+`
 **Composer**| 
 
@@ -20,14 +20,34 @@ pinpoint| `1.8.0+`, `2.0+`
 #### 步骤
 1. 执行命令：git clone https://github.com/pinpoint-apm/pinpoint-c-agent.git
 
-2. 自行构建Collector-Agent，或者使用Docker Collector-Agent(二选一)：
-   * [Collector-Agent 安装步骤 ☚](../CollectorAgent/Readme-CN.md)
-   * 使用Docker Collector-Agent：
-
-      ```
-      docker pull eeliu2020/pinpoint-collector-agent:latest 
-      docker run  --add-host collectorHost:your-pinpoint-hostname -d -p 9999:9999 eeliu2020/pinpoint-collector-agent
-      ```
+2. 在 collector-agent(`pinpoint-c-agent/collector-agent`) 目录下安装 `Collector-Agent`
+       
+    `Collector-Agent` 负责接收并格式化 `PHP/Python/C/CPP-Agent` 的请求数据然后转发给 `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安装包的根目录下，执行以下命令：
    1. phpize        
@@ -40,10 +60,8 @@ pinpoint| `1.8.0+`, `2.0+`
        >  php.ini 
         ```ini
         extension=pinpoint_php.so
-        ; Collector-agent's TCP address, ip,port:Collector-Agent's ip,port, please guarantee it consistent with that in step2(Build Collector-Agent).
+        ; Collector-agent's TCP address, ip,port:Collector-Agent's ip,port, please ensure it consistent with the `PP_ADDRESS` of `Collector-Agent` in step2(Build Collector-Agent).
         pinpoint_php.CollectorHost=Tcp:ip:port
-        ; or unix:(unix sock address)
-        ;pinpoint_php.CollectorHost=unix:/tmp/collector-agent.sock
         pinpoint_php.SendSpanTimeOutMs=0 # 0 is recommanded
         ; request should be captured duing 1 second. < 0 means no limited
         pinpoint_php.TraceLimit=-1 
diff --git a/DOC/PHP/Readme.md b/DOC/PHP/Readme.md
index 868024f73..3b8bc6712 100644
--- a/DOC/PHP/Readme.md
+++ b/DOC/PHP/Readme.md
@@ -8,6 +8,7 @@ What we have supported and what will support: [support plan](SupportPlan.md)
 Dependency|Version| More
 ---|----|----
 PHP| php `7+` ,`5+`|
+GO | | 
 GCC| GCC `4.7+`| C++11 
 cmake| cmake `3.2+`|
 *inux|| `windows is on the way`
@@ -19,13 +20,32 @@ composer| | class can be automatic pinpoint-cut
 #### Steps
 1. git clone https://github.com/pinpoint-apm/pinpoint-c-agent.git
    
-2. Build Collector-Agent yourself or use Dockerized Collector-Agent, just choose one:
-    * [Build Collector-Agent yourself ☚](../CollectorAgent/Readme.md)
-    * Use Dockerized Collector-Agent: [env.file](../../collector-agent/conf/env.file)
-        ```
-        docker pull eeliu2020/pinpoint-collector-agent:latest 
-        docker run --env-file path-to-env.file -d -p 9999:9999 eeliu2020/pinpoint-collector-agent
-        ```
+2. Goto collector-agent(`pinpoint-c-agent/collector-agent`) and build `Collector-Agent`
+
+    `Collector-Agent`, who formats the datas 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:
    1. phpize        
@@ -40,10 +60,8 @@ composer| | class can be automatic pinpoint-cut
        >  php.ini 
         ```ini
         extension=pinpoint_php.so
-        ; Collector-agent's TCP address, ip,port:Collector-Agent's ip,port, please insure it consistent with that in step2(Build Collector-Agent).
+        ; Collector-agent's TCP address, ip,port:Collector-Agent's ip,port, please ensure it consistent with the `PP_ADDRESS` of `Collector-Agent` in step2(Build Collector-Agent).
         pinpoint_php.CollectorHost=Tcp:ip:port
-        ; or unix:(unix sock address)
-        ;pinpoint_php.CollectorHost=unix:/tmp/collector-agent.sock
         pinpoint_php.SendSpanTimeOutMs=0 # 0 is recommanded
         ; request should be captured duing 1 second. < 0 means no limited
         pinpoint_php.TraceLimit=-1 
diff --git a/DOC/PY/Readme-CN.md b/DOC/PY/Readme-CN.md
index 9dd469250..c64104398 100644
--- a/DOC/PY/Readme-CN.md
+++ b/DOC/PY/Readme-CN.md
@@ -9,6 +9,7 @@
 ---|----
 python |python 3.5+
 python async|python 3.7.1+
+GO | | 
 gcc|gcc 4.7+
 cmake| 3.0+
 *inux| 
@@ -26,14 +27,33 @@ https://packaging.python.org/guides/installing-using-pip-and-virtual-environment
 $ pip install pinpointPy
 ```
 #### 安装 Collector Agent
-Collector-Agent有两种安装方法，任选其一：
-
-   1. [Collector-Agent 安装步骤 ☚](../CollectorAgent/Readme-CN.md)
-   2. 使用Docker Collector-Agent：
-      ```
-      docker pull eeliu2020/pinpoint-collector-agent:latest 
-      docker run  --add-host collectorHost:your-pinpoint-hostname -d -p 9999:9999 eeliu2020/pinpoint-collector-agent
-      ```
+`Collector-Agent` 负责接收并格式化 `PHP/Python/C/CPP-Agent` 的请求数据然后转发给 `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)
diff --git a/DOC/PY/Readme.md b/DOC/PY/Readme.md
index 872b83c0c..81f6d5e88 100644
--- a/DOC/PY/Readme.md
+++ b/DOC/PY/Readme.md
@@ -8,6 +8,7 @@ What we have supported and what we are going to support: [support plan](SupportP
 Dependency| Version| More
 ---|----|---
 python |2.7,3+ | (async must 3.7.1+)
+GO | | 
 gcc|gcc 4.7+| c++11
 cmake| 3.1+| ✔
 *inux|  | `windows` is on the way
@@ -22,19 +23,35 @@ $ 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-v0.0.1.tar.gz)
+[pinpoint-python-plugins.tar.gz](https://github.com/pinpoint-apm/pinpoint-c-agent/releases/download/v0.4.0/pinpoint-py-v0.4.0.zip)
 
 #### Install Collector Agent
-There are two ways to install Collector-Agent, just choose one:
+`Collector-Agent`, who formats the datas 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. [Build Collector-Agent yourself ☚](../CollectorAgent/Readme.md)
-2. Use Dockerized Collector-Agent:
-    [env.file](../../collector-agent/conf/env.file)
+1. Goto collector-agent(`pinpoint-c-agent/collector-agent`)
+2. Execute command `go build`
+3. Add environment variables:
     ```
-    docker pull eeliu2020/pinpoint-collector-agent:latest 
-    docker run --env-file path-to-env.file -d -p 9999:9999 eeliu2020/pinpoint-collector-agent
+    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)
diff --git a/README b/README
index b0c4e7046..00d8bd6e8 100644
--- a/README
+++ b/README
@@ -1,6 +1,7 @@
 ![Pinpoint](https://raw.githubusercontent.com/pinpoint-apm/pinpoint/master/web/psd/logo.png)
 
-[![Build Status](https://travis-ci.com/naver/pinpoint-c-agent.svg?branch=master)](https://travis-ci.com/pinpoint-apm/pinpoint-c-agent) [![Gitter](https://badges.gitter.im/pinpoint-apm/pinpoint-c-agent.svg)](https://gitter.im/pinpoint-apm/pinpoint-c-agent?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![codecov](https://codecov.io/gh/eeliu/pinpoint-c-agent/branch/dev/graph/badge.svg)](https://codecov.io/gh/eeliu/pinpoint-c-agent)
+[![Build](https://github.com/pinpoint-apm/pinpoint-c-agent/workflows/Build/badge.svg?branch=master)](https://github.com/pinpoint-apm/pinpoint-c-agent/actions) [![Gitter](https://badges.gitter.im/naver/pinpoint-c-agent.svg)](https://gitter.im/naver/pinpoint-c-agent?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![codecov](https://codecov.io/gh/pinpoint-apm/pinpoint-c-agent/branch/master/graph/badge.svg?token=KswbmFvWp3)](https://codecov.io/gh/pinpoint-apm/pinpoint-c-agent) [![License](https://img.shields.io/github/license/pinpoint-apm/pinpoint-c-agent)](LICENSE)
+
 
 
 **Visit [our official website](http://pinpoint-apm.github.io/pinpoint/) for more information and [the Latest updates on Pinpoint](https://pinpoint-apm.github.io/pinpoint/news.html)**  
diff --git a/collector-agent/.gitignore b/collector-agent/.gitignore
index 894a44cc0..3998ec69b 100644
--- a/collector-agent/.gitignore
+++ b/collector-agent/.gitignore
@@ -1,104 +1,6 @@
-# Byte-compiled / optimized / DLL files
-__pycache__/
-*.py[cod]
-*$py.class
-
-# C extensions
-*.so
-
-# Distribution / packaging
-.Python
-build/
-develop-eggs/
-dist/
-downloads/
-eggs/
-.eggs/
-lib/
-lib64/
-parts/
-sdist/
-var/
-wheels/
-*.egg-info/
-.installed.cfg
-*.egg
-MANIFEST
-
-# PyInstaller
-#  Usually these files are written by a python script from a template
-#  before PyInstaller builds the exe, so as to inject date/other infos into it.
-*.manifest
-*.spec
-
-# Installer logs
-pip-log.txt
-pip-delete-this-directory.txt
-
-# Unit test / coverage reports
-htmlcov/
-.tox/
-.coverage
-.coverage.*
-.cache
-nosetests.xml
-coverage.xml
-*.cover
-.hypothesis/
-.pytest_cache/
-
-# Translations
-*.mo
-*.pot
-
-# Django stuff:
+.*
+.idea
+!.gitignore
+*.exe
 *.log
-local_settings.py
-db.sqlite3
-
-# Flask stuff:
-instance/
-.webassets-cache
-
-# Scrapy stuff:
-.scrapy
-
-# Sphinx documentation
-docs/_build/
-
-# PyBuilder
-target/
-
-# Jupyter Notebook
-.ipynb_checkpoints
-
-# pyenv
-.python-version
-
-# celery beat schedule file
-celerybeat-schedule
-
-# SageMath parsed files
-*.sage.py
-
-# Environments
-.env
-.venv
-env/
-venv/
-ENV/
-env.bak/
-venv.bak/
-
-# Spyder project settings
-.spyderproject
-.spyproject
-
-# Rope project settings
-.ropeproject
-
-# mkdocs documentation
-/site
-
-# mypy
-.mypy_cache/
+CollectorAgent
diff --git a/collector-agent/CollectorAgent/Grpc.py b/collector-agent/CollectorAgent/Grpc.py
deleted file mode 100644
index 3cd3695e8..000000000
--- a/collector-agent/CollectorAgent/Grpc.py
+++ /dev/null
@@ -1,26 +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 10/21/19+
-
-
-# ready means channel is free to use
-CH_READY = 1
-# wait ....
-CH_NOT_READY = 0
diff --git a/collector-agent/CollectorAgent/GrpcAgent.py b/collector-agent/CollectorAgent/GrpcAgent.py
deleted file mode 100644
index fcedf1101..000000000
--- a/collector-agent/CollectorAgent/GrpcAgent.py
+++ /dev/null
@@ -1,222 +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 10/21/19
-
-import queue
-import threading
-import time
-
-import grpc
-
-import Service_pb2_grpc
-from CollectorAgent.GrpcClient import GrpcClient
-from Common.Logger import TCLogger
-from PinpointAgent.Type import PHP
-from Proto.grpc.Cmd_pb2 import PCmdMessage, PCmdServiceHandshake, PCommandType, PCmdActiveThreadCountRes, \
-    PCmdStreamResponse, PCmdActiveThreadLightDumpRes
-from Stat_pb2 import PAgentInfo, PPing
-
-
-class GrpcAgent(GrpcClient):
-    PINGID = 0
-
-    def __init__(self, hostname, ip, ports, pid, address, server_type=PHP, meta=None, get_req_stat=None,
-                 maxPending=-1, timeout=30, isContainer=False):
-        super().__init__(address, meta, maxPending)
-        self.hostname = hostname
-        self.ip = ip
-        self.pid = pid
-        self.is_ok = False
-        self.timeout = timeout
-        self.pingid = GrpcAgent.PINGID
-        GrpcAgent.PINGID += 1
-        self.exit_cv  = threading.Condition()
-        self.stub = Service_pb2_grpc.AgentStub(self.channel)
-        self.cmd_sub = Service_pb2_grpc.ProfilerCommandServiceStub(self.channel)
-        self.agentinfo = PAgentInfo(hostname=hostname, ip=ip, ports=ports, pid=pid, endTimestamp=-1,
-                                    serviceType=server_type, container=isContainer)
-        self.ping_meta = meta.append(('socketid', str(GrpcAgent.PINGID)))
-        self.profile_meta = meta
-        self.task_running = False
-        assert get_req_stat
-        self.get_req_stat = get_req_stat
-
-    def channelSetReady(self):
-        self.is_ok = True
-
-    def channelSetIdle(self):
-        self.is_ok = False
-
-    def channelSetError(self):
-        self.is_ok = False
-
-    def start(self):
-        self.task_running = True
-
-        self.agent_thread = threading.Thread(target=self._registerAgent)
-        self.agent_thread.start()
-
-        self.cmd_thread = threading.Thread(target=self._handleCommand)
-        self.cmd_thread.start()
-
-    class HandStreamIterator(object):
-         def __init__(self,start_msg):
-            self._response_queue = queue.Queue()
-            self._response_queue.put(start_msg)
-
-         def __next__(self):
-             response = self._response_queue.get()
-             if response:
-                return response
-             else:
-                TCLogger.info("HandStreamIterator stopped")
-                raise StopIteration()
-         def add_response(self,message):
-             self._response_queue.put(message)
-
-         def stop(self):
-             self._response_queue.put(None)
-
-    def _handleCommand(self):
-        handshake = PCmdServiceHandshake()
-        handshake.supportCommandServiceKey.append(PCommandType.PING)
-        handshake.supportCommandServiceKey.append(PCommandType.PONG)
-        handshake.supportCommandServiceKey.append(PCommandType.ACTIVE_THREAD_COUNT)
-        handshake.supportCommandServiceKey.append(PCommandType.ACTIVE_THREAD_DUMP)
-        handshake.supportCommandServiceKey.append(PCommandType.ACTIVE_THREAD_LIGHT_DUMP)
-        cmd = PCmdMessage(handshakeMessage=handshake)
-
-        while self.task_running:
-            self.cmd_pipe = GrpcAgent.HandStreamIterator(cmd)
-            # while self.task_running:
-            msg_iter = self.cmd_sub.HandleCommand(self.cmd_pipe, metadata=self.profile_meta)
-            try:
-                for msg in msg_iter:
-                    TCLogger.debug("command channel %s", msg)
-                    self._handleCmd(msg, self.cmd_pipe)
-                TCLogger.debug('iter_response is over')
-
-            except Exception as e:
-                TCLogger.error("handleCommand channel  %s error", e)
-            finally:
-                with self.exit_cv:
-                    ## hard code 300->5
-                    if not self.task_running or self.exit_cv.wait(5):
-                        break
-
-    def _send_thread_count(self,requestId):
-        channel = grpc.insecure_channel(self.address)
-        stub  = Service_pb2_grpc.ProfilerCommandServiceStub(channel)
-
-        def generator_cmd():
-            i = 0
-            while self.task_running:
-                try:
-                    cmd_response = PCmdStreamResponse(responseId=requestId, sequenceId=i)
-                    cmd_response.message.value = 'hello'
-                    threadCountRes = PCmdActiveThreadCountRes(commonStreamResponse=cmd_response)
-                    threadCountRes.histogramSchemaType = 2
-                    for stat in self.get_req_stat():
-                        threadCountRes.activeThreadCount.append(stat)
-                    threadCountRes.timeStamp = int(time.time())
-                    i += 1
-                    yield threadCountRes
-                    ## it's a templated task, don't use exit_cv
-                    time.sleep(1)
-                except Exception as e:
-                    TCLogger.warning("catch exception %s", e)
-                    break
-
-        try:
-            TCLogger.debug("new a thread for activeThreadCound %d", requestId)
-            stub.CommandStreamActiveThreadCount(generator_cmd(),metadata=self.profile_meta)
-            TCLogger.debug("send activeThreadCound requestId: %d is done", requestId)
-            channel.close()
-        except Exception as e:
-            TCLogger.error("CommandStreamActiveThreadCount, catch exception %s",e)
-    def _handleCmd(self,msg,cmdIter):
-        try:
-            if msg.HasField('commandEcho'):
-                pass
-            elif msg.HasField('commandActiveThreadCount'):
-                self.thread_count = threading.Thread(target=self._send_thread_count,args=(msg.requestId,))
-                self.thread_count.start()
-            elif msg.HasField('commandActiveThreadDump'):
-                pass
-
-            elif msg.HasField('commandActiveThreadLightDump'):
-                lightDumpRes =  PCmdActiveThreadLightDumpRes()
-                lightDumpRes.commonResponse.responseId = msg.requestId
-                lightDumpRes.type='java'
-                lightDumpRes.subType = 'oracle'
-                lightDumpRes.version = '1.8.105'
-                self.cmd_sub.CommandActiveThreadLightDump(lightDumpRes)
-            else:
-                TCLogger.warn("msg type not support:%s",msg)
-        except Exception as e:
-            TCLogger.error(e)
-
-
-    def _registerAgent(self):
-        while self.task_running:
-            try:
-                TCLogger.debug("sending agentinfo %s",self.agentinfo)
-                self.stub.RequestAgentInfo(self.agentinfo)
-            except Exception as e:
-                TCLogger.error(" pinpoint collector is not available. Try it again [%s] ", self.agentinfo)
-                continue
-            finally:
-                with self.exit_cv:
-                    if not self.task_running or self.exit_cv.wait(self.timeout):
-                        break
-            iter_response = self.stub.PingSession(self._pingPPing(), metadata=self.ping_meta)
-            try:
-                for response in iter_response:
-                    TCLogger.debug('get ping response:%s agentinfo:%s', response,self.meta)
-            except Exception as e:
-                TCLogger.error("ping response abort with exception: [%s]  %s",self.agentinfo, e)
-
-        TCLogger.info('agent thread exit: %s', self.task_running)
-
-
-    def _pingPPing(self):
-        while self.task_running:
-            ping = PPing()
-            TCLogger.debug("%s send ping", self)
-            yield ping
-            with self.exit_cv:
-                if not self.task_running or self.exit_cv.wait(self.timeout * 10):
-                    TCLogger.warning("generate ping exit")
-                    break
-
-
-    def __str__(self):
-        return 'agentclient: hostname:%s ip:%s  pid:%d address:%s' % (self.hostname, self.ip, self.pid, self.address)
-
-    def stop(self):
-        TCLogger.debug("agent thread try to stop")
-        self.task_running = False
-        with self.exit_cv:
-            self.exit_cv.notify_all()
-        self.cmd_pipe.stop()
-        self.agent_thread.join()
-        self.cmd_thread.join()
-        super().stop()
-        TCLogger.debug("agent thread exit")
\ No newline at end of file
diff --git a/collector-agent/CollectorAgent/GrpcAgentImplement.py b/collector-agent/CollectorAgent/GrpcAgentImplement.py
deleted file mode 100644
index 7f0778866..000000000
--- a/collector-agent/CollectorAgent/GrpcAgentImplement.py
+++ /dev/null
@@ -1,164 +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 10/16/19
-import json
-import multiprocessing
-import os
-from queue import Full, Queue
-
-from gevent import monkey
-
-monkey.patch_all(thread=False)
-from Common import agentHost
-from CollectorAgent.GrpcAgent import GrpcAgent
-from CollectorAgent.GrpcMeta import GrpcMeta
-from CollectorAgent.GrpcSpan import GrpcSpan
-from CollectorAgent.GrpcSpanFactory import GrpcSpanFactory
-from CollectorAgent.GrpcStat import GrpcStat
-from Common.Logger import TCLogger
-from PinpointAgent.PinpointAgent import PinpointAgent
-from PinpointAgent.Type import SUPPORT_GRPC, API_DEFAULT
-from Proto.grpc.Span_pb2 import PSpanMessage
-
-
-class GrpcAgentImplement(PinpointAgent):
-    class SpanHelper(object):
-        def __init__(self, span_addr, appid, appname, starttime,max_pending_sz):
-            self.agent_meta = [('starttime', str(starttime)), ('agentid', appid), ('applicationname', appname)]
-            self.agent_id = appid
-            self.agent_name = appname
-            self.span_addr = span_addr
-            self.max_pending_sz =max_pending_sz
-            self.span_queue = Queue(self.max_pending_sz)
-            self.span_client = GrpcSpan(self.span_addr, self.agent_meta, self.span_queue)
-            self.dropped_span_count=0
-
-        def start(self):
-            self.span_client.start()
-
-
-        def sendSpan(self, spanMesg):
-
-            try:
-                self.span_queue.put(spanMesg, False)
-            except Full as e:
-                self.dropped_span_count+=1
-                TCLogger.warning("span send queue is full")
-                return False
-            except Exception as e:
-                TCLogger.error("send span failed: %s", e)
-                return False
-            return True
-
-        def stop(self):
-            self.span_client.stop()
-            TCLogger.info("grpc agent dropped %d",self.dropped_span_count)
-
-    def __init__(self, ac, app_id, app_name, serviceType):
-        assert ac.collector_type == SUPPORT_GRPC
-        super().__init__(app_id, app_name)
-        self.agent_meta = [('starttime', str(ac.startTimestamp)),
-                           ('agentid', app_id),
-                           ('applicationname', app_name)]
-        self.startTimeStamp = ac.startTimestamp
-        self.service_type = serviceType
-        self.max_pending_sz = ac.max_pending_size
-        self.agent_addr = ac.CollectorAgentIp + ':' + str(ac.CollectorAgentPort)
-        self.stat_addr = ac.CollectorStatIp + ':' + str(ac.CollectorStatPort)
-        self.span_addr = ac.CollectorSpanIp + ':' + str(ac.CollectorSpanPort)
-        self.web_port = ac.getWebPort()
-        self.isContainer = ac.agentIsDocker
-        self.max_span_sender_size = 2
-        self.sender_index = 0
-
-    def start(self):
-        self.mpQueue = multiprocessing.Queue()
-        self.process = multiprocessing.Process(target=self.processMain)
-        self.process.start()
-
-    def processMain(self):
-        from PinpointAgent import stop_front_agent
-        stop_front_agent()
-
-        self.span_helper = GrpcAgentImplement.SpanHelper(self.span_addr, self.app_id, self.app_name,
-                                                         self.startTimeStamp,
-                                                         self.max_pending_sz)
-        self.agent_client = GrpcAgent(agentHost.hostname, agentHost.ip, self.web_port, os.getpid(),
-                                      self.agent_addr, self.service_type, self.agent_meta, self.getReqStat,
-                                      isContainer=self.isContainer)
-        self.meta_client = GrpcMeta(self.agent_addr, self.agent_meta)
-        self.stat_client = GrpcStat(self.stat_addr,self.agent_meta,self.getIntervalStat)
-        self.span_factory = GrpcSpanFactory(self)
-        self.agent_client.start()
-        self.meta_client.start()
-        self.stat_client.start()
-        self.span_helper.start()
-
-        self.loopTheQueue()
-
-        self.stopProcessMain()
-
-    def loopTheQueue(self):
-        while True:
-            try:
-                body = self.mpQueue.get()
-            except KeyboardInterrupt:
-                break
-            if body == None:
-                TCLogger.info("agent: %s stopping", self.agent_meta)
-                break
-            else:
-                content = body.decode('utf-8')
-                try:
-                    stack = json.loads(content)
-                except Exception as e:
-                    TCLogger.error("json is crash:[%s]",content)
-                    return
-
-                super().sendSpan(stack, body)
-                try:
-                    pSpan = self.span_factory.makeSpan(stack)
-                    spanMesg = PSpanMessage(span=pSpan)
-                except Exception as e:
-                    TCLogger.warn("interrupted by %s", e)
-                    continue
-                self.span_helper.sendSpan(spanMesg)
-
-    def asynSendSpan(self, stack, body):
-        self.mpQueue.put(body,timeout= 5,block=False)
-
-    def stop(self):
-        self.mpQueue.put(None, timeout=5)
-        self.process.join()
-
-    def stopProcessMain(self):
-        self.agent_client.stop()
-        self.meta_client.stop()
-        self.stat_client.stop()
-        self.span_helper.stop()
-
-    def updateApiMeta(self, name, type=API_DEFAULT):
-        return self.meta_client.updateApiMeta(name, -1, type)
-
-    def updateStringMeta(self, name):
-        return self.meta_client.updateStringMeta(name)
-
-    def updateSqlMeta(self, sql):
-        return self.meta_client.updateSqlMeta(sql)
diff --git a/collector-agent/CollectorAgent/GrpcClient.py b/collector-agent/CollectorAgent/GrpcClient.py
deleted file mode 100644
index 8e78bb28b..000000000
--- a/collector-agent/CollectorAgent/GrpcClient.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.
-# ------------------------------------------------------------------------------
-
-# Created by eeliu at 10/18/19
-
-import collections
-
-import grpc
-
-# copy from grpc example
-from Common.Logger import TCLogger
-
-
-class _GenericClientInterceptor(
-    grpc.UnaryUnaryClientInterceptor, grpc.UnaryStreamClientInterceptor,
-    grpc.StreamUnaryClientInterceptor, grpc.StreamStreamClientInterceptor):
-
-    def __init__(self, interceptor_function):
-        self._fn = interceptor_function
-
-    def intercept_unary_unary(self, continuation, client_call_details, request):
-        new_details, new_request_iterator, postprocess = self._fn(
-            client_call_details, iter((request,)), False, False)
-        response = continuation(new_details, next(new_request_iterator))
-        return postprocess(response) if postprocess else response
-
-    def intercept_unary_stream(self, continuation, client_call_details,
-                               request):
-        new_details, new_request_iterator, postprocess = self._fn(
-            client_call_details, iter((request,)), False, True)
-        response_it = continuation(new_details, next(new_request_iterator))
-        return postprocess(response_it) if postprocess else response_it
-
-    def intercept_stream_unary(self, continuation, client_call_details,
-                               request_iterator):
-        new_details, new_request_iterator, postprocess = self._fn(
-            client_call_details, request_iterator, True, False)
-        response = continuation(new_details, new_request_iterator)
-        return postprocess(response) if postprocess else response
-
-    def intercept_stream_stream(self, continuation, client_call_details,
-                                request_iterator):
-        new_details, new_request_iterator, postprocess = self._fn(
-            client_call_details, request_iterator, True, True)
-        response_it = continuation(new_details, new_request_iterator)
-        return postprocess(response_it) if postprocess else response_it
-
-
-class _ClientCallDetails(
-    collections.namedtuple(
-        '_ClientCallDetails',
-        ('method', 'timeout', 'metadata', 'credentials')),
-    grpc.ClientCallDetails):
-    pass
-
-
-class GrpcClient(object):
-    def __init__(self, address, meta=None, maxPending=-1, try_reconnect=True):
-        self.address = address
-        self.meta = None
-        self.max_pending_size = maxPending
-
-        channel = grpc.insecure_channel(address)
-
-        if meta is not None:
-            self.meta = meta
-            intercept_channel = grpc.intercept_channel(channel,
-                                                       GrpcClient.InterceptorAddHeader(meta))
-            channel = intercept_channel
-
-        self.channel = channel
-        self.channel.subscribe(self._channelStateChange, try_reconnect)
-
-    @staticmethod
-    def InterceptorAddHeader(header):
-        def intercept_call(client_call_details, request_iterator, request_streaming,
-                           response_streaming):
-            metadata = []
-            if client_call_details.metadata is not None:
-                metadata = list(client_call_details.metadata)
-            metadata += header
-            client_call_details = _ClientCallDetails(
-                client_call_details.method, client_call_details.timeout, metadata,
-                client_call_details.credentials)
-            return client_call_details, request_iterator, None
-
-        return _GenericClientInterceptor(intercept_call)
-
-    def _channelStateChange(self, activity):
-        if activity == grpc.ChannelConnectivity.TRANSIENT_FAILURE:
-            self.channelSetError()
-        elif activity == grpc.ChannelConnectivity.READY:
-            self.channelSetReady()
-        elif activity == grpc.ChannelConnectivity.IDLE:
-            self.channelSetIdle()
-        TCLogger.debug("channel state change %s dst:%s", activity, self.address)
-
-    def channelSetReady(self):
-        raise NotImplemented()
-
-    def channelSetIdle(self):
-        raise NotImplemented()
-
-    def channelSetError(self):
-        raise NotImplemented()
-
-    def stop(self):
-        self.channel.close()
-
-    def start(self):
-        raise NotImplemented()
diff --git a/collector-agent/CollectorAgent/GrpcMeta.py b/collector-agent/CollectorAgent/GrpcMeta.py
deleted file mode 100644
index b233741be..000000000
--- a/collector-agent/CollectorAgent/GrpcMeta.py
+++ /dev/null
@@ -1,158 +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 threading import Thread, Condition
-
-# Created by eeliu at 11/5/19
-from CollectorAgent.GrpcClient import GrpcClient
-from Common.Logger import TCLogger
-from Proto.grpc import Service_pb2_grpc
-from Proto.grpc.Span_pb2 import PSqlMetaData, PApiMetaData, PStringMetaData
-
-
-class GrpcMeta(GrpcClient):
-    def __init__(self, address, meta=None):
-        super().__init__(address, meta, -1)
-        self.meta_stub = Service_pb2_grpc.MetadataStub(self.channel)
-        self.must_snd_meta_now = False
-        self.snd_task_is_running = False
-        self.exit_cv = Condition()
-        self.thread = None
-        self.id = 1
-        self.sql_table = {}
-        self.api_table = {}
-        self.string_table = {}
-
-    # changes remove async to sync
-    def _sendSqlMeta(self, meta):
-        assert isinstance(meta, PSqlMetaData)
-        future = self.meta_stub.RequestSqlMetaData.future(meta)
-        future.add_done_callback(self._response)
-
-    def _sendApiMeta(self, meta):
-        assert isinstance(meta, PApiMetaData)
-        future = self.meta_stub.RequestApiMetaData.future(meta)
-        future.add_done_callback(self._response)
-
-    def _sendStringMeta(self, meta):
-        assert isinstance(meta, PStringMetaData)
-        future = self.meta_stub.RequestStringMetaData.future(meta)
-        future.add_done_callback(self._response)
-
-    def _channelCheck(fun):
-        def update(self, *args):
-            if self.must_snd_meta_now and not self.snd_task_is_running:
-                TCLogger.info("try to register all meta")
-                self.snd_task_is_running = True
-                self.thread = Thread(target=self._registerAllMeta, args=(10,))
-                self.thread.start()
-                self.must_snd_meta_now = False
-            result = fun(self, *args)
-            return result
-        return update
-
-    @_channelCheck
-    def updateApiMeta(self, apiInfo, line, type):
-        row_str = ("%s-%d-%d" % (apiInfo, line, type))
-        if row_str in self.api_table:
-            return self.api_table[row_str][0]
-        else:
-            id = self.id
-            meta = PApiMetaData(apiId=id, apiInfo=apiInfo, line=line, type=type)
-            self.api_table[row_str] = [id, meta]
-            self._sendApiMeta(meta)
-            self.id += 1
-            TCLogger.debug("register api meta id:%d -> api:[%s] meta:%s", id, row_str, meta)
-            return id
-            
-    @_channelCheck
-    def updateStringMeta(self, value):
-        if value in self.string_table:
-            return self.string_table[value][0]
-        else:
-            id = self.id
-            meta = PStringMetaData(stringId=id, stringValue=value)
-            self.string_table[value] = [id, meta]
-            self._sendStringMeta(meta)
-            self.id += 1
-            TCLogger.debug("register string meta id:%d -> value:[%s]", id, value)
-            return id
-
-    @_channelCheck
-    def updateSqlMeta(self, sql):
-        if sql in self.sql_table:
-            return self.sql_table[sql][0]
-        else:
-            id = self.id
-            meta = PSqlMetaData(sqlId=id, sql=sql)
-            self.sql_table[sql] = [id, meta]
-            self._sendSqlMeta(meta)
-            self.id += 1
-            TCLogger.debug("register sql meta id:%d -> sql:[%s]", id, sql)
-            return id
-
-
-    def _response(self, future):
-        if future.exception():
-            TCLogger.warning("register meta failed %s", future.exception)
-            return
-        self.must_snd_meta_now = False
-
-
-    def channelSetReady(self):
-        pass
-
-    def channelSetIdle(self):
-        self.must_snd_meta_now =True
-
-    def channelSetError(self):
-        self.must_snd_meta_now =True
-
-    def _registerAllMeta(self, sec):
-        TCLogger.info("register all meta data")
-
-        while self.snd_task_is_running:
-            try:
-                for key, value in self.sql_table.items():
-                    self.meta_stub.RequestSqlMetaData(value[1])
-                # api
-                for key, value in self.api_table.items():
-                    self.meta_stub.RequestApiMetaData(value[1])
-
-                # string
-                for key, value in self.string_table.items():
-                    self.meta_stub.RequestStringMetaData(value[1])
-                self.snd_task_is_running = False
-                TCLogger.info("send all meta data is done")
-                break
-            except Exception as e:
-                TCLogger.warning("re-send all meta data, met exception:%s", e)
-                with self.exit_cv:
-                    if not self.snd_task_is_running or self.exit_cv.wait(sec):
-                        break
-
-    def start(self):
-        pass
-
-    def stop(self):
-        self.snd_task_is_running = False
-        with self.exit_cv:
-            self.exit_cv.notify()
-        if self.thread:
-            self.thread.join()
diff --git a/collector-agent/CollectorAgent/GrpcSpan.py b/collector-agent/CollectorAgent/GrpcSpan.py
deleted file mode 100644
index eacbb91ba..000000000
--- a/collector-agent/CollectorAgent/GrpcSpan.py
+++ /dev/null
@@ -1,105 +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 10/31/19
-from queue import Empty
-from threading import Condition, Thread
-
-import grpc
-
-import Service_pb2_grpc
-from CollectorAgent.GrpcClient import GrpcClient
-from Common.Logger import TCLogger
-
-
-class GrpcSpan:
-    class SpanClient:
-        def __init__(self, address, meta):
-            self.address = address
-            self.meta = meta
-            self._connect()
-
-        def _connect(self):
-            TCLogger.info("span channel connect %s with meta:%s", self.address, self.meta)
-            self.channel = grpc.intercept_channel(grpc.insecure_channel(self.address),
-                                                  GrpcClient.InterceptorAddHeader(self.meta))
-            self.span_stub = Service_pb2_grpc.SpanStub(self.channel)
-
-        def sendSpans(self, iter):
-            self.span_stub.SendSpan(iter)
-
-        def reconnect(self):
-            self.channel.close()
-            self._connect()
-
-
-    def __init__(self, address, meta, queue):
-        self.address = address
-        self.meta = meta
-        self.exit_cv = Condition()
-        self.send_span_count = 0
-
-        self.task_thead = Thread(target=self.getAndSendSpan)
-        self.task_running = False
-        self.queue = queue
-
-
-
-    def stop(self):
-        self.task_running = False
-        with self.exit_cv:
-            self.exit_cv.notify_all()
-        self.task_thead.join()
-        TCLogger.info("send %d to pinpoint collector",self.send_span_count)
-
-    def start(self):
-        self.task_thead.start()
-
-    def getAndSendSpan(self):
-        self.task_running = True
-        spans = []
-
-        def get_n_span(queue, N):
-            i = 0
-            try:
-                while N > i:
-                    spans.append(queue.get(timeout=0.005))
-                    i += 1
-            except Empty as e:
-                pass
-            return True if i > 0 else False
-
-        client = GrpcSpan.SpanClient(self.address, self.meta)
-        while self.task_running:
-
-            try:
-                if not get_n_span(self.queue, 10240):
-                    with self.exit_cv:
-                        if not self.task_running or self.exit_cv.wait(5):
-                            TCLogger.info("span send thread is done")
-                            break
-                    continue
-                self.send_span_count+=len(spans)
-                client.sendSpans(iter(spans))
-                TCLogger.debug("send %d", self.send_span_count)
-            except Exception as e:
-                TCLogger.error("span channel catches an exception:%s", e)
-                client.reconnect()
-            finally:
-                spans.clear()
diff --git a/collector-agent/CollectorAgent/GrpcSpanFactory.py b/collector-agent/CollectorAgent/GrpcSpanFactory.py
deleted file mode 100644
index 5ed1da1a3..000000000
--- a/collector-agent/CollectorAgent/GrpcSpanFactory.py
+++ /dev/null
@@ -1,191 +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/7/19
-
-
-from Annotation_pb2 import PAnnotation, PAnnotationValue, PLongIntIntByteByteStringValue
-from Span_pb2 import PSpan, PSpanEvent
-from google.protobuf.wrappers_pb2 import StringValue
-
-from CollectorAgent.TCGenerator import ThriftProtocolUtil
-from Common.Logger import TCLogger
-from PHPAgent.SpanFactory import SpanFactory
-from PinpointAgent.Type import *
-from Proto.grpc.Annotation_pb2 import PIntStringStringValue
-
-
-class GrpcSpanFactory(SpanFactory):
-    def createSpan(self, stackMap):
-        tSpan = PSpan()
-        tSpan.apiId = self.agent.updateApiMeta(stackMap['name'], API_WEB_REQUEST)
-        tSpan.version = 1
-        if 'stp' in stackMap:
-            tSpan.serviceType = int(stackMap['stp'])
-            tSpan.applicationServiceType = int(stackMap['stp'])
-        else:
-            tSpan.serviceType = PHP
-            tSpan.applicationServiceType = PHP
-
-        if 'psid' in stackMap:
-            tSpan.parentSpanId = int(stackMap['psid'])
-        else:
-            tSpan.parentSpanId = -1
-
-        if 'tid' in stackMap:
-            agentId, startTime, id = stackMap['tid'].split('^')
-            tSpan.transactionId.agentId = agentId
-            tSpan.transactionId.agentStartTime = int(startTime)
-            tSpan.transactionId.sequence = int(id)
-
-        if 'sid' in stackMap:
-            tSpan.spanId = int(stackMap['sid'])
-
-        if 'S' in stackMap:
-            tSpan.startTime = stackMap['S']
-
-        if 'E' in stackMap:
-            tSpan.elapsed = stackMap['E']
-
-        accept = tSpan.acceptEvent
-
-        if 'uri' in stackMap:
-            accept.rpc = stackMap['uri']
-        if 'server' in stackMap:
-            accept.endPoint = stackMap['server']
-        if 'client' in stackMap:
-            accept.remoteAddr = stackMap['client']
-
-        parent_info = accept.parentInfo
-
-        if 'pname' in stackMap:
-            parent_info.parentApplicationName = stackMap['pname']
-
-        if 'ptype' in stackMap:
-            parent_info.parentApplicationType = int(stackMap['ptype'])
-
-        if 'Ah' in stackMap:
-            parent_info.acceptorHost = stackMap['Ah']
-
-        if 'ERR' in stackMap:
-            tSpan.err = 1
-            id = self.agent.updateStringMeta('ERR')
-            value = StringValue(value=stackMap['ERR']['msg'])
-            tSpan.exceptionInfo.intValue = id
-            tSpan.exceptionInfo.stringValue.CopyFrom(value)
-
-        if 'EXP' in stackMap:
-            id = self.agent.updateStringMeta('EXP')
-            value = StringValue(value=stackMap['EXP'])
-            tSpan.exceptionInfo.intValue = id
-            tSpan.exceptionInfo.stringValue.CopyFrom(value)
-
-
-        if 'clues' in stackMap:
-            for annotation in stackMap['clues']:  # list
-                id, value = annotation.split(':', 1)
-                ann = PAnnotation(key=int(id), value=PAnnotationValue(stringValue=value))
-                tSpan.annotation.append(ann)
-
-        try:
-            value = None
-            if 'NP' in stackMap:  ## nginx
-                value = PLongIntIntByteByteStringValue()
-                arr = ThriftProtocolUtil._parseStrField(stackMap['NP'])
-                value.intValue1 = 2
-                if 'D' in arr:
-                    value.intValue2 = ThriftProtocolUtil._parseDotFormat(arr['D'])
-                if 't' in arr:
-                    value.longValue = ThriftProtocolUtil._parseDotFormat(arr['t'])
-            elif 'AP' in stackMap:  ## apache
-                value = PLongIntIntByteByteStringValue()
-                arr = ThriftProtocolUtil._parseStrField(stackMap['AP'])
-                value.intValue1 = 3
-                if 'i' in arr:
-                    value.byteValue1 = int(arr['i'])
-                if 'b' in arr:
-                    value.byteValue2 = int(arr['b'])
-                if 'D' in arr:
-                    value.intValue2 = int(arr['D'])
-                if 't' in arr:
-                    value.longValue = int(int(arr['t']) / 1000)
-            if value is not None:
-                ann = PAnnotation(key=PROXY_HTTP_HEADER, value=PAnnotationValue(longIntIntByteByteStringValue=value))
-                tSpan.annotation.append(ann)
-        except Exception as e:
-            TCLogger.error("input is illegal,Exception %s", e)
-
-        return tSpan
-
-    def createSpanEvent(self, stackMap):
-        assert 'name' in stackMap, " spanEvent should contain a name field"
-        spanEv = PSpanEvent()
-        spanEv.apiId = self.agent.updateApiMeta(stackMap['name'])
-
-        if 'EXP' in stackMap:
-            id = self.agent.updateStringMeta('EXP')
-            value = StringValue(value=stackMap['EXP'])
-            spanEv.exceptionInfo.intValue = id
-            spanEv.exceptionInfo.stringValue.CopyFrom(value)
-
-        nextEv = spanEv.nextEvent
-        msgEv = nextEv.messageEvent
-
-        if 'dst' in stackMap:
-            msgEv.destinationId = stackMap['dst']
-
-        if 'nsid' in stackMap:
-            msgEv.nextSpanId = int(stackMap['nsid'])
-
-        if 'server' in stackMap:
-            msgEv.endPoint = stackMap['server']
-
-        if 'S' in stackMap:
-            spanEv.startElapsed = int(stackMap['S'])
-
-        if 'E' in stackMap:
-            spanEv.endElapsed = int(stackMap['E'])
-
-        if 'stp' in stackMap:
-            spanEv.serviceType = int(stackMap['stp'])
-        else:
-            spanEv.serviceType = PHP_METHOD_CALL
-
-        if 'clues' in stackMap:
-            for annotation in stackMap['clues']:  # list
-                id, value = annotation.split(':', 1)
-                ann = PAnnotation(key=int(id), value=PAnnotationValue(stringValue=value))
-                spanEv.annotation.append(ann)
-        # todo SQL not support cache bindValue
-        if 'SQL' in stackMap:
-            id = self.agent.updateSqlMeta(stackMap['SQL'])
-            sqlValue = PIntStringStringValue(intValue=id)
-            ann = PAnnotation(key=SQL_ID, value=PAnnotationValue(intStringStringValue=sqlValue))
-            spanEv.annotation.append(ann)
-
-        return spanEv
-
-    def attachSpanEvent(self, tSpan, span_event):
-        tSpan.spanEvent.append(span_event)
-
-    def setSequenceid(self, span_ev, id):
-        span_ev.sequence = id
-
-    def setDepth(self, span_ev, depth):
-        span_ev.depth = depth
diff --git a/collector-agent/CollectorAgent/GrpcStat.py b/collector-agent/CollectorAgent/GrpcStat.py
deleted file mode 100644
index 6afea0dc1..000000000
--- a/collector-agent/CollectorAgent/GrpcStat.py
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-# Created by eeliu at 6/1/20
-import threading
-import time
-
-import psutil
-
-from CollectorAgent.GrpcClient import GrpcClient
-from Common import Stat
-from Common.Logger import TCLogger
-from PinpointAgent.Type import STAT_INTERVAL
-from Proto.grpc.Service_pb2_grpc import StatStub
-from Proto.grpc.Stat_pb2 import PStatMessage, PAgentStat, PResponseTime
-
-
-class GrpcStat(GrpcClient):
-    def __init__(self, address, meta, get_inter_stat_cb, timeout=5):
-        super().__init__(address, meta, -1)
-        self.meta_stub = StatStub(self.channel)
-        self.stat_thread = None
-        self.exit_cv = threading.Condition()
-        self.timeout = timeout
-        assert get_inter_stat_cb
-        self.get_inter_stat_cb = get_inter_stat_cb
-        self.task_running = False
-    def channelSetReady(self):
-        pass
-    def channelSetIdle(self):
-        pass
-    def channelSetError(self):
-        pass
-
-    def stop(self):
-        TCLogger.debug("try to stop stat thread")
-        self.task_running = False
-        with self.exit_cv:
-            self.exit_cv.notify_all()
-
-    def _generAgentStat(self):
-        max,avg = self.get_inter_stat_cb()
-        responseTime = PResponseTime(max=max,avg=avg)
-        stat = PAgentStat(responseTime=responseTime, gc=Stat.collectJvmInfo())
-        stat.timestamp = int(round(time.time()*1000))
-        stat.collectInterval = STAT_INTERVAL
-        stat.cpuLoad.systemCpuLoad =psutil.cpu_percent()*0.01
-        return stat
-
-    def _generator_PstatMessage(self):
-        ps = PStatMessage(agentStat=self._generAgentStat())
-        TCLogger.debug(ps)
-        yield ps
-
-
-
-    def _stat_thread_main(self):
-        self.task_running = True
-        while self.task_running:
-            try:
-                self.meta_stub.SendAgentStat(self._generator_PstatMessage())
-            except Exception as e:
-                TCLogger.warning("SendAgentStat met:%s",e)
-            with self.exit_cv:
-                if not self.task_running or self.exit_cv.wait(self.timeout):
-                    break
-        TCLogger.debug("stat thread is done")
-
-    def start(self):
-        self.stat_thread = threading.Thread(target=self._stat_thread_main, args=())
-        self.stat_thread.start()
-
diff --git a/collector-agent/CollectorAgent/Protocol.py b/collector-agent/CollectorAgent/Protocol.py
deleted file mode 100644
index b5d4dea28..000000000
--- a/collector-agent/CollectorAgent/Protocol.py
+++ /dev/null
@@ -1,251 +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.
-# ------------------------------------------------------------------------------
-import struct
-
-from thrift.protocol import TCompactProtocol
-from thrift.transport import TTransport
-
-from PinpointAgent.Type import SIGNATURE, HEADER_VERSION, SPAN, AGENT_INFO, AGENT_STAT, AGENT_STAT_BATCH, API_META_DATA, \
-    STRING_META_DATA, RESULT, TVERSION
-from Proto.Trift.Pinpoint.ttypes import TAgentInfo, TAgentStat, TAgentStatBatch
-from Proto.Trift.Trace.ttypes import TSpan, TApiMetaData, TResult, TStringMetaData
-
-
-class CollectorPro(object):
-    # transactionId = 0
-    # sequenceId = 0
-    # spanid = 0
-    # @staticmethod
-    # def createSpanid():
-    #     # return random.getrandbits(63)
-    #     CollectorPro.spanid +=1
-    #     return CollectorPro.spanid
-
-    # @staticmethod
-    # def createSequenceId():
-    #     CollectorPro.sequenceId += 1
-    #     return CollectorPro.sequenceId
-
-    @staticmethod
-    def typeHelper(type):
-        '''
-
-        :param int type:
-        :return: type=> obj
-        '''
-
-        if type == SPAN:
-            return TSpan()
-        elif type == AGENT_INFO:
-            return TAgentInfo()
-        elif type == AGENT_STAT:
-            return TAgentStat()
-        elif type == AGENT_STAT_BATCH:
-            return TAgentStatBatch()
-        elif type == API_META_DATA:
-            return TApiMetaData()
-        elif type == STRING_META_DATA:
-            return TStringMetaData()
-        elif type == RESULT:
-            return TResult()
-        else:
-            raise Exception("type:%d not found", type)
-
-    __ReqCount = 0
-
-    @staticmethod
-    def getCurReqCount():
-        CollectorPro.__ReqCount += 1
-        return CollectorPro.__ReqCount
-
-    @staticmethod
-    def obj2bin(obj, type):
-        """ Serialize.
-        """
-        membuf = TTransport.TMemoryBuffer()
-        binprot = TCompactProtocol.TCompactProtocol(membuf)
-
-        buf = struct.pack('!BBh', SIGNATURE, HEADER_VERSION, type)
-        obj.write(binprot)
-        buf += membuf.getvalue()
-        return buf
-
-    # @staticmethod
-    # def tspan2Bin(obj,type):
-
-    @staticmethod
-    def bin2obj(val):
-        '''
-
-        :param memoryview val:
-        :return:
-        '''
-
-        (signature, version, type) = struct.unpack('!BBh', val[0:4].tobytes())
-        obj = CollectorPro.typeHelper(type)
-        tmembuf = TTransport.TMemoryBuffer(val[4:].tobytes())
-        tbinprot = TCompactProtocol.TCompactProtocol(tmembuf)
-        obj.read(tbinprot)
-        return (type, obj)
-
-
-class ChannelBufferV2(object):
-    def __init__(self, buf=b''):
-        self.buf = buf
-        self.p = 0
-        self.len = len(buf)
-
-    def putByte(self, b):
-        self.buf += struct.pack('B', b)
-
-    # def putStr(self,str):
-    #     self.buf+=struct.pack('!i',len(str))
-    #     self.buf+=str
-
-    def putI64(self, i64):
-        self.buf += struct.pack('!q', i64)
-
-    def getBuf(self):
-        return self.buf
-
-    def readInt(self):
-        assert self.len >= 4
-        b, = struct.unpack('!i', self.buf[self.p:self.p + 4])
-        self.p += 4
-        self.len -= 4
-        return b
-
-    def readStr(self, len):
-        assert self.len >= len
-        str = self.buf[self.p:self.p + len]
-        self.p += len
-        self.len -= len
-        return str
-
-    def readI64(self):
-        assert self.len >= 8
-        b, = struct.unpack('!q', self.buf[self.p:self.p + 8])
-        self.p += 8
-        self.len -= 8
-        return b
-
-    def readDouble(self):
-        assert self.len >= 8
-        b, = struct.unpack('!d', self.buf[self.p:self.p + 8])
-        self.p += 8
-        self.len -= 8
-        return b
-
-    def readChar(self):
-        assert self.len >= 1
-        b, = struct.unpack('c', self.buf[self.p:self.p + 1])
-        self.p += 1
-        self.len -= 1
-        return b
-
-    def peekChar(self):
-        assert self.len >= 1
-        b, = struct.unpack('c', self.buf[self.p:self.p + 1])
-        return b
-
-    def readByte(self):
-        assert self.len >= 1
-        b, = struct.unpack('B', self.buf[self.p:self.p + 1])
-        self.p += 1
-        self.len -= 1
-        return b
-
-
-class AutoBuffer(object):
-    def __init__(self):
-        self.buf = b''
-
-    def putByte(self, b):
-        self.buf += struct.pack('B', b)
-
-    def putSVar(self, sLen):
-        value = (sLen << 1) ^ (sLen >> 31)
-        self.putVar32(value)
-
-    def putVar32(self, v):
-        while True:
-            if v & ~0x7F == 0:
-                self.putByte(v)
-                break
-            else:
-                self.putByte((v & 0x7F) | 0x80)
-                v = (v >> 7)
-
-    def putPrefixedString(self, str):
-        if str is None:
-            self.putSVar(-1)
-        else:
-            self.putSVar(len(str))
-            self.buf += str.encode()
-
-    def putVar64(self, v):
-        while True:
-            if v & ~0x7f == 0:
-                self.buf += struct.pack('B', v)
-                break
-            else:
-                self.buf += struct.pack('B', (v & 0x7f) | 0x80)
-                v = v >> 7
-
-
-class TransactionId(object):
-    def __init__(self, encoded_str=None, agent_id=None, start_time=None, id=None):
-        if encoded_str is not None:
-            agentId, startTime, id = encoded_str.split('^')
-            self.startTime = int(startTime)
-            self.id = int(id)
-            self.agentId = agentId
-            return
-
-        self.agentId = agent_id
-        self.startTime = start_time
-        self.id = id
-
-    def getBytes(self):
-        bBuf = AutoBuffer()
-        bBuf.putByte(TVERSION)
-        bBuf.putPrefixedString(str(self.agentId))
-        bBuf.putVar64(self.startTime)
-        bBuf.putVar64(self.id)
-        return bBuf.buf
-
-
-if __name__ == '__main__':
-    # span = TSpan()
-    # test ={
-    #     1:'agentId'
-    # }
-    # test[1]='1234'
-    # print(span)
-    # setattr(span,test[1],'1234')
-    # print(span)
-
-    tid = TransactionId(agent_id='test-agent', start_time=1560951035971, id=1)
-    buf1 = tid.getBytes()
-
-    tid = TransactionId(encoded_str='test-agent^1560951035971^1')
-    buf2 = tid.getBytes()
-    assert buf1 == buf2
-    print("pass")
diff --git a/collector-agent/CollectorAgent/Readme.md b/collector-agent/CollectorAgent/Readme.md
deleted file mode 100644
index 5e8c8ddc7..000000000
--- a/collector-agent/CollectorAgent/Readme.md
+++ /dev/null
@@ -1,27 +0,0 @@
-## Json string map to Pinpoint item
-
-Json String | Pinpoint Name | Details 
-:---|:---|:---
-tid|transactionId|Transaction ID
-sid|SpanId|Span ID
-S|startTime|Start time of request
-E|elapsed|Elapse time
-FT|front type|Language type(PHP:1500, Python:1700)
-appname|applicationName|Application name
-appid|agentId|Agent ID
-stp|serviceType|Service type([See details](https://github.com/naver/pinpoint/blob/master/commons/src/main/java/com/navercorp/pinpoint/common/trace/ServiceType.java))
-name| apids|Function name
-uri|rpc|URI
-clues|TAnnotation|-1:arguments<br>14:return<br>40:http url<br>41:http param<br>42:http param entity<br>45:cookies<br>46:http status code
-psid|parentSpanId|Parent span ID
-nsid|nextSpanId|Next span ID
-dst|destinationId|Destination ID
-client|remoteAddr|Client address
-server|endPoint|Server address
-ERR|err|Error
-EXP|exp|Exception
-pname|parentApplicationName|Parent application name
-ptype|parentApplicationType|Parent application type
-Ah|acceptorHost|Acceptor host
-NP|NginxProxy header|Nginx proxy header
-AP|ApacheProxy header|Apache proxy header
diff --git a/collector-agent/CollectorAgent/ReqStat.py b/collector-agent/CollectorAgent/ReqStat.py
deleted file mode 100644
index 31d7e2dd8..000000000
--- a/collector-agent/CollectorAgent/ReqStat.py
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-# Created by eeliu at 6/2/20
-
-import math
-import time
-
-from PinpointAgent.Type import STAT_INTERVAL
-
-
-class ReqStat(object):
-
-    class IntervalStat(object):
-        def __init__(self):
-            self.max = 0
-            self.total = 0
-            self.times = 0
-            self.last_time = 0
-        def reset(self):
-            self.last_time = self.max = self.total = self.times = 0
-
-        def update(self,req_time):
-            last_time = int(time.time())
-            if last_time >= self.last_time + STAT_INTERVAL+1:
-                self.reset()
-            if req_time > 0:
-                self.times += 1
-                self.total += req_time
-                self.max = req_time if req_time > self.max else self.max
-
-            self.last_time = last_time
-
-        def getInterStat(self):
-            last_time = int(time.time())
-            if last_time >= self.last_time + STAT_INTERVAL + 1 or self.times == 0:
-                return (0,0)
-            else:
-                return (self.max,int(self.total/self.times))
-
-    def __init__(self):
-        self.req_stat_count = [0, 0, 0, 0]
-        self.last_time = int(time.time())
-        self.inter_stat = ReqStat.IntervalStat()
-
-    def updateStat(self, req_time):
-        # update interval stat
-        self.inter_stat.update(req_time)
-
-        # update request stat
-        req_time = math.ceil(req_time / 1000)
-        last_time = int(time.time())
-        if last_time != self.last_time:
-            self.req_stat_count = [0, 0, 0, 0]
-        self.req_stat_count[self._reqLevel(req_time)] += 1
-        self.last_time = last_time
-
-
-
-
-    def _reqLevel(self, exp):
-        #
-        #      1s: faster
-        #      3s: normal
-        #      5s: Slow
-        #      >5s: very slow
-        #
-        if exp <= 1:
-            return 0
-        elif exp <= 3:
-            return 1
-        elif exp <= 5:
-            return 2
-        else:
-            return 3
-
-
-    def getReqStat(self):
-        last_time = int(time.time())
-        if last_time < self.last_time + 2:
-            return self.req_stat_count
-        else:
-            return (0, 0, 0, 0)
-
-
-    def getInervalStat(self):
-        return self.inter_stat.getInterStat()
\ No newline at end of file
diff --git a/collector-agent/CollectorAgent/TCGenerator.py b/collector-agent/CollectorAgent/TCGenerator.py
deleted file mode 100644
index e5fd5a197..000000000
--- a/collector-agent/CollectorAgent/TCGenerator.py
+++ /dev/null
@@ -1,104 +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.
-# ------------------------------------------------------------------------------
-
-
-# keyWord ={
-#     1:'agentId',
-#     2:'applicationName',
-#     3:'agentStartTime',
-#     4:'transactionId',
-#     5:'spanId',
-#     6:'parentSpanId',
-#     7:'spanId',
-#     8:'parentSpanId ',
-#     9:'startTime',
-#     10:'elapsed ',
-#     11:'rpc',
-#     12:'serviceType',
-#     13:'endPoint',
-#     14:'remoteAddr',
-#     15:'annotations',
-#     16:'flag',
-#     17:'err',
-#     18:'spanEventList',
-#     19:'parentApplicationName',
-#     20:'parentApplicationType',
-#     21:'acceptorHost',
-#     25:'apiId',
-#     26:'exceptionInfo',
-#     30:'pplicationServiceType',
-#     31:'loggingTransactionInfo',
-#     32:'key',
-#     33:'value'
-# }
-
-# from Intercept import interceptManger
-
-
-class TCGenerator(object):
-
-    @staticmethod
-    def fetchIfExist(jMap, name):
-        '''
-
-        :param dict jMap:
-        :param name:
-        :return:
-        '''
-        if jMap.has_key(name):
-            return jMap[name]
-        return None
-
-    @staticmethod
-    def __transactionIDHelper(interManger, id):
-        '''
-
-        :param InterceptManager interManger:
-        :param int id:
-        :return:
-        '''
-
-        # return str(interManger.ac.AgentID)+'^'+str(interManger.startTimeStamp)+'^'+str(id)
-
-
-class ThriftProtocolUtil(object):
-
-    @staticmethod
-    def _parseStrField(str):
-        '''
-
-        :param string str:
-        :return dict:
-        '''
-        ret = {}
-        for item in str.split():
-            key, value = item.split(sep='=')
-            ret[key] = value
-        return ret
-
-    @staticmethod
-    def _parseDotFormat(time):
-        '''
-
-        :param string time:
-        :return:
-        '''
-        sec, ms = time.split(sep='.')
-        return int(sec) * 1000 + int(ms)
diff --git a/collector-agent/CollectorAgent/TPackets.py b/collector-agent/CollectorAgent/TPackets.py
deleted file mode 100644
index 121a05096..000000000
--- a/collector-agent/CollectorAgent/TPackets.py
+++ /dev/null
@@ -1,289 +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 CollectorAgent.Protocol import *
-from PinpointAgent.Type import ControlMessageProtocolConstant, PacketType, AgentSocketCode
-
-
-class Packet(object):
-    TYPE_LENGTH = 2
-
-    def __init__(self, hType, hTypeEx1=None, hTypeEx2=None, body=None):
-        self.buf = struct.pack("!h", hType)
-
-        if hTypeEx1 is not None:
-            self.buf += struct.pack('!i', hTypeEx1)
-
-        if hTypeEx2 is not None:
-            self.buf += struct.pack('!i', hTypeEx2)
-
-        if body is not None:
-            self.buf += body
-
-    def getSerializedData(self):
-        return self.buf
-
-    @staticmethod
-    def parseNetByteStream(view, size):
-        '''
-        size must > 2
-        return type and packet
-        :param  memoryview view:
-        :param int size:
-        :return:
-        '''
-
-        if size < 2:
-            return
-
-        offset = 0
-        while offset < size:
-            ### parse type
-            type, = struct.unpack("!h", view[offset:offset + Packet.TYPE_LENGTH])
-            if type not in PacketType.PTypeBytesLayOut:
-                raise Exception("type:%d not found", type)
-
-            ### parse type ->sub header
-            body_header_len, sub_header_len, sub_body_len_offset = PacketType.PTypeBytesLayOut[type]
-            if size - Packet.TYPE_LENGTH < body_header_len:  ## not enough
-                # yield (Packet.READ_AGAIN,size - offset)
-                return  ## stop iteration
-            offset += 2
-            header = 0
-            ### get sub header
-            if sub_header_len == 4:
-                header, = struct.unpack("!i", view[offset:offset + sub_header_len])
-                offset += sub_header_len
-
-            ### parse body_length
-            body_len = 0
-            if sub_body_len_offset == 2:
-                body_len, = struct.unpack("!h", view[offset:offset + sub_body_len_offset])
-            elif sub_body_len_offset == 4:
-                body_len, = struct.unpack("!i", view[offset:offset + sub_body_len_offset])
-            elif sub_body_len_offset == 0:
-                yield (offset + sub_body_len_offset, type, header, None)
-                continue  ## goto parse type
-
-            offset += sub_body_len_offset
-            if size - offset < body_len:  ## not enough
-                # yield (Packet.READ_AGAIN, size - body_header_len - Packet.TYPE_LENGTH)
-                return  ## stop iteration
-            else:
-                if body_len > 0:
-                    yield (offset + body_len, type, header, view[offset:offset + body_len])
-                else:
-                    yield (offset, type, header, None)
-                offset += body_len
-
-
-class HandShakeMessage:
-    handShakeCount = 0
-
-    def __init__(self, socketId_i, hostName_s, supportServer_b, ip_s, agentId_s,
-                 applicationName_s, serviceType_i, pid_i, version_s, startTimestamp_i64):
-        cMbuf = ControlMessageEncoder()
-
-        cMbuf.writeString('socketId')
-        cMbuf.writeInt(socketId_i)
-
-        cMbuf.writeString('hostName')
-        cMbuf.writeString(hostName_s)
-
-        cMbuf.writeString('supportServer')
-        cMbuf.writeBool(supportServer_b)
-
-        cMbuf.writeString('ip')
-        cMbuf.writeString(ip_s)
-
-        cMbuf.writeString('agentId')
-        cMbuf.writeString(agentId_s)
-
-        cMbuf.writeString('applicationName')
-        cMbuf.writeString(applicationName_s)
-
-        cMbuf.writeString('serviceType')
-        cMbuf.writeInt(serviceType_i)
-
-        cMbuf.writeString('pid')
-        cMbuf.writeInt(pid_i)
-
-        cMbuf.writeString('version')
-        cMbuf.writeString(version_s)
-
-        cMbuf.writeString('startTimestamp')
-        cMbuf.writeInt64(startTimestamp_i64)
-        cMbuf.endEncoder()
-
-        HandShakeMessage.handShakeCount += 1
-
-        self.chBuf = cMbuf
-
-    @staticmethod
-    def getCount():
-        return HandShakeMessage.handShakeCount
-
-    @staticmethod
-    def getNextStateCode(code, subCode):
-        SUCCESS = (0, 0, "Success.")
-        SIMPLEX_COMMUNICATION = (0, 1, "Simplex Connection successfully established.")
-        DUPLEX_COMMUNICATION = (0, 2, "Duplex Connection successfully established.")
-        ALREADY_SIMPLEX_COMMUNICATION = (1, 1, "Already Simplex Connection established.")
-        ALREADY_DUPLEX_COMMUNICATION = (1, 2, "Already Duplex Connection established.")
-        # ALREADY_KNOWN = (1, 0, "Already Known.")
-        # PROPERTY_ERROR = (2, 0, "Property error.")
-        # PROTOCOL_ERROR = (3, 0, "Illegal protocol error.")
-        # UNKNOWN_ERROR = (4, 0, "Unknown Error.")
-        # UNKNOWN_CODE = (-1, -1, "Unknown Code.")
-        states = (
-            (0, 0, "Success.", AgentSocketCode.RUN_SIMPLEX),
-            (0, 1, "Simplex Connection successfully established.", AgentSocketCode.RUN_SIMPLEX),
-            (0, 2, "Duplex Connection successfully established.", AgentSocketCode.RUN_DUPLEX),
-            (1, 1, "Already Simplex Connection established.", AgentSocketCode.RUN_SIMPLEX),
-            (1, 2, "Already Duplex Connection established.", AgentSocketCode.RUN_DUPLEX)
-        )
-
-        for s in states:
-            if s[0] == code and s[1] == subCode:
-                return s[3]
-        raise Exception("state not register")
-
-    def getDataLen(self):
-        return len(self.chBuf.getRawData())
-
-    def getBinData(self):
-        return self.chBuf.getRawData()
-
-
-class ControlMessage(object):
-    CONTROL_MESSAGE_UNKNOWN = -1
-    CONTROL_MESSAGE_NULL = 0
-    CONTROL_MESSAGE_BOOL = 1
-    CONTROL_MESSAGE_LONG = 2
-    CONTROL_MESSAGE_DOUBLE = 3
-    CONTROL_MESSAGE_STRING = 4
-    CONTROL_MESSAGE_LIST = 5
-    CONTROL_MESSAGE_MAP = 6
-
-    def __init__(self):
-        self.type = ControlMessage.CONTROL_MESSAGE_UNKNOWN
-        self.data = None
-
-
-class ControlMessageDecoder(object):
-    @staticmethod
-    def __readStringLength(cbv):
-        result = 0
-        shift = 0
-        while True:
-            b = cbv.readByte()
-            result |= (b & 0x7F) << shift
-            if b & 0x80 != 128:
-                break
-            shift += 7
-        return result
-
-    @staticmethod
-    def __decodeString(cbv):
-        length = ControlMessageDecoder.__readStringLength(cbv)
-
-        return cbv.readStr(length)
-
-    @staticmethod
-    def decodingControlMessage(cbv):
-        '''
-
-        :param ChannelBufferV2 cbv:
-        :return:
-        '''
-        cmg = ControlMessage()
-        type = cbv.readChar()
-        if type == ControlMessageProtocolConstant.TYPE_CHARACTER_BOOL_TRUE:
-            cmg.type = ControlMessage.CONTROL_MESSAGE_BOOL
-            cmg.data = True
-        elif type == ControlMessageProtocolConstant.TYPE_CHARACTER_NULL:
-            cmg.type = ControlMessage.CONTROL_MESSAGE_NULL
-        elif type == ControlMessageProtocolConstant.TYPE_CHARACTER_BOOL_FALSE:
-            cmg.type = ControlMessage.CONTROL_MESSAGE_BOOL
-            cmg.data = False
-        elif type == ControlMessageProtocolConstant.TYPE_CHARACTER_INT:
-            cmg.type = ControlMessage.CONTROL_MESSAGE_LONG
-            cmg.data = cbv.readInt()
-        elif type == ControlMessageProtocolConstant.TYPE_CHARACTER_LONG:
-            cmg.type = ControlMessage.CONTROL_MESSAGE_LONG
-            cmg.data = cbv.readI64()
-        elif type == ControlMessageProtocolConstant.TYPE_CHARACTER_DOUBLE:
-            cmg.type = ControlMessage.CONTROL_MESSAGE_DOUBLE
-            cmg.data = cbv.readDouble()
-        elif type == ControlMessageProtocolConstant.TYPE_CHARACTER_STRING:
-            cmg.type = ControlMessage.CONTROL_MESSAGE_STRING
-            cmg.data = ControlMessageDecoder.__decodeString(cbv)
-        elif type == ControlMessageProtocolConstant.CONTROL_CHARACTER_LIST_START:
-            cmg.type = ControlMessage.CONTROL_MESSAGE_LIST
-            cmg.data = []
-
-            while cbv.peekChar() != ControlMessageProtocolConstant.CONTROL_CHARACTER_LIST_END:
-                cmg.data.append(ControlMessageDecoder.decodingControlMessage(cbv))
-            cbv.readByte()  ## drop the EOF
-        elif type == ControlMessageProtocolConstant.CONTROL_CHARACTER_MAP_START:
-            cmg.type = ControlMessage.CONTROL_MESSAGE_MAP
-            cmg.data = {}
-            while cbv.peekChar() != ControlMessageProtocolConstant.CONTROL_CHARACTER_MAP_END:
-                key = ControlMessageDecoder.decodingControlMessage(cbv)
-                value = ControlMessageDecoder.decodingControlMessage(cbv)
-                cmg.data[key.data] = value
-            cbv.readByte()
-
-        return cmg
-
-
-class ControlMessageEncoder(object):
-    def __init__(self):
-        self.tmp_buf = struct.pack('c', ControlMessageProtocolConstant.CONTROL_CHARACTER_MAP_START)
-        self.__buf = ''
-
-    def writeChar(self, b):
-        self.tmp_buf += struct.pack("c", b)
-
-    def writeByte(self, i8):
-        self.tmp_buf += struct.pack("b", i8)
-
-    def writeInt(self, i):
-        self.tmp_buf += struct.pack("!ci", ControlMessageProtocolConstant.TYPE_CHARACTER_INT, i)
-
-    def writeInt64(self, l64):
-        self.tmp_buf += struct.pack("!cq", ControlMessageProtocolConstant.TYPE_CHARACTER_LONG, l64)
-
-    def writeString(self, string):
-        self.tmp_buf += struct.pack("!cb", ControlMessageProtocolConstant.TYPE_CHARACTER_STRING, len(string))
-        self.tmp_buf += string.encode()
-
-    def writeBool(self, flag):
-        if flag:
-            self.tmp_buf += struct.pack("c", ControlMessageProtocolConstant.TYPE_CHARACTER_BOOL_TRUE)
-        else:
-            self.tmp_buf += struct.pack("c", ControlMessageProtocolConstant.TYPE_CHARACTER_BOOL_FALSE)
-
-    def endEncoder(self):
-        self.tmp_buf += struct.pack('c', ControlMessageProtocolConstant.CONTROL_CHARACTER_MAP_END)
-        self.__buf = self.tmp_buf[:]
-
-    def getRawData(self):
-        return self.__buf
-
diff --git a/collector-agent/CollectorAgent/ThriftAPIMeta.py b/collector-agent/CollectorAgent/ThriftAPIMeta.py
deleted file mode 100644
index dee393c39..000000000
--- a/collector-agent/CollectorAgent/ThriftAPIMeta.py
+++ /dev/null
@@ -1,81 +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 CollectorAgent.Protocol import CollectorPro
-from CollectorAgent.TPackets import Packet
-from Common.Logger import TCLogger
-from PinpointAgent.Type import PacketType, STRING_META_DATA, API_META_DATA, API_UNDEFINED
-from Proto.Trift.Trace.ttypes import TApiMetaData, TStringMetaData
-
-
-class ThriftAPIMeta(object):
-    API_META_INDEX = 1
-
-    def __init__(self, name=None, line=-1, type=API_UNDEFINED, agentStartTime=-1, agentId=-1, agentName='Default name'):
-        assert name is not None
-        self.name = name
-        self.apiId = ThriftAPIMeta.API_META_INDEX
-        ThriftAPIMeta.API_META_INDEX += 1
-        self.type = type
-        self.agentStartTime = agentStartTime
-        self.agentId = agentId
-        self.agentName = agentName
-
-    def toPacket(self):
-        apiMeta = TApiMetaData(agentId=self.agentId,
-                               agentStartTime=self.agentStartTime,
-                               apiId=self.apiId,
-                               type=self.type,
-                               apiInfo=self.name)
-        TCLogger.debug("generator ThriftAPIMeta:%s", apiMeta)
-        body = CollectorPro.obj2bin(apiMeta, API_META_DATA)
-        packet = Packet(PacketType.APPLICATION_REQUEST, CollectorPro.getCurReqCount(), len(body), body)
-        return packet
-
-
-class StringMetaData(object):
-    API_META_INDEX = 1
-    PHP_STRING_MAP = {
-        "EXP": "Exception:",
-        "ERR": "Fatal error:"
-    }
-
-    def __init__(self, agentId, agentStartTime, name):
-        self.agentId = agentId
-        self.agentStartTime = agentStartTime
-
-        if name in StringMetaData.PHP_STRING_MAP:
-            meta_str = self.PHP_STRING_MAP[name]
-        else:
-            meta_str = "collector-agent needs upgrade"
-
-        self.value = meta_str
-        self.apiId = StringMetaData.API_META_INDEX
-        self.name = name
-        StringMetaData.API_META_INDEX += 1
-
-    def toPacket(self):
-        stringMeta = TStringMetaData(agentId=self.agentId,
-                                     agentStartTime=self.agentStartTime,
-                                     stringId=self.apiId,
-                                     stringValue=self.value)
-        TCLogger.debug("generator stringMate:%s", stringMeta)
-        body = CollectorPro.obj2bin(stringMeta, STRING_META_DATA)
-        packet = Packet(PacketType.APPLICATION_REQUEST, CollectorPro.getCurReqCount(), len(body), body)
-        return packet
diff --git a/collector-agent/CollectorAgent/ThriftAgentImplement.py b/collector-agent/CollectorAgent/ThriftAgentImplement.py
deleted file mode 100644
index c34c2e290..000000000
--- a/collector-agent/CollectorAgent/ThriftAgentImplement.py
+++ /dev/null
@@ -1,302 +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.
-# ------------------------------------------------------------------------------
-import os
-import struct
-
-from CollectorAgent.TPackets import ControlMessageDecoder, ControlMessage, HandShakeMessage, ChannelBufferV2, TAgentInfo
-from CollectorAgent.ThriftAPIMeta import *
-from CollectorAgent.ThriftAgentStateManager import ThriftAgentStateManager
-from CollectorAgent.ThriftSpanFactory import ThriftSpanFactory
-from Common import agentHost
-from Events import *
-from PinpointAgent.PinpointAgent import PinpointAgent
-from PinpointAgent.Type import PHP, API_DEFAULT, AgentSocketCode, AGENT_INFO, SPAN
-
-
-class ThriftAgentImplement(PinpointAgent):
-    PingCount = 0
-    ReqCount = 0
-
-    def __init__(self, ac, app_id, app_name, serviceType=PHP):
-
-        super().__init__(app_id, app_name)
-        self.ac = ac
-        self.tcpHost = (ac.CollectorAgentIp, ac.CollectorAgentPort)
-        self.statHost = (ac.CollectorStatIp, ac.CollectorStatPort)
-        self.spanHost = (ac.CollectorSpanIp, ac.CollectorSpanPort)
-        TCLogger.debug(
-            "CollectorTcp %s CollectorStat %s CollectorSpan %s" % (self.tcpHost, self.statHost, self.spanHost))
-        self.serviceType = serviceType
-        self.tcpLayer = StreamClientLayer(self.tcpHost, self.handlerResponse, self.collectorTcpHello)
-
-        self.spanLayer = DgramLayer(self.spanHost, None)
-        self.packetRoute = {
-            PacketType.APPLICATION_SEND: self.handle_default,
-            PacketType.APPLICATION_TRACE_SEND: self.handle_default,
-            PacketType.APPLICATION_TRACE_SEND_ACK: self.handle_default,
-            PacketType.APPLICATION_REQUEST: self.handle_appResponse,
-            PacketType.APPLICATION_RESPONSE: self.handle_appliaction_response,
-            PacketType.APPLICATION_STREAM_CREATE: self.handle_default,
-            PacketType.APPLICATION_STREAM_CREATE_SUCCESS: self.handle_default,
-            PacketType.APPLICATION_STREAM_CREATE_FAIL: self.handle_default,
-            PacketType.APPLICATION_STREAM_CLOSE: self.handle_default,
-            PacketType.APPLICATION_STREAM_PING: self.handle_default,
-            PacketType.APPLICATION_STREAM_PONG: self.handle_default,
-            PacketType.APPLICATION_STREAM_RESPONSE: self.handle_default,
-            PacketType.CONTROL_CLIENT_CLOSE: self.handle_default,
-            PacketType.CONTROL_SERVER_CLOSE: self.handle_default,
-            PacketType.CONTROL_HANDSHAKE: self.handle_default,
-            PacketType.CONTROL_HANDSHAKE_RESPONSE: self.handle_handshake_response,
-            PacketType.CONTROL_PING_SIMPLE: self.handle_control_ping,
-            PacketType.CONTROL_PONG: self.handle_recv_pong
-        }
-        self.socketCode = AgentSocketCode.NONE
-        self.startTimeStamp = self.ac.startTimestamp
-        self.agentName = app_name
-        self.agentInfo = TAgentInfo(
-            agentId=app_id,
-            applicationName=app_name,
-            agentVersion=ac.version,
-            startTimestamp=self.startTimeStamp,
-            serviceType=self.serviceType,
-            pid=os.getpid()
-        )
-
-        self.agentState = ThriftAgentStateManager(self.app_id, self.startTimeStamp, self.statHost)
-        self.postponed_queue = []
-        self.scanLocalInfo()
-        self.api_metas = {}
-        self.string_metas = {}
-        self.span_factory = ThriftSpanFactory(self)
-
-    ## expose to other modules
-    def sendMsgToCollector(self, msg):
-        if self.socketCode == AgentSocketCode.NONE:  ## channel not ready
-            TCLogger.debug("AgentState not ready,postpone size:%d", len(msg))
-            self.postponed_queue.append(msg)
-        else:
-            ### send backlog
-            self._flushPostponed()
-            self.tcpLayer.sendData(msg)
-
-    def _flushPostponed(self):
-        if len(self.postponed_queue) > 0:
-            for m in self.postponed_queue:
-                TCLogger.debug("postponed size:%d ", len(m))
-                self.tcpLayer.sendData(m[:])
-            self.postponed_queue = []
-
-    def updateApiMeta(self, name, api_type=API_DEFAULT):
-
-        if name in self.api_metas:
-            return self.api_metas[name]
-        else:
-            meta = ThriftAPIMeta(name=name, type=api_type,
-                                 agentStartTime=self.startTimeStamp, agentId=self.app_id,
-                                 agentName=self.app_name)
-            self.sendMsgToCollector(meta.toPacket().getSerializedData())
-            self.api_metas[name] = meta
-            return meta
-
-    def sendMeta(self, meta):
-        '''
-
-        :param ThriftAPIMeta meta:
-        :return:
-        '''
-        TCLogger.debug("meta: %s", meta.name)
-        self.sendMsgToCollector(meta.toPacket().getSerializedData())
-
-    def updateStringMeta(self, name):
-
-        if name in self.string_metas:
-            return self.string_metas[name]
-        else:
-
-            meta = StringMetaData(agentStartTime=self.startTimeStamp, agentId=self.app_id, name=name)
-            self.sendMeta(meta)
-            self.string_metas[name] = meta
-            return meta
-
-    def asynSendSpan(self, stack, body):
-        self.sendSpan(stack, body)
-
-    def sendSpan(self, stack, body):
-        super().sendSpan(stack, body)
-
-        try:
-            tSpan = self.span_factory.makeSpan(stack)
-            body = CollectorPro.obj2bin(tSpan, SPAN)
-            self.spanLayer.sendData(body)
-            TCLogger.debug("send TSpan:%s", tSpan)
-        except Exception as e:
-            TCLogger.error("exception %s", e)
-        return True
-
-    def scanLocalInfo(self):
-
-        self.agentInfo.hostname = agentHost.hostname
-        self.agentInfo.ip = agentHost.ip
-        self.agentInfo.ports = self.ac.getWebPort()
-
-    def start(self):
-        self.tcpLayer.start()
-        self.spanLayer.start()
-
-    def stop(self):
-        self.ac.clean()
-        self.tcpLayer.stop()
-        self.spanLayer.stop()
-
-    def handle_default(self, tcp_layer, ptype, header, vBody):
-        TCLogger.debug('ptype:%d ignore', ptype)
-        return 0
-
-    ## APPLICATION_REQUEST
-    def handle_appResponse(self, tcp_layer, ptype, header, vBody):
-        TCLogger.debug('ptype:%d ignore', ptype)
-        return 0
-
-    def negotiatedDone(self, code, tcp_layer):
-
-        # # register ping
-
-        TrainLayer.registerTimers(self.__sendPing, 10, tcp_layer)
-        TCLogger.debug("register send ping ")
-        #
-        # # register TagentInfo
-        TrainLayer.registerTimers(self.__sendAgentInfo, 0, tcp_layer)
-        TCLogger.debug("send agentInfo ")
-
-        # check the postponed
-
-        self._flushPostponed()
-
-    ## CONTROL_HANDSHAKE_RESPONSE
-    def handle_handshake_response(self, tcp_layer, ptype, header, vBody):
-        cbf = ChannelBufferV2(vBody.tobytes())
-        cmg = ControlMessageDecoder.decodingControlMessage(cbf)
-
-        if cmg.type == ControlMessage.CONTROL_MESSAGE_MAP:
-            code_CM = cmg.data[b'code']
-            subCode_CM = cmg.data[b'subCode']
-            if code_CM.type == ControlMessage.CONTROL_MESSAGE_LONG and subCode_CM.type == ControlMessage.CONTROL_MESSAGE_LONG:
-                code = code_CM.data
-                subCode = subCode_CM.data
-                TCLogger.debug("code %d subcode %d", code, subCode)
-                self.socketCode = HandShakeMessage.getNextStateCode(code, subCode)
-                self.negotiatedDone(self.socketCode, tcp_layer)
-
-        return 0
-
-    def handle_appliaction_response(self, tcp_layer, ptype, header, vBody):
-        '''
-
-        :param tcp_layer:
-        :param ptype:
-        :param header:
-        :param memoryview vBody:
-        :return:
-        '''
-        type, obj = CollectorPro.bin2obj(vBody)
-        TCLogger.debug("response: %s", obj)
-
-    def __getPingPacket(self):
-        ## ping context
-
-        pingBuf = struct.pack("!ibb", self.socketCode,  # ThriftAgent.PingCount,
-                              0,
-                              self.socketCode)
-
-        packet = Packet(hType=PacketType.CONTROL_PING_PAYLOAD, body=pingBuf)
-        ThriftAgentImplement.PingCount += 1
-        return packet
-
-    ## PacketType.CONTROL_PONG
-    def handle_recv_pong(self, tcp_layer, ptype, header, vBody):
-        TCLogger.debug("recv pong")
-        return 0
-
-    ## PacketType.CONTROL_PING
-    def handle_control_ping(self, tcp_layer, ptype, header, vBody):
-        ping = Packet(PacketType.CONTROL_PONG)
-        tcp_layer.sendData(ping.getSerializedData())
-        return 0
-
-    def handlerResponse(self, tcp_layer, view, size):
-        '''
-
-        :param memoryview view:
-        :param int size:
-        :return:
-        '''
-        offset = 0
-        iterPacket = Packet.parseNetByteStream(view, size)
-        for packet in iterPacket:
-            offset, ptype, header, vBody = packet
-            self.packetRoute[ptype](tcp_layer, ptype, header, vBody)
-
-        return 0
-
-    def __sendPing(self, tcp_layer):
-        ping_data = self.__getPingPacket().getSerializedData()
-        tcp_layer.sendData(ping_data)
-
-    def __sendAgentInfo(self, tcp_layer):
-        agent_data = self.__getTAgentInfoPacket().getSerializedData()
-        tcp_layer.sendData(agent_data)
-        TCLogger.debug("send agentInfo len:%d", len(agent_data))
-
-    def collectorTcpHello(self, tcp_layer):
-        '''
-        :param StreamClientLayer tcp_layer:
-        :return:
-        '''
-        ### handshakepacket
-        data = self.__getHandShakePacket(tcp_layer).getSerializedData()
-        tcp_layer.sendData(data)
-        TCLogger.debug("send hand shake len:%d", len(data))
-
-    def __getHandShakePacket(self, tcp_layer):
-        cmp = HandShakeMessage(
-            tcp_layer.getRawSocketFd(),
-            self.agentInfo.hostname,
-            True,
-            self.agentInfo.ip,
-            self.agentInfo.agentId,
-            self.agentInfo.applicationName,
-            self.serviceType,
-            self.agentInfo.pid,
-            self.agentInfo.agentVersion,
-            self.startTimeStamp)
-
-        packet = Packet(PacketType.CONTROL_HANDSHAKE,
-                        0, cmp.getDataLen(),
-                        cmp.getBinData())
-        return packet
-
-    def __getTAgentInfoPacket(self):
-        # self.agentInfo
-        TCLogger.debug("agent:%s", self.agentInfo)
-        body = CollectorPro.obj2bin(self.agentInfo, AGENT_INFO)
-        packet = Packet(PacketType.APPLICATION_REQUEST, CollectorPro.getCurReqCount(), len(body), body)
-        ThriftAgentImplement.ReqCount += 1
-
-        return packet
diff --git a/collector-agent/CollectorAgent/ThriftAgentStateManager.py b/collector-agent/CollectorAgent/ThriftAgentStateManager.py
deleted file mode 100644
index 9b4b72a70..000000000
--- a/collector-agent/CollectorAgent/ThriftAgentStateManager.py
+++ /dev/null
@@ -1,58 +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.
-# ------------------------------------------------------------------------------
-import psutil
-
-from CollectorAgent.Protocol import CollectorPro
-from Common.Logger import TCLogger
-from Events import DgramLayer, TrainLayer
-from PinpointAgent.Type import AGENT_STAT_BATCH
-from Proto.Trift.Pinpoint.ttypes import TAgentStat, TCpuLoad, TAgentStatBatch
-
-
-class ThriftAgentStateManager(object):
-    def __init__(self, agentId, startTimeStamp, host):
-        self.state = TAgentStat()
-        self.cup_load = TCpuLoad()
-        self.state.agentId = agentId
-        self.state.startTimestamp = startTimeStamp
-        self.stateBatch = TAgentStatBatch()
-        self.stateBatch.agentId = agentId
-        self.stateBatch.startTimestamp = startTimeStamp
-        self.stateBatch.agentStats = []
-        self.remote = host
-
-        self.trans_layer = DgramLayer(host, None)
-        self.trans_layer.start()
-
-        TrainLayer.registerTimers(self.sendState, 20)
-        TCLogger.debug("register state timer")
-
-    def _upDateCurState(self):
-        self.stateBatch.agentStats = []
-        ## cpu
-        self.cup_load.systemCpuLoad = psutil.getloadavg()[0]
-        self.state.cpuLoad = self.cup_load
-
-        self.stateBatch.agentStats.append(self.state)
-
-    def sendState(self, layer):
-        self._upDateCurState()
-        body = CollectorPro.obj2bin(self.stateBatch, AGENT_STAT_BATCH)
-        TCLogger.debug("send state:%s", self.stateBatch)
-        self.trans_layer.sendData(body)
diff --git a/collector-agent/CollectorAgent/ThriftSpanFactory.py b/collector-agent/CollectorAgent/ThriftSpanFactory.py
deleted file mode 100644
index 34c68bd33..000000000
--- a/collector-agent/CollectorAgent/ThriftSpanFactory.py
+++ /dev/null
@@ -1,177 +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/7/19
-from CollectorAgent.Protocol import TransactionId
-from CollectorAgent.TCGenerator import ThriftProtocolUtil
-from Common.Logger import TCLogger
-from PHPAgent.SpanFactory import SpanFactory
-from PinpointAgent.Type import API_WEB_REQUEST, PHP, PROXY_HTTP_HEADER, PHP_METHOD_CALL
-from Proto.Trift.Trace.ttypes import TSpan, TIntStringValue, TAnnotation, TAnnotationValue, \
-    TLongIntIntByteByteStringValue, TSpanEvent
-
-
-class ThriftSpanFactory(SpanFactory):
-    def createSpan(self, stackMap):
-        tSpan = TSpan()
-        tSpan.apiId = self.agent.updateApiMeta(stackMap['name'], API_WEB_REQUEST).apiId
-        tSpan.agentStartTime = self.agent.startTimeStamp
-
-        if 'appid' in stackMap:
-            tSpan.agentId = stackMap['appid']
-        else:
-            tSpan.agentId = self.agent.app_id
-
-        if 'appname' in stackMap:
-            tSpan.applicationName = stackMap['appname']
-        else:
-            tSpan.applicationName = self.agent.app_name
-
-        if 'stp' in stackMap:
-            tSpan.serviceType = int(stackMap['stp'])
-            tSpan.applicationServiceType = int(stackMap['stp'])
-        else:
-            tSpan.serviceType = PHP
-            tSpan.applicationServiceType = PHP
-
-        if 'psid' in stackMap:
-            tSpan.parentSpanId = int(stackMap['psid'])
-
-        if 'tid' in stackMap:
-            tSpan.transactionId = TransactionId(encoded_str=stackMap['tid']).getBytes()
-
-        if 'sid' in stackMap:
-            tSpan.spanId = int(stackMap['sid'])
-
-        if 'S' in stackMap:
-            tSpan.startTime = stackMap['S']
-
-        if 'E' in stackMap:
-            tSpan.elapsed = stackMap['E']
-
-        if 'uri' in stackMap:
-            tSpan.rpc = stackMap['uri']
-
-        if 'pname' in stackMap:
-            tSpan.parentApplicationName = stackMap['pname']
-
-        if 'ptype' in stackMap:
-            tSpan.parentApplicationType = int(stackMap['ptype'])
-
-        if 'client' in stackMap:
-            tSpan.remoteAddr = stackMap['client']
-
-        if 'server' in stackMap:
-            tSpan.endPoint = stackMap['server']
-
-        if 'ERR' in stackMap:
-            tSpan.err = 1
-            id = self.agent.updateStringMeta('ERR').apiId
-            tSpan.exceptionInfo = TIntStringValue(id, stackMap['ERR']['msg'])
-
-        if 'Ah' in stackMap:
-            tSpan.acceptorHost = stackMap['Ah']
-
-        tSpan.spanEventList = []
-        tSpan.annotations = []
-
-        if 'clues' in stackMap:
-            for annotation in stackMap['clues']:  # list
-                id, value = annotation.split(':', 1)
-                ann = TAnnotation(int(id), TAnnotationValue(stringValue=value))
-                tSpan.annotations.append(ann)
-
-        try:
-            value = None
-            if 'NP' in stackMap:  ## nginx
-                value = TLongIntIntByteByteStringValue()
-                arr = ThriftProtocolUtil._parseStrField(stackMap['NP'])
-                value.intValue1 = 2
-                if 'D' in arr:
-                    value.intValue2 = ThriftProtocolUtil._parseDotFormat(arr['D'])
-                if 't' in arr:
-                    value.longValue = ThriftProtocolUtil._parseDotFormat(arr['t'])
-
-            elif 'AP' in stackMap:  ## apache
-                value = TLongIntIntByteByteStringValue()
-                arr = ThriftProtocolUtil._parseStrField(stackMap['AP'])
-                value.intValue1 = 3
-                if 'i' in arr:
-                    value.byteValue1 = int(arr['i'])
-                if 'b' in arr:
-                    value.byteValue2 = int(arr['b'])
-                if 'D' in arr:
-                    value.intValue2 = int(arr['D'])
-                if 't' in arr:
-                    value.longValue = int(int(arr['t']) / 1000)
-            # remove default proxy_header
-            if value is not None:
-                ann = TAnnotation(PROXY_HTTP_HEADER, TAnnotationValue(longIntIntByteByteStringValue=value))
-                tSpan.annotations.append(ann)
-        except Exception as e:
-            TCLogger.error("input is illegal,Exception %s", e)
-
-        return tSpan
-
-    def createSpanEvent(self, stackMap):
-        assert 'name' in stackMap
-        spanEv = TSpanEvent()
-
-        spanEv.apiId = self.agent.updateApiMeta(stackMap['name']).apiId
-        spanEv.annotations = []
-        if 'EXP' in stackMap:
-            id = self.agent.updateStringMeta('EXP').apiId
-            spanEv.exceptionInfo = TIntStringValue(id, stackMap['EXP'])
-
-        if 'dst' in stackMap:
-            spanEv.destinationId = stackMap['dst']
-
-        if 'S' in stackMap:
-            spanEv.startElapsed = stackMap['S']
-
-        if 'E' in stackMap:
-            spanEv.endElapsed = stackMap['E']
-
-        if 'dst' in stackMap:
-            spanEv.destinationId = stackMap['dst']
-
-        if 'nsid' in stackMap:
-            spanEv.nextSpanId = int(stackMap['nsid'])
-
-        if 'stp' in stackMap:
-            spanEv.serviceType = int(stackMap['stp'])
-        else:
-            spanEv.serviceType = PHP_METHOD_CALL
-
-        if 'clues' in stackMap:
-            for annotation in stackMap['clues']:  # list
-                id, value = annotation.split(':', 1)
-                ann = TAnnotation(int(id), TAnnotationValue(stringValue=value))
-                spanEv.annotations.append(ann)
-
-        return spanEv
-
-    def attachSpanEvent(self, tSpan, span_event):
-        tSpan.spanEventList.append(span_event)
-
-    def setSequenceid(self, span_ev, id):
-        span_ev.sequence = id
-
-    def setDepth(self, span_ev, depth):
-        span_ev.depth = depth
diff --git a/collector-agent/CollectorAgentConf/CollectorAgentConf.py b/collector-agent/CollectorAgentConf/CollectorAgentConf.py
deleted file mode 100644
index a0ecec4b2..000000000
--- a/collector-agent/CollectorAgentConf/CollectorAgentConf.py
+++ /dev/null
@@ -1,170 +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.
-# ------------------------------------------------------------------------------
-import os
-import time
-
-from CollectorAgent.GrpcAgentImplement import GrpcAgentImplement
-from CollectorAgent.ThriftAgentImplement import ThriftAgentImplement
-from Common.Logger import set_logger_file, set_logger_level, logger_enable_console, TCLogger
-from PinpointAgent.Type import SUPPORT_THRIFT, SUPPORT_GRPC
-
-AGENT_VERSION = '1.8.0-RC1'
-
-
-class CollectorAgentConf(object):
-    def __init__(self, config):
-        '''
-
-        :param ConfigParser config:
-        '''
-
-        self.CollectorSpanIp = ''
-        self.CollectorSpanPort = ''
-        self.CollectorStatIp = ''
-        self.CollectorStatPort = ''
-        self.CollectorAgentIp = ''
-        self.CollectorAgentPort = ''
-        self.max_pending_size = ''
-        self.collector_type = -1
-
-        self.collector_implement = None
-        self.startTimestamp = int(time.time() * 1000)
-        self.config = config
-        self.version = AGENT_VERSION
-        self.max_pending_size = 10000
-
-        if not config:
-            ## update system evn and it own a higher priority
-            ## while, only support grpc
-            self._parseSysEnv()
-        elif config.has_option('Collector', 'collector.grpc.agent.ip') and \
-                config.has_option('Collector', 'collector.grpc.stat.ip') and \
-                config.has_option('Collector', 'collector.grpc.span.ip'):
-            self._readCommon(config)
-            self._readGrpc(config)
-        else:
-            self._readCommon(config)
-            self._readThrift(config)
-
-        self._outputConfig()
-
-    def _readCommon(self, config):
-        self.log_dir = config.get('Common', 'LOG_DIR', fallback='/tmp')
-        self.log_level = config.get('Common', 'Log_Level', fallback='DEBUG')
-        self.webPort = self.config.get('Common', 'Web_Port')
-        self._setLog(self.log_dir, self.log_level)
-
-    def _parseSysEnv(self):
-        try:
-            self.CollectorSpanIp = os.environ['PP_COLLECTOR_AGENT_SPAN_IP'].rstrip()
-            self.CollectorSpanPort = int(os.environ['PP_COLLECTOR_AGENT_SPAN_PORT'])
-            self.CollectorAgentIp = os.environ['PP_COLLECTOR_AGENT_AGENT_IP'].rstrip()
-            self.CollectorAgentPort = int(os.environ['PP_COLLECTOR_AGENT_AGENT_PORT'])
-            self.CollectorStatIp = os.environ['PP_COLLECTOR_AGENT_STAT_IP'].rstrip()
-            self.CollectorStatPort = int(os.environ['PP_COLLECTOR_AGENT_STAT_PORT'])
-            self.agentIsDocker = True if os.environ.get(
-                'PP_COLLECTOR_AGENT_ISDOCKER').rstrip().lower() == 'true' else False
-            self.log_dir = os.getenv('PP_LOG_DIR', '/tmp/').rstrip()
-            self.log_level = os.getenv('PP_Log_Level', 'DEBUG').rstrip()
-            self.webPort = os.getenv('PP_WEB_PORT', '80').rstrip()
-            self.collector_type = SUPPORT_GRPC
-            self.collector_implement = GrpcAgentImplement
-            self._setLog(self.log_dir, self.log_level)
-        except KeyError as e:
-            # an exception is convenience for debugging
-            raise RuntimeError('Please check your environment variable %s is missing' % (e))
-
-    def _readGrpc(self, config):
-        self.CollectorSpanIp = config.get('Collector',
-                                          'collector.grpc.span.ip')
-        self.CollectorSpanPort = config.getint('Collector',
-                                               'collector.grpc.span.port')
-        self.CollectorStatIp = config.get('Collector',
-                                          'collector.grpc.stat.ip')
-        self.CollectorStatPort = config.getint('Collector',
-                                               'collector.grpc.stat.port')
-        self.CollectorAgentIp = config.get('Collector',
-                                           'collector.grpc.agent.ip')
-        self.CollectorAgentPort = config.getint('Collector',
-                                                'collector.grpc.agent.port')
-
-        self.max_pending_size = config.getint('Collector',
-                                              'collector.grpc.discardpolicy.maxpendingthreshold', fallback=10000)
-
-        agentIsDocker = config.get('Common', 'Isdocker', fallback='false')
-
-        self.agentIsDocker = True if agentIsDocker.lower() == 'true' else False
-
-        self.collector_type = SUPPORT_GRPC
-        self.collector_implement = GrpcAgentImplement
-
-    def _readThrift(self, config):
-        self.CollectorSpanIp = config.get('Collector',
-                                          'CollectorSpanIp')
-        self.CollectorSpanPort = config.getint('Collector',
-                                               'CollectorSpanPort')
-        self.CollectorStatIp = config.get('Collector',
-                                          'CollectorStatIp')
-        self.CollectorStatPort = config.getint('Collector',
-                                               'CollectorStatPort')
-        self.CollectorAgentIp = config.get('Collector',
-                                           'CollectorTcpIp')
-        self.CollectorAgentPort = config.getint('Collector',
-                                                'CollectorTcpPort')
-        self.agentIsDocker = False
-        self.collector_type = SUPPORT_THRIFT
-        self.collector_implement = ThriftAgentImplement
-
-    def _outputConfig(self):
-        TCLogger.info("CollectorSpanIp:%s", self.CollectorSpanIp)
-        TCLogger.info("CollectorStatIp:%s", self.CollectorStatIp)
-        TCLogger.info("CollectorAgentIp:%s", self.CollectorAgentIp)
-        TCLogger.info("CollectorSpanPort:%d", self.CollectorSpanPort)
-        TCLogger.info("CollectorStatPort:%d", self.CollectorStatPort)
-        TCLogger.info("CollectorAgentPort:%d", self.CollectorAgentPort)
-        TCLogger.info("collector_type:%s", "gRpc" if self.collector_type == SUPPORT_GRPC else "thrift")
-        TCLogger.info("log_dir:%s", self.log_dir)
-        TCLogger.info("log_level:%s", self.log_level)
-        TCLogger.info("webPort:%s", self.webPort)
-        TCLogger.info("agentIsDocker:%s", self.agentIsDocker)
-
-
-    def _setLog(self, dir, level):
-        if dir is not None:
-            set_logger_file(dir)
-        else:
-            logger_enable_console()
-        set_logger_level(level)
-
-    def getSpanHost(self):
-        return (self.CollectorSpanIp, self.CollectorSpanPort)
-
-    def getStatHost(self):
-        return (self.CollectorStatIp, self.CollectorStatPort)
-
-    def getTcpHost(self):
-        return (self.CollectorAgentIp, self.CollectorAgentPort)
-
-    def getWebPort(self):
-        return self.webPort
-
-    def clean(self):
-        pass
-        # os.remove(self.sharedObjectAddress)
diff --git a/collector-agent/CollectorAgentConf/__init__.py b/collector-agent/CollectorAgentConf/__init__.py
deleted file mode 100644
index 34fa65c6e..000000000
--- a/collector-agent/CollectorAgentConf/__init__.py
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-# Created by eeliu at 12/9/20
-from .CollectorAgentConf import CollectorAgentConf
-from Common.Config import CAConfig
-config = CollectorAgentConf(CAConfig)
-__all__=['config']
\ No newline at end of file
diff --git a/collector-agent/Common/AgentHost.py b/collector-agent/Common/AgentHost.py
deleted file mode 100644
index 3451e8e66..000000000
--- a/collector-agent/Common/AgentHost.py
+++ /dev/null
@@ -1,28 +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 gevent import socket as gsocket
-
-class AgentHost(object):
-    def __init__(self):
-        self.hostname = gsocket.gethostname()
-        self.ip   = gsocket.gethostbyname(self.hostname)
-    def __str__(self):
-        return "host:%s ip:%s"%(self.hostname,self.ip)
-
diff --git a/collector-agent/Common/Config.py b/collector-agent/Common/Config.py
deleted file mode 100644
index 16fbc5d03..000000000
--- a/collector-agent/Common/Config.py
+++ /dev/null
@@ -1,38 +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.
-# ------------------------------------------------------------------------------
-import configparser as ConfigParser
-import os
-
-
-def get_conf(env_name):
-    if not env_name in os.environ:
-        return None
-
-    __config_path = os.environ[env_name]
-    if os.path.exists(__config_path):
-        config = ConfigParser.ConfigParser()
-        config.read(__config_path)
-        return config
-    else:
-        return None
-
-CAConfig = get_conf('COLLECTOR_CONFIG')
-
diff --git a/collector-agent/Common/Logger.py b/collector-agent/Common/Logger.py
deleted file mode 100644
index ac613f5fb..000000000
--- a/collector-agent/Common/Logger.py
+++ /dev/null
@@ -1,50 +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.
-# ------------------------------------------------------------------------------
-import logging
-
-def _create_logger(name):
-    logger = logging.getLogger(name)
-    return logger
-
-
-TCLogger = _create_logger("TC")
-PALogger = _create_logger("PA")
-
-def set_logger_file(fullpath,format=logging.Formatter('[%(asctime)s] [%(process)d] [%(levelname)s] [%(filename)s:%(lineno)s] %(message)s')):
-    fileHandler = logging.FileHandler(fullpath+'/collector.agent.log')
-    fileHandler.setFormatter(format)
-    TCLogger.addHandler(fileHandler)
-
-    fileHandler = logging.FileHandler(fullpath+'/front.agent.log')
-    fileHandler.setFormatter(format)
-    PALogger.addHandler(fileHandler)
-
-def set_logger_level(level):
-    TCLogger.setLevel(level)
-    PALogger.setLevel(level)
-
-def logger_enable_console(format=logging.Formatter('[%(asctime)s] [%(process)d] [%(levelname)s] [%(filename)s:%(lineno)s] %(message)s')):
-    streamHandler = logging.StreamHandler()
-    streamHandler.setFormatter(format)
-    TCLogger.addHandler(streamHandler)
-
-    streamHandler = logging.StreamHandler()
-    streamHandler.setFormatter(format)
-    PALogger.addHandler(streamHandler)
\ No newline at end of file
diff --git a/collector-agent/Common/Stat.py b/collector-agent/Common/Stat.py
deleted file mode 100644
index 2eee002e0..000000000
--- a/collector-agent/Common/Stat.py
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-# Created by eeliu at 1/14/21
-from Stat_pb2 import PJvmGc, JVM_GC_TYPE_CMS
-
-
-class Stat:
-    @staticmethod
-    def collectJvmInfo():
-        # php/python no such jvm info
-        jvmGc = PJvmGc(type=JVM_GC_TYPE_CMS
-                       )
-        return jvmGc
diff --git a/collector-agent/Common/__init__.py b/collector-agent/Common/__init__.py
deleted file mode 100644
index 8f8b447cc..000000000
--- a/collector-agent/Common/__init__.py
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-# Created by eeliu at 12/9/20
-
-from .AgentHost import AgentHost
-from .Logger import TCLogger, PALogger
-from .Stat import Stat
-agentHost = AgentHost()
-__all__ = ['agentHost', 'TCLogger', 'PALogger', 'Stat']
diff --git a/collector-agent/Events/DgramLayer.py b/collector-agent/Events/DgramLayer.py
deleted file mode 100644
index 8da643b73..000000000
--- a/collector-agent/Events/DgramLayer.py
+++ /dev/null
@@ -1,62 +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 __future__ import print_function
-
-import errno
-
-from gevent import socket as asy_socket
-
-from Common.Logger import TCLogger
-from Events.TrainsLayer import *
-
-
-class DgramLayer(TrainLayer):
-
-    def start(self):
-        self.__socket = asy_socket.socket(asy_socket.AF_INET,asy_socket.SOCK_DGRAM)
-        self.__socket.setblocking(False)
-        try:
-            self.state = E_CONNECTED
-            self.__socket.connect(self.remote)
-        except  asy_socket.error as e:
-            if not (e.errno in (errno.EINPROGRESS, errno.EWOULDBLOCK)):
-                TCLogger.warning("connect:%s error:%s" % (self.remote, str(e)))
-                self.__socket.close()
-                raise Exception("create DgramLayer failed")
-
-    def sendData(self, data):
-        try:
-            self.__socket.send(data)
-        except  asy_socket.error as e:
-            if e.errno in (errno.EINPROGRESS, errno.EWOULDBLOCK):
-                pass
-            else:
-                TCLogger.warning("connect:%s error:%s" % (self.remote, str(e)))
-
-    def stop(self):
-        self.state = E_CLOSED
-        self.__socket.close()
-
-
-
-if __name__ == '__main__':
-    dg = DgramLayer(('10.34.135.162',8000),None)
-    dg.start()
-    dg.sendData("fasdfasdfasdf")
diff --git a/collector-agent/Events/GTimer.py b/collector-agent/Events/GTimer.py
deleted file mode 100644
index 77506edc0..000000000
--- a/collector-agent/Events/GTimer.py
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-# Created by eeliu at 10/21/19
-
-# ------------------------------------------------------------------------------
-#  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 gevent import get_hub
-class GTimer(object):
-    def __init__(self,only_once = True):
-        self.loop = get_hub().loop
-        self.timer = None
-        self.callback = None
-        self.only_once = only_once
-        self.started = False
-
-    def _timerCallback(self,*args):
-        self.callback(*args)
-        if self.only_once :
-            self.timer.stop()
-            self.started = False
-
-    def start(self, callback, interval, *args):
-        if self.started:
-            return
-
-        self.started = True
-        self.timer = self.loop.timer(interval,interval)
-        self.callback = callback
-        self.timer.start(self._timerCallback,*args)
-
-    def stop(self):
-        if not self.only_once and self.timer:
-            self.timer.stop()
-            self.started = False
-
diff --git a/collector-agent/Events/State.py b/collector-agent/Events/State.py
deleted file mode 100644
index c2fc607a6..000000000
--- a/collector-agent/Events/State.py
+++ /dev/null
@@ -1,20 +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.
-# ------------------------------------------------------------------------------
-OK =1
diff --git a/collector-agent/Events/StreamClientLayer.py b/collector-agent/Events/StreamClientLayer.py
deleted file mode 100644
index ba9a5bf89..000000000
--- a/collector-agent/Events/StreamClientLayer.py
+++ /dev/null
@@ -1,213 +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 __future__ import print_function
-
-import errno
-
-from gevent import Timeout
-from gevent import socket as asy_socket
-from gevent.event import Event  ## write signal
-
-from Common.Logger import TCLogger
-from Events.TrainsLayer import *
-
-
-class StreamClientLayer(TrainLayer):
-    def __init__(self,remote,recv_msg_cb,hello_cb,auto_recover=True,timeout= 5):
-        '''
-
-        :param tuple remote:
-        :param  recv_msg_cb:
-        :param hello_cb:
-        :param auto_recover:
-        :param timeout:
-        '''
-        super(StreamClientLayer, self).__init__(remote, recv_msg_cb, auto_recover, timeout)
-        self.RECV_BUF_SIZE = 4096
-        self.recvBuf = bytearray(self.RECV_BUF_SIZE)
-        self.pRBufStart = memoryview(self.recvBuf)
-        self.hello_cb = hello_cb
-        self.rest_data_sz = 0
-        self.peer     = ()
-        self._read_watcher = None
-        self._write_watcher = None
-        self.loop = get_hub().loop
-        self.timer = self.loop.timer(timeout)
-        self.send_buf =b''
-
-
-    def close(self):
-        TCLogger.warning("close connection (%s)", str(self.remote))
-        self._read_watcher.stop()
-        self._write_watcher.stop()
-        self.timer.stop()
-        self.socket.close()
-        self.state = E_CLOSED
-        ## reset send buffer
-        self.send_buf = b''
-        self.timer =  self.loop.timer(self.timeout)
-        self.timer.start(self._connectPeerWithHello,self.remote)
-
-
-    def _connected(self, addr):
-        self.peer = addr
-        self.__rawFd = self.socket.fileno()
-        TCLogger.info("connect peer: [%s:%d] success" % (addr[0], addr[1]))
-        self.state= E_CONNECTED
-
-        ### start watcher recv
-        self._enableRead()
-
-        ### stop write
-        self._stopWrite()
-
-        ### stop timer
-        self.timer.stop()
-
-        ### say hello
-        if self.hello_cb is not None:
-            self.hello_cb(self)
-
-
-    def _stopWrite(self):
-        self._write_watcher.stop()
-        self.state |= E_WRITING
-
-    def _enableRead(self):
-        self.state |=  E_READ
-        self._read_watcher.start(self._start_recv)
-
-    def _actionTimeOut(self,time):
-        if self.state == E_CONNETING:
-            TCLogger.info("connecting state:%d timeout:%ds",self.state,time)
-            self.close()
-        elif self.state & E_WRITING == E_WRITING:
-            TCLogger.info("waiting writing %d timeout:%ds", self.state, time)
-        else:
-            TCLogger.error("unhandled state:%d",self.state)
-
-    def _connectPeerAsy(self, addr, time):
-        self.socket = asy_socket.socket(asy_socket.AF_INET, asy_socket.SOCK_STREAM)
-        self.socket.setblocking(False)
-        self._read_watcher = self.loop.io(self.socket.fileno(), 1)
-        self._write_watcher = self.loop.io(self.socket.fileno(), 2)
-        try:
-            self.state = E_CONNETING
-            self.socket.connect(addr)
-        except  asy_socket.error as e:
-            if not( e.errno in (errno.EINPROGRESS, errno.EWOULDBLOCK)):
-                TCLogger.warning("connect:%s error:%s" % (addr, str(e)))
-                self.close()
-                return False
-        self.timer = self.loop.timer(self.timeout)
-        self.timer.start(self._actionTimeOut,time)
-        self._write_watcher.start(self._connected, addr)
-        return True
-
-    def _connectPeerWithHello(self, remote):
-        TCLogger.info("try to connect:%s with timeout:%d",str(remote),self.timeout)
-        self._connectPeerAsy(remote, self.timeout)
-
-    def _recvFromPeer(self):
-        recv_buf  = self.pRBufStart[self.rest_data_sz:]
-        recv_total = self.rest_data_sz
-        assert recv_total < self.RECV_BUF_SIZE
-        try:
-             recv_total = self.socket.recv_into(recv_buf,self.RECV_BUF_SIZE - recv_total)
-             if recv_total == 0:
-                 TCLogger.warning("peer: [%s:%d] closed",self.peer[0],self.peer[1])
-                 return -1
-        except asy_socket.error as error:
-            if error.errno in [errno.EAGAIN]:
-                return 0
-            TCLogger.warning("peer error:%s ",error)
-            return -1
-        return recv_total
-
-    def _start_recv(self):
-        rLen = self._recvFromPeer()
-        if rLen > 0:
-            self.rest_data_sz = self.in_msg_cb(self, self.pRBufStart, rLen)
-            if self.rest_data_sz > 0:
-                self.pRBufStart[0:self.rest_data_sz] = self.pRBufStart[rLen - self.rest_data_sz:rLen]
-        elif rLen < 0:
-            self.close()
-
-    def start(self):
-        try:
-            ## start
-            self._connectPeerWithHello(self.remote)
-        except  Timeout as t:
-            TCLogger.warning("remote:%s time out state:%d",str(self.remote),self.state)
-            self.close()
-
-    def  _sendData(self):
-        try:
-            ret = self.socket.send(self.send_buf)
-        except asy_socket.error as e:
-            TCLogger.error("_sendData  %s",e)
-            self.close()
-            return
-        if ret != len(self.send_buf):
-            self.send_buf = self.send_buf[ret:]
-            self.sendData()
-            return
-        TCLogger.debug("send %d",ret)
-        ## write is done
-        self.state &=(~E_WRITING)
-        self._write_watcher.stop()
-        self.send_buf = b''
-
-
-    def sendData(self, outData=None):
-
-        if self.state in (E_CLOSED,E_CONNETING):
-            # self.write_wait_queue.append(data)
-            TCLogger.debug("current state is:%d, data drop",self.state)
-        else:
-            if outData is not None:
-                self.send_buf+=outData
-            self._write_watcher.start(self._sendData)
-
-
-    def getRawSocketFd(self):
-        return self.__rawFd
-
-
-def _test_hello_cb(n_layer):
-    TCLogger.debug("send hello")
-    n_layer.sendData(b"GET index.html \r\n\r\n")
-
-def _test_in_msg_cb(self,barray, size):
-    '''
-
-    :param memoryview barray:
-    :param size:
-    :return:
-    '''
-    print( barray[0:size].tobytes())
-    return 1
-
-if __name__ == '__main__':
-    tcpLayer = StreamClientLayer(("www.google.com", 80), _test_in_msg_cb, _test_hello_cb)
-
-    tcpLayer.start()
-    g = Event()
-    g.wait()
diff --git a/collector-agent/Events/StreamServerLayer.py b/collector-agent/Events/StreamServerLayer.py
deleted file mode 100644
index b1f615b98..000000000
--- a/collector-agent/Events/StreamServerLayer.py
+++ /dev/null
@@ -1,199 +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 gevent import get_hub
-from gevent import socket as gsocket
-
-from Common.Logger import TCLogger
-
-
-class StreamServerLayer(object):
-
-    class Client:
-        def __init__(self,socket,readEv,writeEv,address):
-            self.socket = socket
-            self.address = address
-            self._read_watcher = readEv
-            self._write_watcher = writeEv
-            self.RECV_BUF_SIZE = 409600 # The highest water mark for span
-            self.recvBuf = bytearray(self.RECV_BUF_SIZE)
-            self.pRBufStart = memoryview(self.recvBuf)
-            self.rest_data_sz = 0
-            self.send_buf = b''
-
-        def recv(self,in_msg_cb):
-            '''
-
-            :param self.Client client:
-            :return: if rLen < 0 error happens
-            '''
-            rLen = self._recvFromPeer()
-            if rLen > 0:
-                self.rest_data_sz = in_msg_cb(self, self.pRBufStart, rLen)
-                if self.rest_data_sz >=self.RECV_BUF_SIZE:
-                    TCLogger.warning("data from peer is overflow size=%d",self.rest_data_sz)
-                    return -1
-                if self.rest_data_sz > 0:
-                    self.pRBufStart[0:self.rest_data_sz] = self.pRBufStart[rLen - self.rest_data_sz:rLen]
-            return rLen
-
-        def _recvFromPeer(self):
-            recv_buf = self.pRBufStart[self.rest_data_sz:]
-            recv_total = self.rest_data_sz
-            assert recv_total < self.RECV_BUF_SIZE,"recv_total:%d self.RECV_BUF_SIZE:%d"%(recv_total,self.RECV_BUF_SIZE)
-            try:
-                recv_total = self.socket.recv_into(recv_buf, self.RECV_BUF_SIZE - recv_total)
-                if recv_total == 0:
-                    TCLogger.warning("peer close socket")
-                    return -1
-            except gsocket.error as error:
-                if error.errno in [gsocket.EAGAIN, gsocket.EWOULDBLOCK]:
-                    return 0
-                TCLogger.warning("peer error:%s ", error)
-                return -1
-            return recv_total+self.rest_data_sz
-
-
-        def close(self):
-            TCLogger.debug("close client:%d(%s)", self.socket.fileno(),self.address)
-
-            if self._read_watcher is not None:
-                self._read_watcher.stop()
-            if self._write_watcher is not None:
-                self._write_watcher.stop()
-
-            self.socket.close()
-
-
-
-        def _sendData(self):
-            try:
-                ret = self.socket.send(self.send_buf)
-            except gsocket.error as e:
-                TCLogger.error("_sendData  %s", e)
-                self.close()
-                return
-            ### not ready try next time
-            if ret != len(self.send_buf):
-                self.send_buf = self.send_buf[ret:]
-                # self.sendData()
-                return
-            TCLogger.debug("send %d", ret)
-            self._write_watcher.stop()
-
-        def sendData(self,data):
-            self.send_buf += data
-            self._write_watcher.start(self._sendData)
-
-
-    def __init__(self, listen_sock, in_msg_cb,hello_cb):
-        self.listen = listen_sock
-        self.in_msg_cb = in_msg_cb
-        self.say_hello_cb = hello_cb
-        self.listen_event = None
-        self.loop = get_hub().loop
-        self.clients ={}
-
-    def start(self):
-        self._startAccept()
-
-    def stop(self):
-        for fd in self.clients:
-            assert isinstance(self.clients[fd],StreamServerLayer.Client)
-            self.clients[fd].close()
-        self.clients.clear()
-        self._stopAccept()
-
-    def _startAccept(self):
-        self.listen_event = self.loop.io(self.listen.fileno(), 1)
-        self.listen_event.start(self._listenhandler)
-
-    def _stopAccept(self):
-        self.listen_event.stop()
-
-    def _listenhandler(self):
-        try:
-            sock = self.listen
-            # client_socket
-            client_socket, address = sock.accept()
-            client_socket.setblocking(False)
-            # sock = gsocket(_socket = client_socket)
-        except gsocket.error as error:
-            TCLogger.warning("accept:%s",error)
-            return
-
-        TCLogger.info("new connect fd:%s ",client_socket.fileno())
-        client_in_event= self.loop.io(client_socket.fileno(), 1)
-        client_out_event =  self.loop.io(client_socket.fileno(), 2)
-
-        client = self.Client(client_socket,client_in_event,client_out_event,address)
-
-        client_in_event.start(self.handleClientRead, client)
-
-        ## say hello
-
-        if self.say_hello_cb is not None:
-            self.say_hello_cb(client)
-
-        ## (socket,read_cv,write_cb)
-        self.clients[client_socket.fileno()] = client
-
-    def handleClientRead(self, client):
-        '''
-
-        :param self.Client client:
-        :return:
-        '''
-        while True:
-            len = client.recv(self.in_msg_cb)
-            if len > 0:## read again
-                continue
-            if len < 0:
-                TCLogger.warning(" client:%d disconnected",client.socket.fileno())
-                fd = client.socket.fileno()
-                client.close()
-                del self.clients[fd]
-            break
-
-
-
-def msgHandle(client,buffer,blen):
-    '''
-
-    :param gsocket socket:
-    :return:
-    '''
-    print(buffer[0:blen].tobytes())
-    return 0
-
-if __name__ == '__main__':
-    import  os
-    address = '/tmp/collector-agent.sock'
-
-    if os.path.exists(address):
-        os.remove(address)
-
-    listen_socket = gsocket.socket(gsocket.AF_UNIX, gsocket.SOCK_STREAM)
-    listen_socket.bind(address)
-    listen_socket.listen(256)
-    server = StreamServerLayer(listen_socket,msgHandle,None)
-    from gevent.event import Event
-    server.start()
-    g =Event()
-    g.wait()
diff --git a/collector-agent/Events/TrainsLayer.py b/collector-agent/Events/TrainsLayer.py
deleted file mode 100644
index 3efc462b9..000000000
--- a/collector-agent/Events/TrainsLayer.py
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-
-
-E_CONNECTED = 0
-E_CONNETING = 1
-E_WRITING = 2
-E_READ = 4
-E_CLOSED  = 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 gevent import get_hub
-
-class TrainLayer(object):
-    # remote = (host,port)
-    #
-    def __init__(self,remote,msg_cb,auto_recover=True,timeout= 2):
-        self.timeout     = timeout
-        self.remote      = remote
-        self.in_msg_cb     = msg_cb
-        self.state = E_CLOSED
-
-    def start(self):
-        pass
-
-    def stop(self):
-        pass
-
-    @staticmethod
-    def registerTimers(callback,interval,args=None):
-        loop = get_hub().loop
-        time = loop.timer(0, interval)
-        time.start(callback,args)
-
-
-if __name__ == '__main__':
-    # print(gsocket.getaddrinfo("www.google.jp", 80))
-    pass
diff --git a/collector-agent/Events/__init__.py b/collector-agent/Events/__init__.py
deleted file mode 100644
index 8bc29e61b..000000000
--- a/collector-agent/Events/__init__.py
+++ /dev/null
@@ -1,25 +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 Events.DgramLayer import DgramLayer
-from Events.StreamClientLayer import StreamClientLayer
-from Events.StreamServerLayer import StreamServerLayer
-from Events.TrainsLayer import TrainLayer
-
-__all__=['StreamClientLayer', 'DgramLayer','StreamServerLayer','TrainLayer']
diff --git a/collector-agent/Events/util.py b/collector-agent/Events/util.py
deleted file mode 100644
index faaf8134d..000000000
--- a/collector-agent/Events/util.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-# Created by eeliu at 1/14/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 gevent
-def try_to_recycle_the_event_hub():
-    gevent.reinit()
-    # loop = gevent.config.loop(default=True)
-    # loop.destory()
-    # gevent.joinall()
\ No newline at end of file
diff --git a/collector-agent/PHPAgent/FrontAgent.py b/collector-agent/PHPAgent/FrontAgent.py
deleted file mode 100644
index 52289f307..000000000
--- a/collector-agent/PHPAgent/FrontAgent.py
+++ /dev/null
@@ -1,101 +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.
-# ------------------------------------------------------------------------------
-import json
-import os
-import struct
-
-from gevent import socket as gsocket
-
-from Common.Logger import TCLogger
-from Events import StreamServerLayer
-from PHPAgent.Type import RESPONSE_AGENT_INFO
-
-
-class FrontAgent(object):
-    HEADERSIZE = 8
-    def __init__(self, ac, msgCallback):
-        self.address =ac.Address
-        self.listen_socket = self._bindSocket(self.address)
-        self.server = StreamServerLayer(self.listen_socket, self._recvData, self._phpClientSayHello)
-        self.msgHandleCallback = msgCallback
-        self.hello_callback = []
-
-    def _bindSocket(self,address):
-        if address[0] =='/': # treat as unix socket
-            if os.path.exists(address):
-                os.remove(address)
-            listen_socket = gsocket.socket(gsocket.AF_UNIX, gsocket.SOCK_STREAM)
-            listen_socket.bind(address)
-            listen_socket.listen(256)
-            return listen_socket
-        elif '@' in address: # treat as tcp port
-            ip,port = address.split('@')
-            listen_socket = gsocket.socket(gsocket.AF_INET, gsocket.SOCK_STREAM)
-            listen_socket.setsockopt(gsocket.SOL_SOCKET, gsocket.SO_REUSEADDR, 1)
-            listen_socket.bind((ip,int(port)))
-            listen_socket.listen(256)
-            return listen_socket
-
-    def _recvData(self, client, buf, buf_sz):
-        used = 0
-
-        while used < buf_sz:
-            # needs a whole header
-            if used + FrontAgent.HEADERSIZE > buf_sz:
-                return buf_sz - used
-
-            # needs a whole body
-            type, body_len = struct.unpack('!ii', buf[used:used + FrontAgent.HEADERSIZE].tobytes())
-            if used + body_len + FrontAgent.HEADERSIZE > buf_sz:
-                return buf_sz - used
-
-            used += FrontAgent.HEADERSIZE
-            body = buf[used:used + body_len].tobytes()
-            self.msgHandleCallback(client, type, body)
-            used += body_len
-
-        return 0
-
-    def registerPHPAgentHello(self,hello_cb):
-        self.hello_callback.append(hello_cb)
-
-    def _phpClientSayHello(self, client):
-        response = {}
-        for cb in self.hello_callback:
-            data = cb()
-            for key in data:
-                response[key] = data[key]
-
-        data = json.dumps(response)
-        buf  = struct.pack('!ii',RESPONSE_AGENT_INFO,len(data)) + data.encode()
-        client.sendData(buf)
-        TCLogger.debug("send hello:%d len:%d",client.socket.fileno(),len(buf))
-
-
-    def start(self):
-        self.server.start()
-
-    def stop(self):
-        self.server.stop()
-        TCLogger.debug("close listen_socket:%d[%s]",self.listen_socket.fileno(),self.address)
-        self.listen_socket.close()
-
-
diff --git a/collector-agent/PHPAgent/PHPAgentConf.py b/collector-agent/PHPAgent/PHPAgentConf.py
deleted file mode 100644
index 363cc5f20..000000000
--- a/collector-agent/PHPAgent/PHPAgentConf.py
+++ /dev/null
@@ -1,26 +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.
-# ------------------------------------------------------------------------------
-import os
-class PHPAgentConf(object):
-    def __init__(self,config):
-        if config:
-            self.Address = config.get('Agent', 'Address')
-        else:
-            self.Address = os.environ.get('PP_ADDRESS')
diff --git a/collector-agent/PHPAgent/SpanFactory.py b/collector-agent/PHPAgent/SpanFactory.py
deleted file mode 100644
index d82c50065..000000000
--- a/collector-agent/PHPAgent/SpanFactory.py
+++ /dev/null
@@ -1,59 +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/6/19
-
-
-class SpanFactory(object):
-    def __init__(self,agent):
-        self.sequenceid = 0
-        self.agent = agent
-
-    def createSpan(self, stackMap):
-        raise NotImplemented
-
-    def createSpanEvent(self, stackMap):
-        raise NotImplemented
-
-    def attachSpanEvent(self, span, span_event):
-        raise NotImplemented
-
-    def makeSpan(self, stackMap):
-        self.sequenceid = 0
-        span = self.createSpan(stackMap)
-        if 'calls' in stackMap:
-            for called in stackMap['calls']:
-                self.makeSpanEv(span, called)
-        return span
-
-    def makeSpanEv(self, span, stackMap, depth=1):
-        span_ev = self.createSpanEvent(stackMap)
-        self.setSequenceid(span_ev, self.sequenceid)
-        self.sequenceid += 1
-        self.setDepth(span_ev, depth)
-        self.attachSpanEvent(span, span_ev)
-        if 'calls' in stackMap:
-            for called in stackMap['calls']:
-                self.makeSpanEv(span, called, depth + 1)
-
-    def setSequenceid(self, span_ev, id):
-        raise NotImplemented
-
-    def setDepth(self, span_ev, depth):
-        raise NotImplemented
\ No newline at end of file
diff --git a/collector-agent/PHPAgent/Type.py b/collector-agent/PHPAgent/Type.py
deleted file mode 100644
index 6a32ff326..000000000
--- a/collector-agent/PHPAgent/Type.py
+++ /dev/null
@@ -1,20 +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.
-# ------------------------------------------------------------------------------
-RESPONSE_AGENT_INFO = 0
diff --git a/collector-agent/PHPAgent/__init__.py b/collector-agent/PHPAgent/__init__.py
deleted file mode 100644
index 5d883f942..000000000
--- a/collector-agent/PHPAgent/__init__.py
+++ /dev/null
@@ -1,23 +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 PHPAgent.FrontAgent import FrontAgent
-from PHPAgent.PHPAgentConf import PHPAgentConf
-
-__all__=['FrontAgent', 'PHPAgentConf']
diff --git a/collector-agent/PinpointAgent/AppManagement.py b/collector-agent/PinpointAgent/AppManagement.py
deleted file mode 100644
index 58c6fa9b9..000000000
--- a/collector-agent/PinpointAgent/AppManagement.py
+++ /dev/null
@@ -1,96 +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 9/4/19
-import json
-
-from CollectorAgentConf.CollectorAgentConf import CollectorAgentConf
-from Common.Logger import TCLogger
-from PinpointAgent.PinpointAgent import PinpointAgent
-
-
-class AppManagement(object):
-    def __init__(self,collector_conf):
-        assert isinstance(collector_conf,CollectorAgentConf)
-        self.collector_conf = collector_conf
-        self.app_map = {}
-        self.default_app = None
-        self.recv_count = 0
-
-    def findApp(self, app_id, app_name, service_type):
-        if app_id in self.app_map:
-            app = self.app_map[app_id]
-            # ## check app_name
-            if app.app_name != app_name:
-                TCLogger.warning(" app_name can't change when working ")
-                return None
-            ## check service_type
-            else:
-                return app
-        else:
-            TCLogger.info("collector-agent try to create a new application agent.[%s@%s@%d]",app_id,app_name,service_type)
-            app = self.collector_conf.collector_implement(self.collector_conf, app_id, app_name,service_type)
-            app.start()
-            self.app_map[app_id] = app
-            return app
-
-    def stopAll(self):
-        for app_id,instance in self.app_map.items():
-            assert(isinstance(instance,PinpointAgent))
-            TCLogger.info("application is stopping [%s]",app_id)
-            instance.stop()
-        TCLogger.info("recieved %d span from font", self.recv_count)
-
-    def handleFrontAgentData(self, client, type, body):
-        content = body.decode('utf-8')
-        try:
-            TCLogger.debug(content)
-            stack = json.loads(content)
-        except Exception as e:
-            TCLogger.error("json is crash.[%s]",content)
-            return
-        if 'appid' not in stack:
-            TCLogger.warning(" drop %s, as no appid", content)
-            return
-        else:
-            appid = stack['appid']
-
-        if 'appname' not in stack:
-            TCLogger.warning(" drop %s, as no appname", content)
-            return
-        else:
-            appname = stack['appname']
-
-        if 'FT' not in stack:
-            TCLogger.warning(" drop %s, as no FT", content)
-            return
-        else:
-            ft = int(stack['FT'])
-
-        app = self.findApp(appid, appname, ft)
-        if app:
-            app.asynSendSpan(stack, body)
-            self.recv_count += 1
-
-    def tellMeWho(self):
-        return {
-            "time": str(self.collector_conf.startTimestamp),
-            "id": "no",
-            "name": "no"
-        }
diff --git a/collector-agent/PinpointAgent/PinpointAgent.py b/collector-agent/PinpointAgent/PinpointAgent.py
deleted file mode 100644
index 90eda7a75..000000000
--- a/collector-agent/PinpointAgent/PinpointAgent.py
+++ /dev/null
@@ -1,48 +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 CollectorAgent.ReqStat import ReqStat
-from PinpointAgent.Type import PHP
-
-
-class PinpointAgent(object):
-    def __init__(self,app_id,app_name,serviceType=PHP):
-        self.app_id =app_id
-        self.app_name = app_name
-        self.service_type = serviceType
-        self.req_stat = ReqStat()
-    def start(self):
-        raise NotImplementedError()
-
-    def asynSendSpan(self, stack, body):
-        raise NotImplementedError()
-
-
-    def sendSpan(self,stack,body):
-        exp =int(stack['E'])
-        self.req_stat.updateStat(exp)
-
-    def stop(self):
-        raise NotImplementedError()
-
-    def getReqStat(self):
-        return self.req_stat.getReqStat()
-    def getIntervalStat(self):
-        return self.req_stat.getInervalStat()
\ No newline at end of file
diff --git a/collector-agent/PinpointAgent/Type.py b/collector-agent/PinpointAgent/Type.py
deleted file mode 100644
index afd829174..000000000
--- a/collector-agent/PinpointAgent/Type.py
+++ /dev/null
@@ -1,165 +0,0 @@
-# encoding: 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.
-# ------------------------------------------------------------------------------
-
-APPLICATION_SEND = 1
-APPLICATION_TRACE_SEND = 2
-APPLICATION_TRACE_SEND_ACK = 3
-APPLICATION_REQUEST = 5
-APPLICATION_RESPONSE = 6
-APPLICATION_STREAM_CREATE = 10
-APPLICATION_STREAM_CREATE_SUCCESS = 12
-APPLICATION_STREAM_CREATE_FAIL = 14
-APPLICATION_STREAM_CLOSE = 15
-APPLICATION_STREAM_PING = 17
-APPLICATION_STREAM_PONG = 18
-APPLICATION_STREAM_RESPONSE = 20
-CONTROL_CLIENT_CLOSE = 100
-CONTROL_SERVER_CLOSE = 110
-CONTROL_HANDSHAKE = 150
-CONTROL_HANDSHAKE_RESPONSE = 151
-CONTROL_PING = 200
-CONTROL_PONG = 201
-UNKNOWN = 500
-HEADLESS = (1 << 16)
-
-API_UNDEFINED = -1
-API_DEFAULT = 0
-API_EXCEPTION = 1
-API_ANNOTATION = 2
-API_PARAMETER = 3
-API_WEB_REQUEST = 100
-API_INVOCATION = 200
-
-SIGNATURE = 0xef
-HEADER_VERSION = 0x10
-
-UNKNOWN_SERVICE = -1
-PHP = 1500
-PHP_METHOD_CALL = 1501
-PHP_REMOTE_METHOD = 9700
-HTTPD_SERVICE = 1931
-HTTPD_PROXY = 2923
-
-PYTHON = 1700
-PYTHON_METHOD_CALL=1701
-PYTHON_REMOTE_METHOD = 9900
-SQL_ID = 20
-UNKNOWN = -1
-SPAN = 40
-AGENT_INFO = 50
-AGENT_STAT = 55
-AGENT_STAT_BATCH = 56
-API_META_DATA = 310
-STRING_META_DATA = 330
-RESULT = 320
-TVERSION = 0
-PROXY_HTTP_HEADER = 300
-
-#collector type
-SUPPORT_GRPC=1
-SUPPORT_THRIFT=2
-
-
-##### Some setting for internal use
-## @eeliu interval 5 ->30
-STAT_INTERVAL = 30
-REQ_STAT_INTERVAL=1
-
-#####
-
-class AgentSocketCode(object):
-    NONE = 1
-    BEING_CONNECT = 2
-    CONNECTED = 3
-    CONNECT_FAILED = 6
-    IGNORE = 9
-    RUN_WITHOUT_HANDSHAKE = 10
-    RUN_SIMPLEX = 11
-    RUN_DUPLEX = 12
-    BEING_CLOSE_BY_CLIENT = 20
-    CLOSED_BY_CLIENT = 22
-    UNEXPECTED_CLOSE_BY_CLIENT = 26
-    BEING_CLOSE_BY_SERVER = 30
-    CLOSED_BY_SERVER = 32
-    UNEXPECTED_CLOSE_BY_SERVER = 36
-    ERROR_UNKNOWN = 40
-    ERROR_ILLEGAL_STATE_CHANGE = 41
-    ERROR_SYNC_STATE_SESSION = 42
-
-class ControlMessageProtocolConstant:
-    TYPE_CHARACTER_NULL = b'N'
-    TYPE_CHARACTER_BOOL_TRUE = b'T'
-    TYPE_CHARACTER_BOOL_FALSE = b'F'
-    TYPE_CHARACTER_INT = b'I'
-    TYPE_CHARACTER_LONG = b'L'
-    TYPE_CHARACTER_DOUBLE = b'D'
-    TYPE_CHARACTER_STRING = b'S'
-    CONTROL_CHARACTER_LIST_START = b'V'
-    CONTROL_CHARACTER_LIST_END = b'z'
-    CONTROL_CHARACTER_MAP_START = b'M'
-    CONTROL_CHARACTER_MAP_END = b'z'
-    def __init__(self):
-        pass
-
-class PacketType:
-    APPLICATION_SEND = 1
-    APPLICATION_TRACE_SEND = 2
-    APPLICATION_TRACE_SEND_ACK = 3
-    APPLICATION_REQUEST = 5
-    APPLICATION_RESPONSE = 6
-    APPLICATION_STREAM_CREATE = 10
-    APPLICATION_STREAM_CREATE_SUCCESS = 12
-    APPLICATION_STREAM_CREATE_FAIL = 14
-    APPLICATION_STREAM_CLOSE = 15
-    APPLICATION_STREAM_PING = 17
-    APPLICATION_STREAM_PONG = 18
-    APPLICATION_STREAM_RESPONSE = 20
-    CONTROL_CLIENT_CLOSE = 100
-    CONTROL_SERVER_CLOSE = 110
-    CONTROL_HANDSHAKE = 150
-    CONTROL_HANDSHAKE_RESPONSE = 151
-    CONTROL_PING = 200
-    CONTROL_PING_PAYLOAD = 211
-    CONTROL_PING_SIMPLE = 210
-    CONTROL_PONG = 201
-    UNKNOWN = 500
-    HEADLESS = (1 << 16)
-
-    PTypeBytesLayOut = {
-        # header_length |sub_header_length|body_len_offset|
-        APPLICATION_SEND: (4,0,4),
-        CONTROL_CLIENT_CLOSE: (4,0,4),
-        CONTROL_SERVER_CLOSE: (4,0,4),
-
-        APPLICATION_STREAM_CLOSE: (6,4,2),
-        APPLICATION_STREAM_CREATE_FAIL: (6, 4, 2),
-        APPLICATION_STREAM_CREATE_SUCCESS: (4,4,0),
-
-        APPLICATION_STREAM_PING: (8,4,4),
-        APPLICATION_STREAM_PONG: (8,4,4),
-
-        CONTROL_HANDSHAKE_RESPONSE: (8,4,4),
-        CONTROL_HANDSHAKE: (8,4,4),
-        APPLICATION_RESPONSE: (8,4,4),
-        APPLICATION_REQUEST: (8,4,4),
-        APPLICATION_STREAM_CREATE: (8,4,4),
-        APPLICATION_STREAM_RESPONSE: (8,4,4),
-        CONTROL_PING_SIMPLE:(0, 0, 0),
-        CONTROL_PONG:(0,0,0)
-    }
-
diff --git a/collector-agent/PinpointAgent/__init__.py b/collector-agent/PinpointAgent/__init__.py
deleted file mode 100644
index ecf2aed02..000000000
--- a/collector-agent/PinpointAgent/__init__.py
+++ /dev/null
@@ -1,47 +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 PHPAgent import PHPAgentConf, FrontAgent
-from PinpointAgent.AppManagement import AppManagement
-from CollectorAgentConf import config
-from Common.Config import CAConfig
-_app_management = AppManagement(config)
-_pac = PHPAgentConf(CAConfig)
-_agent = FrontAgent(_pac, _app_management.handleFrontAgentData)
-_agent.registerPHPAgentHello(_app_management.tellMeWho)
-
-
-def start_pinpoint_agent():
-    _agent.start()
-
-
-
-def stop_pinpoint_agent():
-    _app_management.stopAll()
-    _agent.stop()
-
-"""
-stop_front_agent: works on subprocess, free all front res before running
-"""
-def stop_front_agent():
-    _agent.stop()
-
-
-__all__=['start_pinpoint_agent', 'stop_pinpoint_agent', 'stop_front_agent']
\ No newline at end of file
diff --git a/collector-agent/Proto/Trift/Command.thrift b/collector-agent/Proto/Trift/Command.thrift
deleted file mode 100644
index ff05e20ce..000000000
--- a/collector-agent/Proto/Trift/Command.thrift
+++ /dev/null
@@ -1,108 +0,0 @@
-namespace java com.navercorp.pinpoint.thrift.dto.command
-
-enum TThreadDumpType {
-    TARGET,
-    PENDING
-}
-struct TCommandThreadDump {
-    1: TThreadDumpType   type = TThreadDumpType.TARGET
-	2: optional string	name
-	3: optional i64 pendingTimeMillis
-}
-
-enum TThreadState {
-	NEW,
-	RUNNABLE,
-	BLOCKED,
-	WAITING,
-	TIMED_WAITING,
-	TERMINATED
-}
-
-struct TMonitorInfo {
-	1: i32 		stackDepth
-	2: string 	stackFrame
-}
-
-struct TThreadDump {
-	1: string	threadName
-	2: i64 		threadId
-	3: i64 		blockedTime
-	4: i64 		blockedCount
-	5: i64 		waitedTime
-	6: i64 		waitedCount
-	7: string	lockName
-	8: i64 		lockOwnerId
-	9: string	lockOwnerName
-	10: bool 	inNative
-	11: bool 	suspended
-	12: TThreadState 	threadState
-    13: list<string>   	stackTrace
-    14: list<TMonitorInfo> lockedMonitors
-    15: list<string>	lockedSynchronizers
-}
-
-struct TCommandThreadDumpResponse {
-	1: list<TThreadDump> threadDumps
-}
-
-
-struct TCmdActiveThreadCount {
-}
-
-struct TCmdActiveThreadCountRes {
-	1: i32 	histogramSchemaType
-	2: list<i32> activeThreadCount
-	3: optional i64 timeStamp
-}
-
-
-struct TActiveThreadDump {
-	1: i64 execTime
-	2: TThreadDump threadDump
-}
-
-struct TCmdActiveThreadDump {
-	1: optional i64 execTime
-}
-
-struct TCmdActiveThreadDumpRes {
-	1: list<TActiveThreadDump> threadDumps
-}
-
-struct TCommandEcho {
-	1: string	message
-}
-
-enum TRouteResult {
-	OK = 0,
-
-	BAD_REQUEST = 200,
-	EMPTY_REQUEST = 201,
-	NOT_SUPPORTED_REQUEST = 202,
-
-	BAD_RESPONSE = 210,
-	EMPTY_RESPONSE = 211,
-	NOT_SUPPORTED_RESPONSE = 212,
-
-	TIMEOUT = 220,
-
-	NOT_FOUND = 230,
-
-	NOT_ACCEPTABLE = 240,
-	NOT_SUPPORTED_SERVICE = 241,
-
-	UNKNOWN = -1
-}
-
-struct TCommandTransfer {
-    1: string	applicationName
-    2: string 	agentId
-    3: optional i64		startTime
-    4: binary 	payload
-}
-struct TCommandTransferResponse {
-	1: TRouteResult routeResult
-	2: binary payload
-	3: optional string message
-}
\ No newline at end of file
diff --git a/collector-agent/Proto/Trift/Command/__init__.py b/collector-agent/Proto/Trift/Command/__init__.py
deleted file mode 100644
index adefd8e51..000000000
--- a/collector-agent/Proto/Trift/Command/__init__.py
+++ /dev/null
@@ -1,1 +0,0 @@
-__all__ = ['ttypes', 'constants']
diff --git a/collector-agent/Proto/Trift/Command/constants.py b/collector-agent/Proto/Trift/Command/constants.py
deleted file mode 100644
index 0c217ceda..000000000
--- a/collector-agent/Proto/Trift/Command/constants.py
+++ /dev/null
@@ -1,14 +0,0 @@
-#
-# Autogenerated by Thrift Compiler (0.11.0)
-#
-# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
-#
-#  options string: py
-#
-
-from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
-from thrift.protocol.TProtocol import TProtocolException
-from thrift.TRecursive import fix_spec
-
-import sys
-from .ttypes import *
diff --git a/collector-agent/Proto/Trift/Command/ttypes.py b/collector-agent/Proto/Trift/Command/ttypes.py
deleted file mode 100644
index 35d435e3e..000000000
--- a/collector-agent/Proto/Trift/Command/ttypes.py
+++ /dev/null
@@ -1,1171 +0,0 @@
-#
-# Autogenerated by Thrift Compiler (0.11.0)
-#
-# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
-#
-#  options string: py
-#
-
-from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
-from thrift.protocol.TProtocol import TProtocolException
-from thrift.TRecursive import fix_spec
-
-import sys
-
-from thrift.transport import TTransport
-all_structs = []
-
-
-class TThreadDumpType(object):
-    TARGET = 0
-    PENDING = 1
-
-    _VALUES_TO_NAMES = {
-        0: "TARGET",
-        1: "PENDING",
-    }
-
-    _NAMES_TO_VALUES = {
-        "TARGET": 0,
-        "PENDING": 1,
-    }
-
-
-class TThreadState(object):
-    NEW = 0
-    RUNNABLE = 1
-    BLOCKED = 2
-    WAITING = 3
-    TIMED_WAITING = 4
-    TERMINATED = 5
-
-    _VALUES_TO_NAMES = {
-        0: "NEW",
-        1: "RUNNABLE",
-        2: "BLOCKED",
-        3: "WAITING",
-        4: "TIMED_WAITING",
-        5: "TERMINATED",
-    }
-
-    _NAMES_TO_VALUES = {
-        "NEW": 0,
-        "RUNNABLE": 1,
-        "BLOCKED": 2,
-        "WAITING": 3,
-        "TIMED_WAITING": 4,
-        "TERMINATED": 5,
-    }
-
-
-class TRouteResult(object):
-    OK = 0
-    BAD_REQUEST = 200
-    EMPTY_REQUEST = 201
-    NOT_SUPPORTED_REQUEST = 202
-    BAD_RESPONSE = 210
-    EMPTY_RESPONSE = 211
-    NOT_SUPPORTED_RESPONSE = 212
-    TIMEOUT = 220
-    NOT_FOUND = 230
-    NOT_ACCEPTABLE = 240
-    NOT_SUPPORTED_SERVICE = 241
-    UNKNOWN = -1
-
-    _VALUES_TO_NAMES = {
-        0: "OK",
-        200: "BAD_REQUEST",
-        201: "EMPTY_REQUEST",
-        202: "NOT_SUPPORTED_REQUEST",
-        210: "BAD_RESPONSE",
-        211: "EMPTY_RESPONSE",
-        212: "NOT_SUPPORTED_RESPONSE",
-        220: "TIMEOUT",
-        230: "NOT_FOUND",
-        240: "NOT_ACCEPTABLE",
-        241: "NOT_SUPPORTED_SERVICE",
-        -1: "UNKNOWN",
-    }
-
-    _NAMES_TO_VALUES = {
-        "OK": 0,
-        "BAD_REQUEST": 200,
-        "EMPTY_REQUEST": 201,
-        "NOT_SUPPORTED_REQUEST": 202,
-        "BAD_RESPONSE": 210,
-        "EMPTY_RESPONSE": 211,
-        "NOT_SUPPORTED_RESPONSE": 212,
-        "TIMEOUT": 220,
-        "NOT_FOUND": 230,
-        "NOT_ACCEPTABLE": 240,
-        "NOT_SUPPORTED_SERVICE": 241,
-        "UNKNOWN": -1,
-    }
-
-
-class TCommandThreadDump(object):
-    """
-    Attributes:
-     - type
-     - name
-     - pendingTimeMillis
-    """
-
-
-    def __init__(self, type=0, name=None, pendingTimeMillis=None,):
-        self.type = type
-        self.name = name
-        self.pendingTimeMillis = pendingTimeMillis
-
-    def read(self, iprot):
-        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
-            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
-            return
-        iprot.readStructBegin()
-        while True:
-            (fname, ftype, fid) = iprot.readFieldBegin()
-            if ftype == TType.STOP:
-                break
-            if fid == 1:
-                if ftype == TType.I32:
-                    self.type = iprot.readI32()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 2:
-                if ftype == TType.STRING:
-                    self.name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 3:
-                if ftype == TType.I64:
-                    self.pendingTimeMillis = iprot.readI64()
-                else:
-                    iprot.skip(ftype)
-            else:
-                iprot.skip(ftype)
-            iprot.readFieldEnd()
-        iprot.readStructEnd()
-
-    def write(self, oprot):
-        if oprot._fast_encode is not None and self.thrift_spec is not None:
-            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
-            return
-        oprot.writeStructBegin('TCommandThreadDump')
-        if self.type is not None:
-            oprot.writeFieldBegin('type', TType.I32, 1)
-            oprot.writeI32(self.type)
-            oprot.writeFieldEnd()
-        if self.name is not None:
-            oprot.writeFieldBegin('name', TType.STRING, 2)
-            oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name)
-            oprot.writeFieldEnd()
-        if self.pendingTimeMillis is not None:
-            oprot.writeFieldBegin('pendingTimeMillis', TType.I64, 3)
-            oprot.writeI64(self.pendingTimeMillis)
-            oprot.writeFieldEnd()
-        oprot.writeFieldStop()
-        oprot.writeStructEnd()
-
-    def validate(self):
-        return
-
-    def __repr__(self):
-        L = ['%s=%r' % (key, value)
-             for key, value in self.__dict__.items()]
-        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-    def __eq__(self, other):
-        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-    def __ne__(self, other):
-        return not (self == other)
-
-
-class TMonitorInfo(object):
-    """
-    Attributes:
-     - stackDepth
-     - stackFrame
-    """
-
-
-    def __init__(self, stackDepth=None, stackFrame=None,):
-        self.stackDepth = stackDepth
-        self.stackFrame = stackFrame
-
-    def read(self, iprot):
-        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
-            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
-            return
-        iprot.readStructBegin()
-        while True:
-            (fname, ftype, fid) = iprot.readFieldBegin()
-            if ftype == TType.STOP:
-                break
-            if fid == 1:
-                if ftype == TType.I32:
-                    self.stackDepth = iprot.readI32()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 2:
-                if ftype == TType.STRING:
-                    self.stackFrame = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            else:
-                iprot.skip(ftype)
-            iprot.readFieldEnd()
-        iprot.readStructEnd()
-
-    def write(self, oprot):
-        if oprot._fast_encode is not None and self.thrift_spec is not None:
-            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
-            return
-        oprot.writeStructBegin('TMonitorInfo')
-        if self.stackDepth is not None:
-            oprot.writeFieldBegin('stackDepth', TType.I32, 1)
-            oprot.writeI32(self.stackDepth)
-            oprot.writeFieldEnd()
-        if self.stackFrame is not None:
-            oprot.writeFieldBegin('stackFrame', TType.STRING, 2)
-            oprot.writeString(self.stackFrame.encode('utf-8') if sys.version_info[0] == 2 else self.stackFrame)
-            oprot.writeFieldEnd()
-        oprot.writeFieldStop()
-        oprot.writeStructEnd()
-
-    def validate(self):
-        return
-
-    def __repr__(self):
-        L = ['%s=%r' % (key, value)
-             for key, value in self.__dict__.items()]
-        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-    def __eq__(self, other):
-        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-    def __ne__(self, other):
-        return not (self == other)
-
-
-class TThreadDump(object):
-    """
-    Attributes:
-     - threadName
-     - threadId
-     - blockedTime
-     - blockedCount
-     - waitedTime
-     - waitedCount
-     - lockName
-     - lockOwnerId
-     - lockOwnerName
-     - inNative
-     - suspended
-     - threadState
-     - stackTrace
-     - lockedMonitors
-     - lockedSynchronizers
-    """
-
-
-    def __init__(self, threadName=None, threadId=None, blockedTime=None, blockedCount=None, waitedTime=None, waitedCount=None, lockName=None, lockOwnerId=None, lockOwnerName=None, inNative=None, suspended=None, threadState=None, stackTrace=None, lockedMonitors=None, lockedSynchronizers=None,):
-        self.threadName = threadName
-        self.threadId = threadId
-        self.blockedTime = blockedTime
-        self.blockedCount = blockedCount
-        self.waitedTime = waitedTime
-        self.waitedCount = waitedCount
-        self.lockName = lockName
-        self.lockOwnerId = lockOwnerId
-        self.lockOwnerName = lockOwnerName
-        self.inNative = inNative
-        self.suspended = suspended
-        self.threadState = threadState
-        self.stackTrace = stackTrace
-        self.lockedMonitors = lockedMonitors
-        self.lockedSynchronizers = lockedSynchronizers
-
-    def read(self, iprot):
-        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
-            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
-            return
-        iprot.readStructBegin()
-        while True:
-            (fname, ftype, fid) = iprot.readFieldBegin()
-            if ftype == TType.STOP:
-                break
-            if fid == 1:
-                if ftype == TType.STRING:
-                    self.threadName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 2:
-                if ftype == TType.I64:
-                    self.threadId = iprot.readI64()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 3:
-                if ftype == TType.I64:
-                    self.blockedTime = iprot.readI64()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 4:
-                if ftype == TType.I64:
-                    self.blockedCount = iprot.readI64()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 5:
-                if ftype == TType.I64:
-                    self.waitedTime = iprot.readI64()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 6:
-                if ftype == TType.I64:
-                    self.waitedCount = iprot.readI64()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 7:
-                if ftype == TType.STRING:
-                    self.lockName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 8:
-                if ftype == TType.I64:
-                    self.lockOwnerId = iprot.readI64()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 9:
-                if ftype == TType.STRING:
-                    self.lockOwnerName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 10:
-                if ftype == TType.BOOL:
-                    self.inNative = iprot.readBool()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 11:
-                if ftype == TType.BOOL:
-                    self.suspended = iprot.readBool()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 12:
-                if ftype == TType.I32:
-                    self.threadState = iprot.readI32()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 13:
-                if ftype == TType.LIST:
-                    self.stackTrace = []
-                    (_etype3, _size0) = iprot.readListBegin()
-                    for _i4 in range(_size0):
-                        _elem5 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                        self.stackTrace.append(_elem5)
-                    iprot.readListEnd()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 14:
-                if ftype == TType.LIST:
-                    self.lockedMonitors = []
-                    (_etype9, _size6) = iprot.readListBegin()
-                    for _i10 in range(_size6):
-                        _elem11 = TMonitorInfo()
-                        _elem11.read(iprot)
-                        self.lockedMonitors.append(_elem11)
-                    iprot.readListEnd()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 15:
-                if ftype == TType.LIST:
-                    self.lockedSynchronizers = []
-                    (_etype15, _size12) = iprot.readListBegin()
-                    for _i16 in range(_size12):
-                        _elem17 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                        self.lockedSynchronizers.append(_elem17)
-                    iprot.readListEnd()
-                else:
-                    iprot.skip(ftype)
-            else:
-                iprot.skip(ftype)
-            iprot.readFieldEnd()
-        iprot.readStructEnd()
-
-    def write(self, oprot):
-        if oprot._fast_encode is not None and self.thrift_spec is not None:
-            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
-            return
-        oprot.writeStructBegin('TThreadDump')
-        if self.threadName is not None:
-            oprot.writeFieldBegin('threadName', TType.STRING, 1)
-            oprot.writeString(self.threadName.encode('utf-8') if sys.version_info[0] == 2 else self.threadName)
-            oprot.writeFieldEnd()
-        if self.threadId is not None:
-            oprot.writeFieldBegin('threadId', TType.I64, 2)
-            oprot.writeI64(self.threadId)
-            oprot.writeFieldEnd()
-        if self.blockedTime is not None:
-            oprot.writeFieldBegin('blockedTime', TType.I64, 3)
-            oprot.writeI64(self.blockedTime)
-            oprot.writeFieldEnd()
-        if self.blockedCount is not None:
-            oprot.writeFieldBegin('blockedCount', TType.I64, 4)
-            oprot.writeI64(self.blockedCount)
-            oprot.writeFieldEnd()
-        if self.waitedTime is not None:
-            oprot.writeFieldBegin('waitedTime', TType.I64, 5)
-            oprot.writeI64(self.waitedTime)
-            oprot.writeFieldEnd()
-        if self.waitedCount is not None:
-            oprot.writeFieldBegin('waitedCount', TType.I64, 6)
-            oprot.writeI64(self.waitedCount)
-            oprot.writeFieldEnd()
-        if self.lockName is not None:
-            oprot.writeFieldBegin('lockName', TType.STRING, 7)
-            oprot.writeString(self.lockName.encode('utf-8') if sys.version_info[0] == 2 else self.lockName)
-            oprot.writeFieldEnd()
-        if self.lockOwnerId is not None:
-            oprot.writeFieldBegin('lockOwnerId', TType.I64, 8)
-            oprot.writeI64(self.lockOwnerId)
-            oprot.writeFieldEnd()
-        if self.lockOwnerName is not None:
-            oprot.writeFieldBegin('lockOwnerName', TType.STRING, 9)
-            oprot.writeString(self.lockOwnerName.encode('utf-8') if sys.version_info[0] == 2 else self.lockOwnerName)
-            oprot.writeFieldEnd()
-        if self.inNative is not None:
-            oprot.writeFieldBegin('inNative', TType.BOOL, 10)
-            oprot.writeBool(self.inNative)
-            oprot.writeFieldEnd()
-        if self.suspended is not None:
-            oprot.writeFieldBegin('suspended', TType.BOOL, 11)
-            oprot.writeBool(self.suspended)
-            oprot.writeFieldEnd()
-        if self.threadState is not None:
-            oprot.writeFieldBegin('threadState', TType.I32, 12)
-            oprot.writeI32(self.threadState)
-            oprot.writeFieldEnd()
-        if self.stackTrace is not None:
-            oprot.writeFieldBegin('stackTrace', TType.LIST, 13)
-            oprot.writeListBegin(TType.STRING, len(self.stackTrace))
-            for iter18 in self.stackTrace:
-                oprot.writeString(iter18.encode('utf-8') if sys.version_info[0] == 2 else iter18)
-            oprot.writeListEnd()
-            oprot.writeFieldEnd()
-        if self.lockedMonitors is not None:
-            oprot.writeFieldBegin('lockedMonitors', TType.LIST, 14)
-            oprot.writeListBegin(TType.STRUCT, len(self.lockedMonitors))
-            for iter19 in self.lockedMonitors:
-                iter19.write(oprot)
-            oprot.writeListEnd()
-            oprot.writeFieldEnd()
-        if self.lockedSynchronizers is not None:
-            oprot.writeFieldBegin('lockedSynchronizers', TType.LIST, 15)
-            oprot.writeListBegin(TType.STRING, len(self.lockedSynchronizers))
-            for iter20 in self.lockedSynchronizers:
-                oprot.writeString(iter20.encode('utf-8') if sys.version_info[0] == 2 else iter20)
-            oprot.writeListEnd()
-            oprot.writeFieldEnd()
-        oprot.writeFieldStop()
-        oprot.writeStructEnd()
-
-    def validate(self):
-        return
-
-    def __repr__(self):
-        L = ['%s=%r' % (key, value)
-             for key, value in self.__dict__.items()]
-        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-    def __eq__(self, other):
-        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-    def __ne__(self, other):
-        return not (self == other)
-
-
-class TCommandThreadDumpResponse(object):
-    """
-    Attributes:
-     - threadDumps
-    """
-
-
-    def __init__(self, threadDumps=None,):
-        self.threadDumps = threadDumps
-
-    def read(self, iprot):
-        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
-            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
-            return
-        iprot.readStructBegin()
-        while True:
-            (fname, ftype, fid) = iprot.readFieldBegin()
-            if ftype == TType.STOP:
-                break
-            if fid == 1:
-                if ftype == TType.LIST:
-                    self.threadDumps = []
-                    (_etype24, _size21) = iprot.readListBegin()
-                    for _i25 in range(_size21):
-                        _elem26 = TThreadDump()
-                        _elem26.read(iprot)
-                        self.threadDumps.append(_elem26)
-                    iprot.readListEnd()
-                else:
-                    iprot.skip(ftype)
-            else:
-                iprot.skip(ftype)
-            iprot.readFieldEnd()
-        iprot.readStructEnd()
-
-    def write(self, oprot):
-        if oprot._fast_encode is not None and self.thrift_spec is not None:
-            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
-            return
-        oprot.writeStructBegin('TCommandThreadDumpResponse')
-        if self.threadDumps is not None:
-            oprot.writeFieldBegin('threadDumps', TType.LIST, 1)
-            oprot.writeListBegin(TType.STRUCT, len(self.threadDumps))
-            for iter27 in self.threadDumps:
-                iter27.write(oprot)
-            oprot.writeListEnd()
-            oprot.writeFieldEnd()
-        oprot.writeFieldStop()
-        oprot.writeStructEnd()
-
-    def validate(self):
-        return
-
-    def __repr__(self):
-        L = ['%s=%r' % (key, value)
-             for key, value in self.__dict__.items()]
-        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-    def __eq__(self, other):
-        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-    def __ne__(self, other):
-        return not (self == other)
-
-
-class TCmdActiveThreadCount(object):
-
-
-    def read(self, iprot):
-        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
-            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
-            return
-        iprot.readStructBegin()
-        while True:
-            (fname, ftype, fid) = iprot.readFieldBegin()
-            if ftype == TType.STOP:
-                break
-            else:
-                iprot.skip(ftype)
-            iprot.readFieldEnd()
-        iprot.readStructEnd()
-
-    def write(self, oprot):
-        if oprot._fast_encode is not None and self.thrift_spec is not None:
-            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
-            return
-        oprot.writeStructBegin('TCmdActiveThreadCount')
-        oprot.writeFieldStop()
-        oprot.writeStructEnd()
-
-    def validate(self):
-        return
-
-    def __repr__(self):
-        L = ['%s=%r' % (key, value)
-             for key, value in self.__dict__.items()]
-        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-    def __eq__(self, other):
-        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-    def __ne__(self, other):
-        return not (self == other)
-
-
-class TCmdActiveThreadCountRes(object):
-    """
-    Attributes:
-     - histogramSchemaType
-     - activeThreadCount
-     - timeStamp
-    """
-
-
-    def __init__(self, histogramSchemaType=None, activeThreadCount=None, timeStamp=None,):
-        self.histogramSchemaType = histogramSchemaType
-        self.activeThreadCount = activeThreadCount
-        self.timeStamp = timeStamp
-
-    def read(self, iprot):
-        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
-            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
-            return
-        iprot.readStructBegin()
-        while True:
-            (fname, ftype, fid) = iprot.readFieldBegin()
-            if ftype == TType.STOP:
-                break
-            if fid == 1:
-                if ftype == TType.I32:
-                    self.histogramSchemaType = iprot.readI32()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 2:
-                if ftype == TType.LIST:
-                    self.activeThreadCount = []
-                    (_etype31, _size28) = iprot.readListBegin()
-                    for _i32 in range(_size28):
-                        _elem33 = iprot.readI32()
-                        self.activeThreadCount.append(_elem33)
-                    iprot.readListEnd()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 3:
-                if ftype == TType.I64:
-                    self.timeStamp = iprot.readI64()
-                else:
-                    iprot.skip(ftype)
-            else:
-                iprot.skip(ftype)
-            iprot.readFieldEnd()
-        iprot.readStructEnd()
-
-    def write(self, oprot):
-        if oprot._fast_encode is not None and self.thrift_spec is not None:
-            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
-            return
-        oprot.writeStructBegin('TCmdActiveThreadCountRes')
-        if self.histogramSchemaType is not None:
-            oprot.writeFieldBegin('histogramSchemaType', TType.I32, 1)
-            oprot.writeI32(self.histogramSchemaType)
-            oprot.writeFieldEnd()
-        if self.activeThreadCount is not None:
-            oprot.writeFieldBegin('activeThreadCount', TType.LIST, 2)
-            oprot.writeListBegin(TType.I32, len(self.activeThreadCount))
-            for iter34 in self.activeThreadCount:
-                oprot.writeI32(iter34)
-            oprot.writeListEnd()
-            oprot.writeFieldEnd()
-        if self.timeStamp is not None:
-            oprot.writeFieldBegin('timeStamp', TType.I64, 3)
-            oprot.writeI64(self.timeStamp)
-            oprot.writeFieldEnd()
-        oprot.writeFieldStop()
-        oprot.writeStructEnd()
-
-    def validate(self):
-        return
-
-    def __repr__(self):
-        L = ['%s=%r' % (key, value)
-             for key, value in self.__dict__.items()]
-        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-    def __eq__(self, other):
-        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-    def __ne__(self, other):
-        return not (self == other)
-
-
-class TActiveThreadDump(object):
-    """
-    Attributes:
-     - execTime
-     - threadDump
-    """
-
-
-    def __init__(self, execTime=None, threadDump=None,):
-        self.execTime = execTime
-        self.threadDump = threadDump
-
-    def read(self, iprot):
-        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
-            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
-            return
-        iprot.readStructBegin()
-        while True:
-            (fname, ftype, fid) = iprot.readFieldBegin()
-            if ftype == TType.STOP:
-                break
-            if fid == 1:
-                if ftype == TType.I64:
-                    self.execTime = iprot.readI64()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 2:
-                if ftype == TType.STRUCT:
-                    self.threadDump = TThreadDump()
-                    self.threadDump.read(iprot)
-                else:
-                    iprot.skip(ftype)
-            else:
-                iprot.skip(ftype)
-            iprot.readFieldEnd()
-        iprot.readStructEnd()
-
-    def write(self, oprot):
-        if oprot._fast_encode is not None and self.thrift_spec is not None:
-            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
-            return
-        oprot.writeStructBegin('TActiveThreadDump')
-        if self.execTime is not None:
-            oprot.writeFieldBegin('execTime', TType.I64, 1)
-            oprot.writeI64(self.execTime)
-            oprot.writeFieldEnd()
-        if self.threadDump is not None:
-            oprot.writeFieldBegin('threadDump', TType.STRUCT, 2)
-            self.threadDump.write(oprot)
-            oprot.writeFieldEnd()
-        oprot.writeFieldStop()
-        oprot.writeStructEnd()
-
-    def validate(self):
-        return
-
-    def __repr__(self):
-        L = ['%s=%r' % (key, value)
-             for key, value in self.__dict__.items()]
-        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-    def __eq__(self, other):
-        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-    def __ne__(self, other):
-        return not (self == other)
-
-
-class TCmdActiveThreadDump(object):
-    """
-    Attributes:
-     - execTime
-    """
-
-
-    def __init__(self, execTime=None,):
-        self.execTime = execTime
-
-    def read(self, iprot):
-        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
-            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
-            return
-        iprot.readStructBegin()
-        while True:
-            (fname, ftype, fid) = iprot.readFieldBegin()
-            if ftype == TType.STOP:
-                break
-            if fid == 1:
-                if ftype == TType.I64:
-                    self.execTime = iprot.readI64()
-                else:
-                    iprot.skip(ftype)
-            else:
-                iprot.skip(ftype)
-            iprot.readFieldEnd()
-        iprot.readStructEnd()
-
-    def write(self, oprot):
-        if oprot._fast_encode is not None and self.thrift_spec is not None:
-            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
-            return
-        oprot.writeStructBegin('TCmdActiveThreadDump')
-        if self.execTime is not None:
-            oprot.writeFieldBegin('execTime', TType.I64, 1)
-            oprot.writeI64(self.execTime)
-            oprot.writeFieldEnd()
-        oprot.writeFieldStop()
-        oprot.writeStructEnd()
-
-    def validate(self):
-        return
-
-    def __repr__(self):
-        L = ['%s=%r' % (key, value)
-             for key, value in self.__dict__.items()]
-        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-    def __eq__(self, other):
-        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-    def __ne__(self, other):
-        return not (self == other)
-
-
-class TCmdActiveThreadDumpRes(object):
-    """
-    Attributes:
-     - threadDumps
-    """
-
-
-    def __init__(self, threadDumps=None,):
-        self.threadDumps = threadDumps
-
-    def read(self, iprot):
-        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
-            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
-            return
-        iprot.readStructBegin()
-        while True:
-            (fname, ftype, fid) = iprot.readFieldBegin()
-            if ftype == TType.STOP:
-                break
-            if fid == 1:
-                if ftype == TType.LIST:
-                    self.threadDumps = []
-                    (_etype38, _size35) = iprot.readListBegin()
-                    for _i39 in range(_size35):
-                        _elem40 = TActiveThreadDump()
-                        _elem40.read(iprot)
-                        self.threadDumps.append(_elem40)
-                    iprot.readListEnd()
-                else:
-                    iprot.skip(ftype)
-            else:
-                iprot.skip(ftype)
-            iprot.readFieldEnd()
-        iprot.readStructEnd()
-
-    def write(self, oprot):
-        if oprot._fast_encode is not None and self.thrift_spec is not None:
-            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
-            return
-        oprot.writeStructBegin('TCmdActiveThreadDumpRes')
-        if self.threadDumps is not None:
-            oprot.writeFieldBegin('threadDumps', TType.LIST, 1)
-            oprot.writeListBegin(TType.STRUCT, len(self.threadDumps))
-            for iter41 in self.threadDumps:
-                iter41.write(oprot)
-            oprot.writeListEnd()
-            oprot.writeFieldEnd()
-        oprot.writeFieldStop()
-        oprot.writeStructEnd()
-
-    def validate(self):
-        return
-
-    def __repr__(self):
-        L = ['%s=%r' % (key, value)
-             for key, value in self.__dict__.items()]
-        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-    def __eq__(self, other):
-        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-    def __ne__(self, other):
-        return not (self == other)
-
-
-class TCommandEcho(object):
-    """
-    Attributes:
-     - message
-    """
-
-
-    def __init__(self, message=None,):
-        self.message = message
-
-    def read(self, iprot):
-        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
-            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
-            return
-        iprot.readStructBegin()
-        while True:
-            (fname, ftype, fid) = iprot.readFieldBegin()
-            if ftype == TType.STOP:
-                break
-            if fid == 1:
-                if ftype == TType.STRING:
-                    self.message = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            else:
-                iprot.skip(ftype)
-            iprot.readFieldEnd()
-        iprot.readStructEnd()
-
-    def write(self, oprot):
-        if oprot._fast_encode is not None and self.thrift_spec is not None:
-            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
-            return
-        oprot.writeStructBegin('TCommandEcho')
-        if self.message is not None:
-            oprot.writeFieldBegin('message', TType.STRING, 1)
-            oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message)
-            oprot.writeFieldEnd()
-        oprot.writeFieldStop()
-        oprot.writeStructEnd()
-
-    def validate(self):
-        return
-
-    def __repr__(self):
-        L = ['%s=%r' % (key, value)
-             for key, value in self.__dict__.items()]
-        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-    def __eq__(self, other):
-        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-    def __ne__(self, other):
-        return not (self == other)
-
-
-class TCommandTransfer(object):
-    """
-    Attributes:
-     - applicationName
-     - agentId
-     - startTime
-     - payload
-    """
-
-
-    def __init__(self, applicationName=None, agentId=None, startTime=None, payload=None,):
-        self.applicationName = applicationName
-        self.agentId = agentId
-        self.startTime = startTime
-        self.payload = payload
-
-    def read(self, iprot):
-        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
-            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
-            return
-        iprot.readStructBegin()
-        while True:
-            (fname, ftype, fid) = iprot.readFieldBegin()
-            if ftype == TType.STOP:
-                break
-            if fid == 1:
-                if ftype == TType.STRING:
-                    self.applicationName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 2:
-                if ftype == TType.STRING:
-                    self.agentId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 3:
-                if ftype == TType.I64:
-                    self.startTime = iprot.readI64()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 4:
-                if ftype == TType.STRING:
-                    self.payload = iprot.readBinary()
-                else:
-                    iprot.skip(ftype)
-            else:
-                iprot.skip(ftype)
-            iprot.readFieldEnd()
-        iprot.readStructEnd()
-
-    def write(self, oprot):
-        if oprot._fast_encode is not None and self.thrift_spec is not None:
-            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
-            return
-        oprot.writeStructBegin('TCommandTransfer')
-        if self.applicationName is not None:
-            oprot.writeFieldBegin('applicationName', TType.STRING, 1)
-            oprot.writeString(self.applicationName.encode('utf-8') if sys.version_info[0] == 2 else self.applicationName)
-            oprot.writeFieldEnd()
-        if self.agentId is not None:
-            oprot.writeFieldBegin('agentId', TType.STRING, 2)
-            oprot.writeString(self.agentId.encode('utf-8') if sys.version_info[0] == 2 else self.agentId)
-            oprot.writeFieldEnd()
-        if self.startTime is not None:
-            oprot.writeFieldBegin('startTime', TType.I64, 3)
-            oprot.writeI64(self.startTime)
-            oprot.writeFieldEnd()
-        if self.payload is not None:
-            oprot.writeFieldBegin('payload', TType.STRING, 4)
-            oprot.writeBinary(self.payload)
-            oprot.writeFieldEnd()
-        oprot.writeFieldStop()
-        oprot.writeStructEnd()
-
-    def validate(self):
-        return
-
-    def __repr__(self):
-        L = ['%s=%r' % (key, value)
-             for key, value in self.__dict__.items()]
-        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-    def __eq__(self, other):
-        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-    def __ne__(self, other):
-        return not (self == other)
-
-
-class TCommandTransferResponse(object):
-    """
-    Attributes:
-     - routeResult
-     - payload
-     - message
-    """
-
-
-    def __init__(self, routeResult=None, payload=None, message=None,):
-        self.routeResult = routeResult
-        self.payload = payload
-        self.message = message
-
-    def read(self, iprot):
-        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
-            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
-            return
-        iprot.readStructBegin()
-        while True:
-            (fname, ftype, fid) = iprot.readFieldBegin()
-            if ftype == TType.STOP:
-                break
-            if fid == 1:
-                if ftype == TType.I32:
-                    self.routeResult = iprot.readI32()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 2:
-                if ftype == TType.STRING:
-                    self.payload = iprot.readBinary()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 3:
-                if ftype == TType.STRING:
-                    self.message = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            else:
-                iprot.skip(ftype)
-            iprot.readFieldEnd()
-        iprot.readStructEnd()
-
-    def write(self, oprot):
-        if oprot._fast_encode is not None and self.thrift_spec is not None:
-            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
-            return
-        oprot.writeStructBegin('TCommandTransferResponse')
-        if self.routeResult is not None:
-            oprot.writeFieldBegin('routeResult', TType.I32, 1)
-            oprot.writeI32(self.routeResult)
-            oprot.writeFieldEnd()
-        if self.payload is not None:
-            oprot.writeFieldBegin('payload', TType.STRING, 2)
-            oprot.writeBinary(self.payload)
-            oprot.writeFieldEnd()
-        if self.message is not None:
-            oprot.writeFieldBegin('message', TType.STRING, 3)
-            oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message)
-            oprot.writeFieldEnd()
-        oprot.writeFieldStop()
-        oprot.writeStructEnd()
-
-    def validate(self):
-        return
-
-    def __repr__(self):
-        L = ['%s=%r' % (key, value)
-             for key, value in self.__dict__.items()]
-        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-    def __eq__(self, other):
-        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-    def __ne__(self, other):
-        return not (self == other)
-all_structs.append(TCommandThreadDump)
-TCommandThreadDump.thrift_spec = (
-    None,  # 0
-    (1, TType.I32, 'type', None, 0, ),  # 1
-    (2, TType.STRING, 'name', 'UTF8', None, ),  # 2
-    (3, TType.I64, 'pendingTimeMillis', None, None, ),  # 3
-)
-all_structs.append(TMonitorInfo)
-TMonitorInfo.thrift_spec = (
-    None,  # 0
-    (1, TType.I32, 'stackDepth', None, None, ),  # 1
-    (2, TType.STRING, 'stackFrame', 'UTF8', None, ),  # 2
-)
-all_structs.append(TThreadDump)
-TThreadDump.thrift_spec = (
-    None,  # 0
-    (1, TType.STRING, 'threadName', 'UTF8', None, ),  # 1
-    (2, TType.I64, 'threadId', None, None, ),  # 2
-    (3, TType.I64, 'blockedTime', None, None, ),  # 3
-    (4, TType.I64, 'blockedCount', None, None, ),  # 4
-    (5, TType.I64, 'waitedTime', None, None, ),  # 5
-    (6, TType.I64, 'waitedCount', None, None, ),  # 6
-    (7, TType.STRING, 'lockName', 'UTF8', None, ),  # 7
-    (8, TType.I64, 'lockOwnerId', None, None, ),  # 8
-    (9, TType.STRING, 'lockOwnerName', 'UTF8', None, ),  # 9
-    (10, TType.BOOL, 'inNative', None, None, ),  # 10
-    (11, TType.BOOL, 'suspended', None, None, ),  # 11
-    (12, TType.I32, 'threadState', None, None, ),  # 12
-    (13, TType.LIST, 'stackTrace', (TType.STRING, 'UTF8', False), None, ),  # 13
-    (14, TType.LIST, 'lockedMonitors', (TType.STRUCT, [TMonitorInfo, None], False), None, ),  # 14
-    (15, TType.LIST, 'lockedSynchronizers', (TType.STRING, 'UTF8', False), None, ),  # 15
-)
-all_structs.append(TCommandThreadDumpResponse)
-TCommandThreadDumpResponse.thrift_spec = (
-    None,  # 0
-    (1, TType.LIST, 'threadDumps', (TType.STRUCT, [TThreadDump, None], False), None, ),  # 1
-)
-all_structs.append(TCmdActiveThreadCount)
-TCmdActiveThreadCount.thrift_spec = (
-)
-all_structs.append(TCmdActiveThreadCountRes)
-TCmdActiveThreadCountRes.thrift_spec = (
-    None,  # 0
-    (1, TType.I32, 'histogramSchemaType', None, None, ),  # 1
-    (2, TType.LIST, 'activeThreadCount', (TType.I32, None, False), None, ),  # 2
-    (3, TType.I64, 'timeStamp', None, None, ),  # 3
-)
-all_structs.append(TActiveThreadDump)
-TActiveThreadDump.thrift_spec = (
-    None,  # 0
-    (1, TType.I64, 'execTime', None, None, ),  # 1
-    (2, TType.STRUCT, 'threadDump', [TThreadDump, None], None, ),  # 2
-)
-all_structs.append(TCmdActiveThreadDump)
-TCmdActiveThreadDump.thrift_spec = (
-    None,  # 0
-    (1, TType.I64, 'execTime', None, None, ),  # 1
-)
-all_structs.append(TCmdActiveThreadDumpRes)
-TCmdActiveThreadDumpRes.thrift_spec = (
-    None,  # 0
-    (1, TType.LIST, 'threadDumps', (TType.STRUCT, [TActiveThreadDump, None], False), None, ),  # 1
-)
-all_structs.append(TCommandEcho)
-TCommandEcho.thrift_spec = (
-    None,  # 0
-    (1, TType.STRING, 'message', 'UTF8', None, ),  # 1
-)
-all_structs.append(TCommandTransfer)
-TCommandTransfer.thrift_spec = (
-    None,  # 0
-    (1, TType.STRING, 'applicationName', 'UTF8', None, ),  # 1
-    (2, TType.STRING, 'agentId', 'UTF8', None, ),  # 2
-    (3, TType.I64, 'startTime', None, None, ),  # 3
-    (4, TType.STRING, 'payload', 'BINARY', None, ),  # 4
-)
-all_structs.append(TCommandTransferResponse)
-TCommandTransferResponse.thrift_spec = (
-    None,  # 0
-    (1, TType.I32, 'routeResult', None, None, ),  # 1
-    (2, TType.STRING, 'payload', 'BINARY', None, ),  # 2
-    (3, TType.STRING, 'message', 'UTF8', None, ),  # 3
-)
-fix_spec(all_structs)
-del all_structs
diff --git a/collector-agent/Proto/Trift/Pinpoint.thrift b/collector-agent/Proto/Trift/Pinpoint.thrift
deleted file mode 100644
index 9d8b52351..000000000
--- a/collector-agent/Proto/Trift/Pinpoint.thrift
+++ /dev/null
@@ -1,112 +0,0 @@
-namespace java com.navercorp.pinpoint.thrift.dto
-
-enum TJvmGcType {
-    UNKNOWN,
-    SERIAL,
-    PARALLEL,
-    CMS,
-    G1
-}
-
-struct TServiceInfo {
-    1: optional string          serviceName
-    2: optional list<string>    serviceLibs
-}
-
-struct TServerMetaData {
-    1: optional string              serverInfo
-    2: optional list<string>        vmArgs
-    10: optional list<TServiceInfo>  serviceInfos
-}
-
-struct TJvmInfo {
-    1:          i16         version = 0
-    2: optional string      vmVersion
-    3: optional TJvmGcType  gcType = TJvmGcType.UNKNOWN
-}
-
-struct TAgentInfo {
-	1: string	hostname
-	2: string	ip
-	3: string	ports
-	4: string	agentId
-	5: string	applicationName
-	6: i16	    serviceType
-	7: i32      pid
-	8: string   agentVersion;
-	9: string   vmVersion;
-
-	10: i64	    startTimestamp
-
-	11: optional i64     endTimestamp
-	12: optional i32     endStatus
-	
-	20: optional TServerMetaData   serverMetaData
-
-	30: optional TJvmInfo   jvmInfo
-}
-
-
-struct TJvmGcDetailed {
-    1: optional i64 jvmGcNewCount
-    2: optional i64 jvmGcNewTime
-    3: optional double jvmPoolCodeCacheUsed
-    4: optional double jvmPoolNewGenUsed
-    5: optional double jvmPoolOldGenUsed
-    6: optional double jvmPoolSurvivorSpaceUsed
-    7: optional double jvmPoolPermGenUsed
-    8: optional double jvmPoolMetaspaceUsed
-}
-
-struct TJvmGc {
-    1: TJvmGcType   type = TJvmGcType.UNKNOWN
-    2: i64          jvmMemoryHeapUsed
-    3: i64          jvmMemoryHeapMax
-    4: i64          jvmMemoryNonHeapUsed
-    5: i64          jvmMemoryNonHeapMax
-    6: i64          jvmGcOldCount
-    7: i64          jvmGcOldTime
-    8: optional TJvmGcDetailed    jvmGcDetailed
-
-}
-
-
-struct TCpuLoad {
-    1: optional double       jvmCpuLoad
-    2: optional double       systemCpuLoad
-}
-
-struct TTransaction {
-    2: optional i64     sampledNewCount
-    3: optional i64     sampledContinuationCount
-    4: optional i64     unsampledNewCount
-    5: optional i64     unsampledContinuationCount
-}
-
-struct TActiveTraceHistogram {
-    1:          i16         version = 0
-	2: optional i32         histogramSchemaType
-	3: optional list<i32>   activeTraceCount
-}
-
-struct TActiveTrace {
-	1: optional TActiveTraceHistogram   histogram
-}
-
-struct TAgentStat {
-    1: optional string      agentId
-    2: optional i64         startTimestamp
-    3: optional i64         timestamp
-    4: optional i64         collectInterval
-    10: optional TJvmGc     gc
-    20: optional TCpuLoad   cpuLoad
-    30: optional TTransaction   transaction
-    40: optional TActiveTrace   activeTrace
-    200: optional string    metadata    
-}
-
-struct TAgentStatBatch {
-    1: string                   agentId
-    2: i64                      startTimestamp
-    10: list<TAgentStat>        agentStats
-}
diff --git a/collector-agent/Proto/Trift/Pinpoint/__init__.py b/collector-agent/Proto/Trift/Pinpoint/__init__.py
deleted file mode 100644
index adefd8e51..000000000
--- a/collector-agent/Proto/Trift/Pinpoint/__init__.py
+++ /dev/null
@@ -1,1 +0,0 @@
-__all__ = ['ttypes', 'constants']
diff --git a/collector-agent/Proto/Trift/Pinpoint/constants.py b/collector-agent/Proto/Trift/Pinpoint/constants.py
deleted file mode 100644
index 0c217ceda..000000000
--- a/collector-agent/Proto/Trift/Pinpoint/constants.py
+++ /dev/null
@@ -1,14 +0,0 @@
-#
-# Autogenerated by Thrift Compiler (0.11.0)
-#
-# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
-#
-#  options string: py
-#
-
-from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
-from thrift.protocol.TProtocol import TProtocolException
-from thrift.TRecursive import fix_spec
-
-import sys
-from .ttypes import *
diff --git a/collector-agent/Proto/Trift/Pinpoint/ttypes.py b/collector-agent/Proto/Trift/Pinpoint/ttypes.py
deleted file mode 100644
index cc24d08cc..000000000
--- a/collector-agent/Proto/Trift/Pinpoint/ttypes.py
+++ /dev/null
@@ -1,1622 +0,0 @@
-#
-# Autogenerated by Thrift Compiler (0.11.0)
-#
-# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
-#
-#  options string: py
-#
-
-from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
-from thrift.protocol.TProtocol import TProtocolException
-from thrift.TRecursive import fix_spec
-
-import sys
-
-from thrift.transport import TTransport
-all_structs = []
-
-
-class TJvmGcType(object):
-    UNKNOWN = 0
-    SERIAL = 1
-    PARALLEL = 2
-    CMS = 3
-    G1 = 4
-
-    _VALUES_TO_NAMES = {
-        0: "UNKNOWN",
-        1: "SERIAL",
-        2: "PARALLEL",
-        3: "CMS",
-        4: "G1",
-    }
-
-    _NAMES_TO_VALUES = {
-        "UNKNOWN": 0,
-        "SERIAL": 1,
-        "PARALLEL": 2,
-        "CMS": 3,
-        "G1": 4,
-    }
-
-
-class TServiceInfo(object):
-    """
-    Attributes:
-     - serviceName
-     - serviceLibs
-    """
-
-
-    def __init__(self, serviceName=None, serviceLibs=None,):
-        self.serviceName = serviceName
-        self.serviceLibs = serviceLibs
-
-    def read(self, iprot):
-        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
-            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
-            return
-        iprot.readStructBegin()
-        while True:
-            (fname, ftype, fid) = iprot.readFieldBegin()
-            if ftype == TType.STOP:
-                break
-            if fid == 1:
-                if ftype == TType.STRING:
-                    self.serviceName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 2:
-                if ftype == TType.LIST:
-                    self.serviceLibs = []
-                    (_etype3, _size0) = iprot.readListBegin()
-                    for _i4 in range(_size0):
-                        _elem5 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                        self.serviceLibs.append(_elem5)
-                    iprot.readListEnd()
-                else:
-                    iprot.skip(ftype)
-            else:
-                iprot.skip(ftype)
-            iprot.readFieldEnd()
-        iprot.readStructEnd()
-
-    def write(self, oprot):
-        if oprot._fast_encode is not None and self.thrift_spec is not None:
-            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
-            return
-        oprot.writeStructBegin('TServiceInfo')
-        if self.serviceName is not None:
-            oprot.writeFieldBegin('serviceName', TType.STRING, 1)
-            oprot.writeString(self.serviceName.encode('utf-8') if sys.version_info[0] == 2 else self.serviceName)
-            oprot.writeFieldEnd()
-        if self.serviceLibs is not None:
-            oprot.writeFieldBegin('serviceLibs', TType.LIST, 2)
-            oprot.writeListBegin(TType.STRING, len(self.serviceLibs))
-            for iter6 in self.serviceLibs:
-                oprot.writeString(iter6.encode('utf-8') if sys.version_info[0] == 2 else iter6)
-            oprot.writeListEnd()
-            oprot.writeFieldEnd()
-        oprot.writeFieldStop()
-        oprot.writeStructEnd()
-
-    def validate(self):
-        return
-
-    def __repr__(self):
-        L = ['%s=%r' % (key, value)
-             for key, value in self.__dict__.items()]
-        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-    def __eq__(self, other):
-        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-    def __ne__(self, other):
-        return not (self == other)
-
-
-class TServerMetaData(object):
-    """
-    Attributes:
-     - serverInfo
-     - vmArgs
-     - serviceInfos
-    """
-
-
-    def __init__(self, serverInfo=None, vmArgs=None, serviceInfos=None,):
-        self.serverInfo = serverInfo
-        self.vmArgs = vmArgs
-        self.serviceInfos = serviceInfos
-
-    def read(self, iprot):
-        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
-            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
-            return
-        iprot.readStructBegin()
-        while True:
-            (fname, ftype, fid) = iprot.readFieldBegin()
-            if ftype == TType.STOP:
-                break
-            if fid == 1:
-                if ftype == TType.STRING:
-                    self.serverInfo = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 2:
-                if ftype == TType.LIST:
-                    self.vmArgs = []
-                    (_etype10, _size7) = iprot.readListBegin()
-                    for _i11 in range(_size7):
-                        _elem12 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                        self.vmArgs.append(_elem12)
-                    iprot.readListEnd()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 10:
-                if ftype == TType.LIST:
-                    self.serviceInfos = []
-                    (_etype16, _size13) = iprot.readListBegin()
-                    for _i17 in range(_size13):
-                        _elem18 = TServiceInfo()
-                        _elem18.read(iprot)
-                        self.serviceInfos.append(_elem18)
-                    iprot.readListEnd()
-                else:
-                    iprot.skip(ftype)
-            else:
-                iprot.skip(ftype)
-            iprot.readFieldEnd()
-        iprot.readStructEnd()
-
-    def write(self, oprot):
-        if oprot._fast_encode is not None and self.thrift_spec is not None:
-            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
-            return
-        oprot.writeStructBegin('TServerMetaData')
-        if self.serverInfo is not None:
-            oprot.writeFieldBegin('serverInfo', TType.STRING, 1)
-            oprot.writeString(self.serverInfo.encode('utf-8') if sys.version_info[0] == 2 else self.serverInfo)
-            oprot.writeFieldEnd()
-        if self.vmArgs is not None:
-            oprot.writeFieldBegin('vmArgs', TType.LIST, 2)
-            oprot.writeListBegin(TType.STRING, len(self.vmArgs))
-            for iter19 in self.vmArgs:
-                oprot.writeString(iter19.encode('utf-8') if sys.version_info[0] == 2 else iter19)
-            oprot.writeListEnd()
-            oprot.writeFieldEnd()
-        if self.serviceInfos is not None:
-            oprot.writeFieldBegin('serviceInfos', TType.LIST, 10)
-            oprot.writeListBegin(TType.STRUCT, len(self.serviceInfos))
-            for iter20 in self.serviceInfos:
-                iter20.write(oprot)
-            oprot.writeListEnd()
-            oprot.writeFieldEnd()
-        oprot.writeFieldStop()
-        oprot.writeStructEnd()
-
-    def validate(self):
-        return
-
-    def __repr__(self):
-        L = ['%s=%r' % (key, value)
-             for key, value in self.__dict__.items()]
-        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-    def __eq__(self, other):
-        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-    def __ne__(self, other):
-        return not (self == other)
-
-
-class TJvmInfo(object):
-    """
-    Attributes:
-     - version
-     - vmVersion
-     - gcType
-    """
-
-
-    def __init__(self, version=0, vmVersion=None, gcType=0,):
-        self.version = version
-        self.vmVersion = vmVersion
-        self.gcType = gcType
-
-    def read(self, iprot):
-        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
-            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
-            return
-        iprot.readStructBegin()
-        while True:
-            (fname, ftype, fid) = iprot.readFieldBegin()
-            if ftype == TType.STOP:
-                break
-            if fid == 1:
-                if ftype == TType.I16:
-                    self.version = iprot.readI16()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 2:
-                if ftype == TType.STRING:
-                    self.vmVersion = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 3:
-                if ftype == TType.I32:
-                    self.gcType = iprot.readI32()
-                else:
-                    iprot.skip(ftype)
-            else:
-                iprot.skip(ftype)
-            iprot.readFieldEnd()
-        iprot.readStructEnd()
-
-    def write(self, oprot):
-        if oprot._fast_encode is not None and self.thrift_spec is not None:
-            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
-            return
-        oprot.writeStructBegin('TJvmInfo')
-        if self.version is not None:
-            oprot.writeFieldBegin('version', TType.I16, 1)
-            oprot.writeI16(self.version)
-            oprot.writeFieldEnd()
-        if self.vmVersion is not None:
-            oprot.writeFieldBegin('vmVersion', TType.STRING, 2)
-            oprot.writeString(self.vmVersion.encode('utf-8') if sys.version_info[0] == 2 else self.vmVersion)
-            oprot.writeFieldEnd()
-        if self.gcType is not None:
-            oprot.writeFieldBegin('gcType', TType.I32, 3)
-            oprot.writeI32(self.gcType)
-            oprot.writeFieldEnd()
-        oprot.writeFieldStop()
-        oprot.writeStructEnd()
-
-    def validate(self):
-        return
-
-    def __repr__(self):
-        L = ['%s=%r' % (key, value)
-             for key, value in self.__dict__.items()]
-        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-    def __eq__(self, other):
-        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-    def __ne__(self, other):
-        return not (self == other)
-
-
-class TAgentInfo(object):
-    """
-    Attributes:
-     - hostname
-     - ip
-     - ports
-     - agentId
-     - applicationName
-     - serviceType
-     - pid
-     - agentVersion
-     - vmVersion
-     - startTimestamp
-     - endTimestamp
-     - endStatus
-     - serverMetaData
-     - jvmInfo
-    """
-
-
-    def __init__(self, hostname=None, ip=None, ports=None, agentId=None, applicationName=None, serviceType=None, pid=None, agentVersion=None, vmVersion=None, startTimestamp=None, endTimestamp=None, endStatus=None, serverMetaData=None, jvmInfo=None,):
-        self.hostname = hostname
-        self.ip = ip
-        self.ports = ports
-        self.agentId = agentId
-        self.applicationName = applicationName
-        self.serviceType = serviceType
-        self.pid = pid
-        self.agentVersion = agentVersion
-        self.vmVersion = vmVersion
-        self.startTimestamp = startTimestamp
-        self.endTimestamp = endTimestamp
-        self.endStatus = endStatus
-        self.serverMetaData = serverMetaData
-        self.jvmInfo = jvmInfo
-
-    def read(self, iprot):
-        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
-            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
-            return
-        iprot.readStructBegin()
-        while True:
-            (fname, ftype, fid) = iprot.readFieldBegin()
-            if ftype == TType.STOP:
-                break
-            if fid == 1:
-                if ftype == TType.STRING:
-                    self.hostname = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 2:
-                if ftype == TType.STRING:
-                    self.ip = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 3:
-                if ftype == TType.STRING:
-                    self.ports = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 4:
-                if ftype == TType.STRING:
-                    self.agentId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 5:
-                if ftype == TType.STRING:
-                    self.applicationName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 6:
-                if ftype == TType.I16:
-                    self.serviceType = iprot.readI16()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 7:
-                if ftype == TType.I32:
-                    self.pid = iprot.readI32()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 8:
-                if ftype == TType.STRING:
-                    self.agentVersion = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 9:
-                if ftype == TType.STRING:
-                    self.vmVersion = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 10:
-                if ftype == TType.I64:
-                    self.startTimestamp = iprot.readI64()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 11:
-                if ftype == TType.I64:
-                    self.endTimestamp = iprot.readI64()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 12:
-                if ftype == TType.I32:
-                    self.endStatus = iprot.readI32()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 20:
-                if ftype == TType.STRUCT:
-                    self.serverMetaData = TServerMetaData()
-                    self.serverMetaData.read(iprot)
-                else:
-                    iprot.skip(ftype)
-            elif fid == 30:
-                if ftype == TType.STRUCT:
-                    self.jvmInfo = TJvmInfo()
-                    self.jvmInfo.read(iprot)
-                else:
-                    iprot.skip(ftype)
-            else:
-                iprot.skip(ftype)
-            iprot.readFieldEnd()
-        iprot.readStructEnd()
-
-    def write(self, oprot):
-        if oprot._fast_encode is not None and self.thrift_spec is not None:
-            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
-            return
-        oprot.writeStructBegin('TAgentInfo')
-        if self.hostname is not None:
-            oprot.writeFieldBegin('hostname', TType.STRING, 1)
-            oprot.writeString(self.hostname.encode('utf-8') if sys.version_info[0] == 2 else self.hostname)
-            oprot.writeFieldEnd()
-        if self.ip is not None:
-            oprot.writeFieldBegin('ip', TType.STRING, 2)
-            oprot.writeString(self.ip.encode('utf-8') if sys.version_info[0] == 2 else self.ip)
-            oprot.writeFieldEnd()
-        if self.ports is not None:
-            oprot.writeFieldBegin('ports', TType.STRING, 3)
-            oprot.writeString(self.ports.encode('utf-8') if sys.version_info[0] == 2 else self.ports)
-            oprot.writeFieldEnd()
-        if self.agentId is not None:
-            oprot.writeFieldBegin('agentId', TType.STRING, 4)
-            oprot.writeString(self.agentId.encode('utf-8') if sys.version_info[0] == 2 else self.agentId)
-            oprot.writeFieldEnd()
-        if self.applicationName is not None:
-            oprot.writeFieldBegin('applicationName', TType.STRING, 5)
-            oprot.writeString(self.applicationName.encode('utf-8') if sys.version_info[0] == 2 else self.applicationName)
-            oprot.writeFieldEnd()
-        if self.serviceType is not None:
-            oprot.writeFieldBegin('serviceType', TType.I16, 6)
-            oprot.writeI16(self.serviceType)
-            oprot.writeFieldEnd()
-        if self.pid is not None:
-            oprot.writeFieldBegin('pid', TType.I32, 7)
-            oprot.writeI32(self.pid)
-            oprot.writeFieldEnd()
-        if self.agentVersion is not None:
-            oprot.writeFieldBegin('agentVersion', TType.STRING, 8)
-            oprot.writeString(self.agentVersion.encode('utf-8') if sys.version_info[0] == 2 else self.agentVersion)
-            oprot.writeFieldEnd()
-        if self.vmVersion is not None:
-            oprot.writeFieldBegin('vmVersion', TType.STRING, 9)
-            oprot.writeString(self.vmVersion.encode('utf-8') if sys.version_info[0] == 2 else self.vmVersion)
-            oprot.writeFieldEnd()
-        if self.startTimestamp is not None:
-            oprot.writeFieldBegin('startTimestamp', TType.I64, 10)
-            oprot.writeI64(self.startTimestamp)
-            oprot.writeFieldEnd()
-        if self.endTimestamp is not None:
-            oprot.writeFieldBegin('endTimestamp', TType.I64, 11)
-            oprot.writeI64(self.endTimestamp)
-            oprot.writeFieldEnd()
-        if self.endStatus is not None:
-            oprot.writeFieldBegin('endStatus', TType.I32, 12)
-            oprot.writeI32(self.endStatus)
-            oprot.writeFieldEnd()
-        if self.serverMetaData is not None:
-            oprot.writeFieldBegin('serverMetaData', TType.STRUCT, 20)
-            self.serverMetaData.write(oprot)
-            oprot.writeFieldEnd()
-        if self.jvmInfo is not None:
-            oprot.writeFieldBegin('jvmInfo', TType.STRUCT, 30)
-            self.jvmInfo.write(oprot)
-            oprot.writeFieldEnd()
-        oprot.writeFieldStop()
-        oprot.writeStructEnd()
-
-    def validate(self):
-        return
-
-    def __repr__(self):
-        L = ['%s=%r' % (key, value)
-             for key, value in self.__dict__.items()]
-        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-    def __eq__(self, other):
-        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-    def __ne__(self, other):
-        return not (self == other)
-
-
-class TJvmGcDetailed(object):
-    """
-    Attributes:
-     - jvmGcNewCount
-     - jvmGcNewTime
-     - jvmPoolCodeCacheUsed
-     - jvmPoolNewGenUsed
-     - jvmPoolOldGenUsed
-     - jvmPoolSurvivorSpaceUsed
-     - jvmPoolPermGenUsed
-     - jvmPoolMetaspaceUsed
-    """
-
-
-    def __init__(self, jvmGcNewCount=None, jvmGcNewTime=None, jvmPoolCodeCacheUsed=None, jvmPoolNewGenUsed=None, jvmPoolOldGenUsed=None, jvmPoolSurvivorSpaceUsed=None, jvmPoolPermGenUsed=None, jvmPoolMetaspaceUsed=None,):
-        self.jvmGcNewCount = jvmGcNewCount
-        self.jvmGcNewTime = jvmGcNewTime
-        self.jvmPoolCodeCacheUsed = jvmPoolCodeCacheUsed
-        self.jvmPoolNewGenUsed = jvmPoolNewGenUsed
-        self.jvmPoolOldGenUsed = jvmPoolOldGenUsed
-        self.jvmPoolSurvivorSpaceUsed = jvmPoolSurvivorSpaceUsed
-        self.jvmPoolPermGenUsed = jvmPoolPermGenUsed
-        self.jvmPoolMetaspaceUsed = jvmPoolMetaspaceUsed
-
-    def read(self, iprot):
-        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
-            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
-            return
-        iprot.readStructBegin()
-        while True:
-            (fname, ftype, fid) = iprot.readFieldBegin()
-            if ftype == TType.STOP:
-                break
-            if fid == 1:
-                if ftype == TType.I64:
-                    self.jvmGcNewCount = iprot.readI64()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 2:
-                if ftype == TType.I64:
-                    self.jvmGcNewTime = iprot.readI64()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 3:
-                if ftype == TType.DOUBLE:
-                    self.jvmPoolCodeCacheUsed = iprot.readDouble()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 4:
-                if ftype == TType.DOUBLE:
-                    self.jvmPoolNewGenUsed = iprot.readDouble()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 5:
-                if ftype == TType.DOUBLE:
-                    self.jvmPoolOldGenUsed = iprot.readDouble()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 6:
-                if ftype == TType.DOUBLE:
-                    self.jvmPoolSurvivorSpaceUsed = iprot.readDouble()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 7:
-                if ftype == TType.DOUBLE:
-                    self.jvmPoolPermGenUsed = iprot.readDouble()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 8:
-                if ftype == TType.DOUBLE:
-                    self.jvmPoolMetaspaceUsed = iprot.readDouble()
-                else:
-                    iprot.skip(ftype)
-            else:
-                iprot.skip(ftype)
-            iprot.readFieldEnd()
-        iprot.readStructEnd()
-
-    def write(self, oprot):
-        if oprot._fast_encode is not None and self.thrift_spec is not None:
-            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
-            return
-        oprot.writeStructBegin('TJvmGcDetailed')
-        if self.jvmGcNewCount is not None:
-            oprot.writeFieldBegin('jvmGcNewCount', TType.I64, 1)
-            oprot.writeI64(self.jvmGcNewCount)
-            oprot.writeFieldEnd()
-        if self.jvmGcNewTime is not None:
-            oprot.writeFieldBegin('jvmGcNewTime', TType.I64, 2)
-            oprot.writeI64(self.jvmGcNewTime)
-            oprot.writeFieldEnd()
-        if self.jvmPoolCodeCacheUsed is not None:
-            oprot.writeFieldBegin('jvmPoolCodeCacheUsed', TType.DOUBLE, 3)
-            oprot.writeDouble(self.jvmPoolCodeCacheUsed)
-            oprot.writeFieldEnd()
-        if self.jvmPoolNewGenUsed is not None:
-            oprot.writeFieldBegin('jvmPoolNewGenUsed', TType.DOUBLE, 4)
-            oprot.writeDouble(self.jvmPoolNewGenUsed)
-            oprot.writeFieldEnd()
-        if self.jvmPoolOldGenUsed is not None:
-            oprot.writeFieldBegin('jvmPoolOldGenUsed', TType.DOUBLE, 5)
-            oprot.writeDouble(self.jvmPoolOldGenUsed)
-            oprot.writeFieldEnd()
-        if self.jvmPoolSurvivorSpaceUsed is not None:
-            oprot.writeFieldBegin('jvmPoolSurvivorSpaceUsed', TType.DOUBLE, 6)
-            oprot.writeDouble(self.jvmPoolSurvivorSpaceUsed)
-            oprot.writeFieldEnd()
-        if self.jvmPoolPermGenUsed is not None:
-            oprot.writeFieldBegin('jvmPoolPermGenUsed', TType.DOUBLE, 7)
-            oprot.writeDouble(self.jvmPoolPermGenUsed)
-            oprot.writeFieldEnd()
-        if self.jvmPoolMetaspaceUsed is not None:
-            oprot.writeFieldBegin('jvmPoolMetaspaceUsed', TType.DOUBLE, 8)
-            oprot.writeDouble(self.jvmPoolMetaspaceUsed)
-            oprot.writeFieldEnd()
-        oprot.writeFieldStop()
-        oprot.writeStructEnd()
-
-    def validate(self):
-        return
-
-    def __repr__(self):
-        L = ['%s=%r' % (key, value)
-             for key, value in self.__dict__.items()]
-        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-    def __eq__(self, other):
-        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-    def __ne__(self, other):
-        return not (self == other)
-
-
-class TJvmGc(object):
-    """
-    Attributes:
-     - type
-     - jvmMemoryHeapUsed
-     - jvmMemoryHeapMax
-     - jvmMemoryNonHeapUsed
-     - jvmMemoryNonHeapMax
-     - jvmGcOldCount
-     - jvmGcOldTime
-     - jvmGcDetailed
-    """
-
-
-    def __init__(self, type=0, jvmMemoryHeapUsed=None, jvmMemoryHeapMax=None, jvmMemoryNonHeapUsed=None, jvmMemoryNonHeapMax=None, jvmGcOldCount=None, jvmGcOldTime=None, jvmGcDetailed=None,):
-        self.type = type
-        self.jvmMemoryHeapUsed = jvmMemoryHeapUsed
-        self.jvmMemoryHeapMax = jvmMemoryHeapMax
-        self.jvmMemoryNonHeapUsed = jvmMemoryNonHeapUsed
-        self.jvmMemoryNonHeapMax = jvmMemoryNonHeapMax
-        self.jvmGcOldCount = jvmGcOldCount
-        self.jvmGcOldTime = jvmGcOldTime
-        self.jvmGcDetailed = jvmGcDetailed
-
-    def read(self, iprot):
-        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
-            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
-            return
-        iprot.readStructBegin()
-        while True:
-            (fname, ftype, fid) = iprot.readFieldBegin()
-            if ftype == TType.STOP:
-                break
-            if fid == 1:
-                if ftype == TType.I32:
-                    self.type = iprot.readI32()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 2:
-                if ftype == TType.I64:
-                    self.jvmMemoryHeapUsed = iprot.readI64()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 3:
-                if ftype == TType.I64:
-                    self.jvmMemoryHeapMax = iprot.readI64()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 4:
-                if ftype == TType.I64:
-                    self.jvmMemoryNonHeapUsed = iprot.readI64()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 5:
-                if ftype == TType.I64:
-                    self.jvmMemoryNonHeapMax = iprot.readI64()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 6:
-                if ftype == TType.I64:
-                    self.jvmGcOldCount = iprot.readI64()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 7:
-                if ftype == TType.I64:
-                    self.jvmGcOldTime = iprot.readI64()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 8:
-                if ftype == TType.STRUCT:
-                    self.jvmGcDetailed = TJvmGcDetailed()
-                    self.jvmGcDetailed.read(iprot)
-                else:
-                    iprot.skip(ftype)
-            else:
-                iprot.skip(ftype)
-            iprot.readFieldEnd()
-        iprot.readStructEnd()
-
-    def write(self, oprot):
-        if oprot._fast_encode is not None and self.thrift_spec is not None:
-            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
-            return
-        oprot.writeStructBegin('TJvmGc')
-        if self.type is not None:
-            oprot.writeFieldBegin('type', TType.I32, 1)
-            oprot.writeI32(self.type)
-            oprot.writeFieldEnd()
-        if self.jvmMemoryHeapUsed is not None:
-            oprot.writeFieldBegin('jvmMemoryHeapUsed', TType.I64, 2)
-            oprot.writeI64(self.jvmMemoryHeapUsed)
-            oprot.writeFieldEnd()
-        if self.jvmMemoryHeapMax is not None:
-            oprot.writeFieldBegin('jvmMemoryHeapMax', TType.I64, 3)
-            oprot.writeI64(self.jvmMemoryHeapMax)
-            oprot.writeFieldEnd()
-        if self.jvmMemoryNonHeapUsed is not None:
-            oprot.writeFieldBegin('jvmMemoryNonHeapUsed', TType.I64, 4)
-            oprot.writeI64(self.jvmMemoryNonHeapUsed)
-            oprot.writeFieldEnd()
-        if self.jvmMemoryNonHeapMax is not None:
-            oprot.writeFieldBegin('jvmMemoryNonHeapMax', TType.I64, 5)
-            oprot.writeI64(self.jvmMemoryNonHeapMax)
-            oprot.writeFieldEnd()
-        if self.jvmGcOldCount is not None:
-            oprot.writeFieldBegin('jvmGcOldCount', TType.I64, 6)
-            oprot.writeI64(self.jvmGcOldCount)
-            oprot.writeFieldEnd()
-        if self.jvmGcOldTime is not None:
-            oprot.writeFieldBegin('jvmGcOldTime', TType.I64, 7)
-            oprot.writeI64(self.jvmGcOldTime)
-            oprot.writeFieldEnd()
-        if self.jvmGcDetailed is not None:
-            oprot.writeFieldBegin('jvmGcDetailed', TType.STRUCT, 8)
-            self.jvmGcDetailed.write(oprot)
-            oprot.writeFieldEnd()
-        oprot.writeFieldStop()
-        oprot.writeStructEnd()
-
-    def validate(self):
-        return
-
-    def __repr__(self):
-        L = ['%s=%r' % (key, value)
-             for key, value in self.__dict__.items()]
-        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-    def __eq__(self, other):
-        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-    def __ne__(self, other):
-        return not (self == other)
-
-
-class TCpuLoad(object):
-    """
-    Attributes:
-     - jvmCpuLoad
-     - systemCpuLoad
-    """
-
-
-    def __init__(self, jvmCpuLoad=None, systemCpuLoad=None,):
-        self.jvmCpuLoad = jvmCpuLoad
-        self.systemCpuLoad = systemCpuLoad
-
-    def read(self, iprot):
-        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
-            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
-            return
-        iprot.readStructBegin()
-        while True:
-            (fname, ftype, fid) = iprot.readFieldBegin()
-            if ftype == TType.STOP:
-                break
-            if fid == 1:
-                if ftype == TType.DOUBLE:
-                    self.jvmCpuLoad = iprot.readDouble()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 2:
-                if ftype == TType.DOUBLE:
-                    self.systemCpuLoad = iprot.readDouble()
-                else:
-                    iprot.skip(ftype)
-            else:
-                iprot.skip(ftype)
-            iprot.readFieldEnd()
-        iprot.readStructEnd()
-
-    def write(self, oprot):
-        if oprot._fast_encode is not None and self.thrift_spec is not None:
-            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
-            return
-        oprot.writeStructBegin('TCpuLoad')
-        if self.jvmCpuLoad is not None:
-            oprot.writeFieldBegin('jvmCpuLoad', TType.DOUBLE, 1)
-            oprot.writeDouble(self.jvmCpuLoad)
-            oprot.writeFieldEnd()
-        if self.systemCpuLoad is not None:
-            oprot.writeFieldBegin('systemCpuLoad', TType.DOUBLE, 2)
-            oprot.writeDouble(self.systemCpuLoad)
-            oprot.writeFieldEnd()
-        oprot.writeFieldStop()
-        oprot.writeStructEnd()
-
-    def validate(self):
-        return
-
-    def __repr__(self):
-        L = ['%s=%r' % (key, value)
-             for key, value in self.__dict__.items()]
-        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-    def __eq__(self, other):
-        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-    def __ne__(self, other):
-        return not (self == other)
-
-
-class TTransaction(object):
-    """
-    Attributes:
-     - sampledNewCount
-     - sampledContinuationCount
-     - unsampledNewCount
-     - unsampledContinuationCount
-    """
-
-
-    def __init__(self, sampledNewCount=None, sampledContinuationCount=None, unsampledNewCount=None, unsampledContinuationCount=None,):
-        self.sampledNewCount = sampledNewCount
-        self.sampledContinuationCount = sampledContinuationCount
-        self.unsampledNewCount = unsampledNewCount
-        self.unsampledContinuationCount = unsampledContinuationCount
-
-    def read(self, iprot):
-        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
-            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
-            return
-        iprot.readStructBegin()
-        while True:
-            (fname, ftype, fid) = iprot.readFieldBegin()
-            if ftype == TType.STOP:
-                break
-            if fid == 2:
-                if ftype == TType.I64:
-                    self.sampledNewCount = iprot.readI64()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 3:
-                if ftype == TType.I64:
-                    self.sampledContinuationCount = iprot.readI64()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 4:
-                if ftype == TType.I64:
-                    self.unsampledNewCount = iprot.readI64()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 5:
-                if ftype == TType.I64:
-                    self.unsampledContinuationCount = iprot.readI64()
-                else:
-                    iprot.skip(ftype)
-            else:
-                iprot.skip(ftype)
-            iprot.readFieldEnd()
-        iprot.readStructEnd()
-
-    def write(self, oprot):
-        if oprot._fast_encode is not None and self.thrift_spec is not None:
-            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
-            return
-        oprot.writeStructBegin('TTransaction')
-        if self.sampledNewCount is not None:
-            oprot.writeFieldBegin('sampledNewCount', TType.I64, 2)
-            oprot.writeI64(self.sampledNewCount)
-            oprot.writeFieldEnd()
-        if self.sampledContinuationCount is not None:
-            oprot.writeFieldBegin('sampledContinuationCount', TType.I64, 3)
-            oprot.writeI64(self.sampledContinuationCount)
-            oprot.writeFieldEnd()
-        if self.unsampledNewCount is not None:
-            oprot.writeFieldBegin('unsampledNewCount', TType.I64, 4)
-            oprot.writeI64(self.unsampledNewCount)
-            oprot.writeFieldEnd()
-        if self.unsampledContinuationCount is not None:
-            oprot.writeFieldBegin('unsampledContinuationCount', TType.I64, 5)
-            oprot.writeI64(self.unsampledContinuationCount)
-            oprot.writeFieldEnd()
-        oprot.writeFieldStop()
-        oprot.writeStructEnd()
-
-    def validate(self):
-        return
-
-    def __repr__(self):
-        L = ['%s=%r' % (key, value)
-             for key, value in self.__dict__.items()]
-        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-    def __eq__(self, other):
-        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-    def __ne__(self, other):
-        return not (self == other)
-
-
-class TActiveTraceHistogram(object):
-    """
-    Attributes:
-     - version
-     - histogramSchemaType
-     - activeTraceCount
-    """
-
-
-    def __init__(self, version=0, histogramSchemaType=None, activeTraceCount=None,):
-        self.version = version
-        self.histogramSchemaType = histogramSchemaType
-        self.activeTraceCount = activeTraceCount
-
-    def read(self, iprot):
-        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
-            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
-            return
-        iprot.readStructBegin()
-        while True:
-            (fname, ftype, fid) = iprot.readFieldBegin()
-            if ftype == TType.STOP:
-                break
-            if fid == 1:
-                if ftype == TType.I16:
-                    self.version = iprot.readI16()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 2:
-                if ftype == TType.I32:
-                    self.histogramSchemaType = iprot.readI32()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 3:
-                if ftype == TType.LIST:
-                    self.activeTraceCount = []
-                    (_etype24, _size21) = iprot.readListBegin()
-                    for _i25 in range(_size21):
-                        _elem26 = iprot.readI32()
-                        self.activeTraceCount.append(_elem26)
-                    iprot.readListEnd()
-                else:
-                    iprot.skip(ftype)
-            else:
-                iprot.skip(ftype)
-            iprot.readFieldEnd()
-        iprot.readStructEnd()
-
-    def write(self, oprot):
-        if oprot._fast_encode is not None and self.thrift_spec is not None:
-            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
-            return
-        oprot.writeStructBegin('TActiveTraceHistogram')
-        if self.version is not None:
-            oprot.writeFieldBegin('version', TType.I16, 1)
-            oprot.writeI16(self.version)
-            oprot.writeFieldEnd()
-        if self.histogramSchemaType is not None:
-            oprot.writeFieldBegin('histogramSchemaType', TType.I32, 2)
-            oprot.writeI32(self.histogramSchemaType)
-            oprot.writeFieldEnd()
-        if self.activeTraceCount is not None:
-            oprot.writeFieldBegin('activeTraceCount', TType.LIST, 3)
-            oprot.writeListBegin(TType.I32, len(self.activeTraceCount))
-            for iter27 in self.activeTraceCount:
-                oprot.writeI32(iter27)
-            oprot.writeListEnd()
-            oprot.writeFieldEnd()
-        oprot.writeFieldStop()
-        oprot.writeStructEnd()
-
-    def validate(self):
-        return
-
-    def __repr__(self):
-        L = ['%s=%r' % (key, value)
-             for key, value in self.__dict__.items()]
-        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-    def __eq__(self, other):
-        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-    def __ne__(self, other):
-        return not (self == other)
-
-
-class TActiveTrace(object):
-    """
-    Attributes:
-     - histogram
-    """
-
-
-    def __init__(self, histogram=None,):
-        self.histogram = histogram
-
-    def read(self, iprot):
-        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
-            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
-            return
-        iprot.readStructBegin()
-        while True:
-            (fname, ftype, fid) = iprot.readFieldBegin()
-            if ftype == TType.STOP:
-                break
-            if fid == 1:
-                if ftype == TType.STRUCT:
-                    self.histogram = TActiveTraceHistogram()
-                    self.histogram.read(iprot)
-                else:
-                    iprot.skip(ftype)
-            else:
-                iprot.skip(ftype)
-            iprot.readFieldEnd()
-        iprot.readStructEnd()
-
-    def write(self, oprot):
-        if oprot._fast_encode is not None and self.thrift_spec is not None:
-            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
-            return
-        oprot.writeStructBegin('TActiveTrace')
-        if self.histogram is not None:
-            oprot.writeFieldBegin('histogram', TType.STRUCT, 1)
-            self.histogram.write(oprot)
-            oprot.writeFieldEnd()
-        oprot.writeFieldStop()
-        oprot.writeStructEnd()
-
-    def validate(self):
-        return
-
-    def __repr__(self):
-        L = ['%s=%r' % (key, value)
-             for key, value in self.__dict__.items()]
-        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-    def __eq__(self, other):
-        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-    def __ne__(self, other):
-        return not (self == other)
-
-
-class TAgentStat(object):
-    """
-    Attributes:
-     - agentId
-     - startTimestamp
-     - timestamp
-     - collectInterval
-     - gc
-     - cpuLoad
-     - transaction
-     - activeTrace
-     - metadata
-    """
-
-
-    def __init__(self, agentId=None, startTimestamp=None, timestamp=None, collectInterval=None, gc=None, cpuLoad=None, transaction=None, activeTrace=None, metadata=None,):
-        self.agentId = agentId
-        self.startTimestamp = startTimestamp
-        self.timestamp = timestamp
-        self.collectInterval = collectInterval
-        self.gc = gc
-        self.cpuLoad = cpuLoad
-        self.transaction = transaction
-        self.activeTrace = activeTrace
-        self.metadata = metadata
-
-    def read(self, iprot):
-        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
-            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
-            return
-        iprot.readStructBegin()
-        while True:
-            (fname, ftype, fid) = iprot.readFieldBegin()
-            if ftype == TType.STOP:
-                break
-            if fid == 1:
-                if ftype == TType.STRING:
-                    self.agentId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 2:
-                if ftype == TType.I64:
-                    self.startTimestamp = iprot.readI64()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 3:
-                if ftype == TType.I64:
-                    self.timestamp = iprot.readI64()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 4:
-                if ftype == TType.I64:
-                    self.collectInterval = iprot.readI64()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 10:
-                if ftype == TType.STRUCT:
-                    self.gc = TJvmGc()
-                    self.gc.read(iprot)
-                else:
-                    iprot.skip(ftype)
-            elif fid == 20:
-                if ftype == TType.STRUCT:
-                    self.cpuLoad = TCpuLoad()
-                    self.cpuLoad.read(iprot)
-                else:
-                    iprot.skip(ftype)
-            elif fid == 30:
-                if ftype == TType.STRUCT:
-                    self.transaction = TTransaction()
-                    self.transaction.read(iprot)
-                else:
-                    iprot.skip(ftype)
-            elif fid == 40:
-                if ftype == TType.STRUCT:
-                    self.activeTrace = TActiveTrace()
-                    self.activeTrace.read(iprot)
-                else:
-                    iprot.skip(ftype)
-            elif fid == 200:
-                if ftype == TType.STRING:
-                    self.metadata = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            else:
-                iprot.skip(ftype)
-            iprot.readFieldEnd()
-        iprot.readStructEnd()
-
-    def write(self, oprot):
-        if oprot._fast_encode is not None and self.thrift_spec is not None:
-            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
-            return
-        oprot.writeStructBegin('TAgentStat')
-        if self.agentId is not None:
-            oprot.writeFieldBegin('agentId', TType.STRING, 1)
-            oprot.writeString(self.agentId.encode('utf-8') if sys.version_info[0] == 2 else self.agentId)
-            oprot.writeFieldEnd()
-        if self.startTimestamp is not None:
-            oprot.writeFieldBegin('startTimestamp', TType.I64, 2)
-            oprot.writeI64(self.startTimestamp)
-            oprot.writeFieldEnd()
-        if self.timestamp is not None:
-            oprot.writeFieldBegin('timestamp', TType.I64, 3)
-            oprot.writeI64(self.timestamp)
-            oprot.writeFieldEnd()
-        if self.collectInterval is not None:
-            oprot.writeFieldBegin('collectInterval', TType.I64, 4)
-            oprot.writeI64(self.collectInterval)
-            oprot.writeFieldEnd()
-        if self.gc is not None:
-            oprot.writeFieldBegin('gc', TType.STRUCT, 10)
-            self.gc.write(oprot)
-            oprot.writeFieldEnd()
-        if self.cpuLoad is not None:
-            oprot.writeFieldBegin('cpuLoad', TType.STRUCT, 20)
-            self.cpuLoad.write(oprot)
-            oprot.writeFieldEnd()
-        if self.transaction is not None:
-            oprot.writeFieldBegin('transaction', TType.STRUCT, 30)
-            self.transaction.write(oprot)
-            oprot.writeFieldEnd()
-        if self.activeTrace is not None:
-            oprot.writeFieldBegin('activeTrace', TType.STRUCT, 40)
-            self.activeTrace.write(oprot)
-            oprot.writeFieldEnd()
-        if self.metadata is not None:
-            oprot.writeFieldBegin('metadata', TType.STRING, 200)
-            oprot.writeString(self.metadata.encode('utf-8') if sys.version_info[0] == 2 else self.metadata)
-            oprot.writeFieldEnd()
-        oprot.writeFieldStop()
-        oprot.writeStructEnd()
-
-    def validate(self):
-        return
-
-    def __repr__(self):
-        L = ['%s=%r' % (key, value)
-             for key, value in self.__dict__.items()]
-        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-    def __eq__(self, other):
-        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-    def __ne__(self, other):
-        return not (self == other)
-
-
-class TAgentStatBatch(object):
-    """
-    Attributes:
-     - agentId
-     - startTimestamp
-     - agentStats
-    """
-
-
-    def __init__(self, agentId=None, startTimestamp=None, agentStats=None,):
-        self.agentId = agentId
-        self.startTimestamp = startTimestamp
-        self.agentStats = agentStats
-
-    def read(self, iprot):
-        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
-            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
-            return
-        iprot.readStructBegin()
-        while True:
-            (fname, ftype, fid) = iprot.readFieldBegin()
-            if ftype == TType.STOP:
-                break
-            if fid == 1:
-                if ftype == TType.STRING:
-                    self.agentId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 2:
-                if ftype == TType.I64:
-                    self.startTimestamp = iprot.readI64()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 10:
-                if ftype == TType.LIST:
-                    self.agentStats = []
-                    (_etype31, _size28) = iprot.readListBegin()
-                    for _i32 in range(_size28):
-                        _elem33 = TAgentStat()
-                        _elem33.read(iprot)
-                        self.agentStats.append(_elem33)
-                    iprot.readListEnd()
-                else:
-                    iprot.skip(ftype)
-            else:
-                iprot.skip(ftype)
-            iprot.readFieldEnd()
-        iprot.readStructEnd()
-
-    def write(self, oprot):
-        if oprot._fast_encode is not None and self.thrift_spec is not None:
-            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
-            return
-        oprot.writeStructBegin('TAgentStatBatch')
-        if self.agentId is not None:
-            oprot.writeFieldBegin('agentId', TType.STRING, 1)
-            oprot.writeString(self.agentId.encode('utf-8') if sys.version_info[0] == 2 else self.agentId)
-            oprot.writeFieldEnd()
-        if self.startTimestamp is not None:
-            oprot.writeFieldBegin('startTimestamp', TType.I64, 2)
-            oprot.writeI64(self.startTimestamp)
-            oprot.writeFieldEnd()
-        if self.agentStats is not None:
-            oprot.writeFieldBegin('agentStats', TType.LIST, 10)
-            oprot.writeListBegin(TType.STRUCT, len(self.agentStats))
-            for iter34 in self.agentStats:
-                iter34.write(oprot)
-            oprot.writeListEnd()
-            oprot.writeFieldEnd()
-        oprot.writeFieldStop()
-        oprot.writeStructEnd()
-
-    def validate(self):
-        return
-
-    def __repr__(self):
-        L = ['%s=%r' % (key, value)
-             for key, value in self.__dict__.items()]
-        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-    def __eq__(self, other):
-        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-    def __ne__(self, other):
-        return not (self == other)
-all_structs.append(TServiceInfo)
-TServiceInfo.thrift_spec = (
-    None,  # 0
-    (1, TType.STRING, 'serviceName', 'UTF8', None, ),  # 1
-    (2, TType.LIST, 'serviceLibs', (TType.STRING, 'UTF8', False), None, ),  # 2
-)
-all_structs.append(TServerMetaData)
-TServerMetaData.thrift_spec = (
-    None,  # 0
-    (1, TType.STRING, 'serverInfo', 'UTF8', None, ),  # 1
-    (2, TType.LIST, 'vmArgs', (TType.STRING, 'UTF8', False), None, ),  # 2
-    None,  # 3
-    None,  # 4
-    None,  # 5
-    None,  # 6
-    None,  # 7
-    None,  # 8
-    None,  # 9
-    (10, TType.LIST, 'serviceInfos', (TType.STRUCT, [TServiceInfo, None], False), None, ),  # 10
-)
-all_structs.append(TJvmInfo)
-TJvmInfo.thrift_spec = (
-    None,  # 0
-    (1, TType.I16, 'version', None, 0, ),  # 1
-    (2, TType.STRING, 'vmVersion', 'UTF8', None, ),  # 2
-    (3, TType.I32, 'gcType', None, 0, ),  # 3
-)
-all_structs.append(TAgentInfo)
-TAgentInfo.thrift_spec = (
-    None,  # 0
-    (1, TType.STRING, 'hostname', 'UTF8', None, ),  # 1
-    (2, TType.STRING, 'ip', 'UTF8', None, ),  # 2
-    (3, TType.STRING, 'ports', 'UTF8', None, ),  # 3
-    (4, TType.STRING, 'agentId', 'UTF8', None, ),  # 4
-    (5, TType.STRING, 'applicationName', 'UTF8', None, ),  # 5
-    (6, TType.I16, 'serviceType', None, None, ),  # 6
-    (7, TType.I32, 'pid', None, None, ),  # 7
-    (8, TType.STRING, 'agentVersion', 'UTF8', None, ),  # 8
-    (9, TType.STRING, 'vmVersion', 'UTF8', None, ),  # 9
-    (10, TType.I64, 'startTimestamp', None, None, ),  # 10
-    (11, TType.I64, 'endTimestamp', None, None, ),  # 11
-    (12, TType.I32, 'endStatus', None, None, ),  # 12
-    None,  # 13
-    None,  # 14
-    None,  # 15
-    None,  # 16
-    None,  # 17
-    None,  # 18
-    None,  # 19
-    (20, TType.STRUCT, 'serverMetaData', [TServerMetaData, None], None, ),  # 20
-    None,  # 21
-    None,  # 22
-    None,  # 23
-    None,  # 24
-    None,  # 25
-    None,  # 26
-    None,  # 27
-    None,  # 28
-    None,  # 29
-    (30, TType.STRUCT, 'jvmInfo', [TJvmInfo, None], None, ),  # 30
-)
-all_structs.append(TJvmGcDetailed)
-TJvmGcDetailed.thrift_spec = (
-    None,  # 0
-    (1, TType.I64, 'jvmGcNewCount', None, None, ),  # 1
-    (2, TType.I64, 'jvmGcNewTime', None, None, ),  # 2
-    (3, TType.DOUBLE, 'jvmPoolCodeCacheUsed', None, None, ),  # 3
-    (4, TType.DOUBLE, 'jvmPoolNewGenUsed', None, None, ),  # 4
-    (5, TType.DOUBLE, 'jvmPoolOldGenUsed', None, None, ),  # 5
-    (6, TType.DOUBLE, 'jvmPoolSurvivorSpaceUsed', None, None, ),  # 6
-    (7, TType.DOUBLE, 'jvmPoolPermGenUsed', None, None, ),  # 7
-    (8, TType.DOUBLE, 'jvmPoolMetaspaceUsed', None, None, ),  # 8
-)
-all_structs.append(TJvmGc)
-TJvmGc.thrift_spec = (
-    None,  # 0
-    (1, TType.I32, 'type', None, 0, ),  # 1
-    (2, TType.I64, 'jvmMemoryHeapUsed', None, None, ),  # 2
-    (3, TType.I64, 'jvmMemoryHeapMax', None, None, ),  # 3
-    (4, TType.I64, 'jvmMemoryNonHeapUsed', None, None, ),  # 4
-    (5, TType.I64, 'jvmMemoryNonHeapMax', None, None, ),  # 5
-    (6, TType.I64, 'jvmGcOldCount', None, None, ),  # 6
-    (7, TType.I64, 'jvmGcOldTime', None, None, ),  # 7
-    (8, TType.STRUCT, 'jvmGcDetailed', [TJvmGcDetailed, None], None, ),  # 8
-)
-all_structs.append(TCpuLoad)
-TCpuLoad.thrift_spec = (
-    None,  # 0
-    (1, TType.DOUBLE, 'jvmCpuLoad', None, None, ),  # 1
-    (2, TType.DOUBLE, 'systemCpuLoad', None, None, ),  # 2
-)
-all_structs.append(TTransaction)
-TTransaction.thrift_spec = (
-    None,  # 0
-    None,  # 1
-    (2, TType.I64, 'sampledNewCount', None, None, ),  # 2
-    (3, TType.I64, 'sampledContinuationCount', None, None, ),  # 3
-    (4, TType.I64, 'unsampledNewCount', None, None, ),  # 4
-    (5, TType.I64, 'unsampledContinuationCount', None, None, ),  # 5
-)
-all_structs.append(TActiveTraceHistogram)
-TActiveTraceHistogram.thrift_spec = (
-    None,  # 0
-    (1, TType.I16, 'version', None, 0, ),  # 1
-    (2, TType.I32, 'histogramSchemaType', None, None, ),  # 2
-    (3, TType.LIST, 'activeTraceCount', (TType.I32, None, False), None, ),  # 3
-)
-all_structs.append(TActiveTrace)
-TActiveTrace.thrift_spec = (
-    None,  # 0
-    (1, TType.STRUCT, 'histogram', [TActiveTraceHistogram, None], None, ),  # 1
-)
-all_structs.append(TAgentStat)
-TAgentStat.thrift_spec = (
-    None,  # 0
-    (1, TType.STRING, 'agentId', 'UTF8', None, ),  # 1
-    (2, TType.I64, 'startTimestamp', None, None, ),  # 2
-    (3, TType.I64, 'timestamp', None, None, ),  # 3
-    (4, TType.I64, 'collectInterval', None, None, ),  # 4
-    None,  # 5
-    None,  # 6
-    None,  # 7
-    None,  # 8
-    None,  # 9
-    (10, TType.STRUCT, 'gc', [TJvmGc, None], None, ),  # 10
-    None,  # 11
-    None,  # 12
-    None,  # 13
-    None,  # 14
-    None,  # 15
-    None,  # 16
-    None,  # 17
-    None,  # 18
-    None,  # 19
-    (20, TType.STRUCT, 'cpuLoad', [TCpuLoad, None], None, ),  # 20
-    None,  # 21
-    None,  # 22
-    None,  # 23
-    None,  # 24
-    None,  # 25
-    None,  # 26
-    None,  # 27
-    None,  # 28
-    None,  # 29
-    (30, TType.STRUCT, 'transaction', [TTransaction, None], None, ),  # 30
-    None,  # 31
-    None,  # 32
-    None,  # 33
-    None,  # 34
-    None,  # 35
-    None,  # 36
-    None,  # 37
-    None,  # 38
-    None,  # 39
-    (40, TType.STRUCT, 'activeTrace', [TActiveTrace, None], None, ),  # 40
-    None,  # 41
-    None,  # 42
-    None,  # 43
-    None,  # 44
-    None,  # 45
-    None,  # 46
-    None,  # 47
-    None,  # 48
-    None,  # 49
-    None,  # 50
-    None,  # 51
-    None,  # 52
-    None,  # 53
-    None,  # 54
-    None,  # 55
-    None,  # 56
-    None,  # 57
-    None,  # 58
-    None,  # 59
-    None,  # 60
-    None,  # 61
-    None,  # 62
-    None,  # 63
-    None,  # 64
-    None,  # 65
-    None,  # 66
-    None,  # 67
-    None,  # 68
-    None,  # 69
-    None,  # 70
-    None,  # 71
-    None,  # 72
-    None,  # 73
-    None,  # 74
-    None,  # 75
-    None,  # 76
-    None,  # 77
-    None,  # 78
-    None,  # 79
-    None,  # 80
-    None,  # 81
-    None,  # 82
-    None,  # 83
-    None,  # 84
-    None,  # 85
-    None,  # 86
-    None,  # 87
-    None,  # 88
-    None,  # 89
-    None,  # 90
-    None,  # 91
-    None,  # 92
-    None,  # 93
-    None,  # 94
-    None,  # 95
-    None,  # 96
-    None,  # 97
-    None,  # 98
-    None,  # 99
-    None,  # 100
-    None,  # 101
-    None,  # 102
-    None,  # 103
-    None,  # 104
-    None,  # 105
-    None,  # 106
-    None,  # 107
-    None,  # 108
-    None,  # 109
-    None,  # 110
-    None,  # 111
-    None,  # 112
-    None,  # 113
-    None,  # 114
-    None,  # 115
-    None,  # 116
-    None,  # 117
-    None,  # 118
-    None,  # 119
-    None,  # 120
-    None,  # 121
-    None,  # 122
-    None,  # 123
-    None,  # 124
-    None,  # 125
-    None,  # 126
-    None,  # 127
-    None,  # 128
-    None,  # 129
-    None,  # 130
-    None,  # 131
-    None,  # 132
-    None,  # 133
-    None,  # 134
-    None,  # 135
-    None,  # 136
-    None,  # 137
-    None,  # 138
-    None,  # 139
-    None,  # 140
-    None,  # 141
-    None,  # 142
-    None,  # 143
-    None,  # 144
-    None,  # 145
-    None,  # 146
-    None,  # 147
-    None,  # 148
-    None,  # 149
-    None,  # 150
-    None,  # 151
-    None,  # 152
-    None,  # 153
-    None,  # 154
-    None,  # 155
-    None,  # 156
-    None,  # 157
-    None,  # 158
-    None,  # 159
-    None,  # 160
-    None,  # 161
-    None,  # 162
-    None,  # 163
-    None,  # 164
-    None,  # 165
-    None,  # 166
-    None,  # 167
-    None,  # 168
-    None,  # 169
-    None,  # 170
-    None,  # 171
-    None,  # 172
-    None,  # 173
-    None,  # 174
-    None,  # 175
-    None,  # 176
-    None,  # 177
-    None,  # 178
-    None,  # 179
-    None,  # 180
-    None,  # 181
-    None,  # 182
-    None,  # 183
-    None,  # 184
-    None,  # 185
-    None,  # 186
-    None,  # 187
-    None,  # 188
-    None,  # 189
-    None,  # 190
-    None,  # 191
-    None,  # 192
-    None,  # 193
-    None,  # 194
-    None,  # 195
-    None,  # 196
-    None,  # 197
-    None,  # 198
-    None,  # 199
-    (200, TType.STRING, 'metadata', 'UTF8', None, ),  # 200
-)
-all_structs.append(TAgentStatBatch)
-TAgentStatBatch.thrift_spec = (
-    None,  # 0
-    (1, TType.STRING, 'agentId', 'UTF8', None, ),  # 1
-    (2, TType.I64, 'startTimestamp', None, None, ),  # 2
-    None,  # 3
-    None,  # 4
-    None,  # 5
-    None,  # 6
-    None,  # 7
-    None,  # 8
-    None,  # 9
-    (10, TType.LIST, 'agentStats', (TType.STRUCT, [TAgentStat, None], False), None, ),  # 10
-)
-fix_spec(all_structs)
-del all_structs
diff --git a/collector-agent/Proto/Trift/Trace.thrift b/collector-agent/Proto/Trift/Trace.thrift
deleted file mode 100644
index 4fe52b6a5..000000000
--- a/collector-agent/Proto/Trift/Trace.thrift
+++ /dev/null
@@ -1,180 +0,0 @@
-namespace java com.navercorp.pinpoint.thrift.dto
-
-
-struct TIntStringValue {
-     1: i32 intValue;
-     2: optional string stringValue;
-}
-
-struct TIntStringStringValue {
-    1: i32 intValue;
-    2: optional string stringValue1;
-    3: optional string stringValue2;
-}
-
-struct TLongIntIntByteByteStringValue {
-    1: i64 longValue;
-    2: i32 intValue1;
-    3: optional i32 intValue2;
-    4: optional i8 byteValue1;
-    5: optional i8 byteValue2;
-    6: optional string stringValue;
-}
-
-struct TIntBooleanIntBooleanValue {
-    1: i32 intValue1;
-    2: bool boolValue1;
-    3: i32 intValue2;
-    4: bool boolValue2;
-}
-
-union TAnnotationValue {
-  1: string stringValue
-  2: bool boolValue;
-  3: i32 intValue;
-  4: i64 longValue;
-  5: i16 shortValue
-  6: double doubleValue;
-  7: binary binaryValue;
-  8: i8 byteValue;
-  9: TIntStringValue intStringValue;
-  10: TIntStringStringValue intStringStringValue;
-  11: TLongIntIntByteByteStringValue longIntIntByteByteStringValue;
-  12: TIntBooleanIntBooleanValue intBooleanIntBooleanValue;
-}
-
-struct TAnnotation {
-  1: i32 key,
-  2: optional TAnnotationValue value
-}
-
-
-
-
-struct TSpanEvent {
-
-  7: optional i64 spanId
-  8: i16 sequence
-
-  9: i32 startElapsed
-  10: optional i32 endElapsed = 0
-
-  11: optional string rpc
-  12: i16 serviceType
-  13: optional string endPoint
-
-  14: optional list<TAnnotation> annotations
-# callstack depth from the tspan
-  15: optional i32 depth = -1
-  16: optional i64 nextSpanId = -1
-
-  20: optional string destinationId
-
-  25: optional i32 apiId;
-  26: optional TIntStringValue exceptionInfo;
-  
-  30: optional i32 asyncId;
-  31: optional i32 nextAsyncId;
-  32: optional i16 asyncSequence;
-}
-
-struct TSpan {
-
-  1: string agentId
-  2: string applicationName
-  3: i64 agentStartTime
-
-  // identical to agentId if null
-  //4: optional string traceAgentId
-  //5: i64 traceAgentStartTime;
-  //6: i64 traceTransactionSequence;
-  4: binary  transactionId;
-
-  7: i64 spanId
-  8: optional i64 parentSpanId = -1
-
-  // span event's startTimestamp
-  9: i64 startTime
-  10: optional i32 elapsed = 0
-
-  11: optional string rpc
-
-  12: i16 serviceType
-  13: optional string endPoint
-  14: optional string remoteAddr
-
-  15: optional list<TAnnotation> annotations
-  16: optional i16 flag = 0
-
-  17: optional i32 err
-
-  18: optional list<TSpanEvent> spanEventList
-
-  19: optional string parentApplicationName
-  20: optional i16 parentApplicationType
-  21: optional string acceptorHost
-
-  25: optional i32 apiId;
-  26: optional TIntStringValue exceptionInfo;
-  
-  30: optional i16 applicationServiceType;
-  31: optional i8 loggingTransactionInfo;
-}
-
-struct TSpanChunk {
-  1: string agentId
-  2: string applicationName
-  3: i64 agentStartTime
-
-  4: i16 serviceType
-
-  // identical to agentId if null
-//  5: optional string traceAgentId
-//  6: i64 traceAgentStartTime;
-//  7: i64 traceTransactionSequence;
-    5: binary  transactionId;
-
-  8: i64 spanId
-
-  9: optional string endPoint
-
-  10: list<TSpanEvent> spanEventList
-  
-  11: optional i16 applicationServiceType
-}
-
-
-struct TStringMetaData {
-
-    1: string agentId
-    2: i64 agentStartTime
-
-    4: i32 stringId
-    5: string stringValue;
-}
-
-struct TSqlMetaData {
-
-    1: string agentId
-    2: i64 agentStartTime
-
-    4: i32 sqlId
-    5: string sql;
-}
-
-
-struct TApiMetaData {
-  1: string agentId
-  2: i64 agentStartTime
-
-  4: i32 apiId,
-  5: string apiInfo,
-  6: optional i32 line,
-  
-  10: optional i32 type;
-}
-
-struct TResult {
-  1: bool success
-  2: optional string message
-}
diff --git a/collector-agent/Proto/Trift/Trace/__init__.py b/collector-agent/Proto/Trift/Trace/__init__.py
deleted file mode 100644
index adefd8e51..000000000
--- a/collector-agent/Proto/Trift/Trace/__init__.py
+++ /dev/null
@@ -1,1 +0,0 @@
-__all__ = ['ttypes', 'constants']
diff --git a/collector-agent/Proto/Trift/Trace/constants.py b/collector-agent/Proto/Trift/Trace/constants.py
deleted file mode 100644
index 0c217ceda..000000000
--- a/collector-agent/Proto/Trift/Trace/constants.py
+++ /dev/null
@@ -1,14 +0,0 @@
-#
-# Autogenerated by Thrift Compiler (0.11.0)
-#
-# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
-#
-#  options string: py
-#
-
-from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
-from thrift.protocol.TProtocol import TProtocolException
-from thrift.TRecursive import fix_spec
-
-import sys
-from .ttypes import *
diff --git a/collector-agent/Proto/Trift/Trace/ttypes.py b/collector-agent/Proto/Trift/Trace/ttypes.py
deleted file mode 100644
index 2eed33f77..000000000
--- a/collector-agent/Proto/Trift/Trace/ttypes.py
+++ /dev/null
@@ -1,1846 +0,0 @@
-#
-# Autogenerated by Thrift Compiler (0.11.0)
-#
-# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
-#
-#  options string: py
-#
-
-from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
-from thrift.protocol.TProtocol import TProtocolException
-from thrift.TRecursive import fix_spec
-
-import sys
-
-from thrift.transport import TTransport
-all_structs = []
-
-
-class TIntStringValue(object):
-    """
-    Attributes:
-     - intValue
-     - stringValue
-    """
-
-
-    def __init__(self, intValue=None, stringValue=None,):
-        self.intValue = intValue
-        self.stringValue = stringValue
-
-    def read(self, iprot):
-        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
-            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
-            return
-        iprot.readStructBegin()
-        while True:
-            (fname, ftype, fid) = iprot.readFieldBegin()
-            if ftype == TType.STOP:
-                break
-            if fid == 1:
-                if ftype == TType.I32:
-                    self.intValue = iprot.readI32()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 2:
-                if ftype == TType.STRING:
-                    self.stringValue = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            else:
-                iprot.skip(ftype)
-            iprot.readFieldEnd()
-        iprot.readStructEnd()
-
-    def write(self, oprot):
-        if oprot._fast_encode is not None and self.thrift_spec is not None:
-            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
-            return
-        oprot.writeStructBegin('TIntStringValue')
-        if self.intValue is not None:
-            oprot.writeFieldBegin('intValue', TType.I32, 1)
-            oprot.writeI32(self.intValue)
-            oprot.writeFieldEnd()
-        if self.stringValue is not None:
-            oprot.writeFieldBegin('stringValue', TType.STRING, 2)
-            oprot.writeString(self.stringValue.encode('utf-8') if sys.version_info[0] == 2 else self.stringValue)
-            oprot.writeFieldEnd()
-        oprot.writeFieldStop()
-        oprot.writeStructEnd()
-
-    def validate(self):
-        return
-
-    def __repr__(self):
-        L = ['%s=%r' % (key, value)
-             for key, value in self.__dict__.items()]
-        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-    def __eq__(self, other):
-        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-    def __ne__(self, other):
-        return not (self == other)
-
-
-class TIntStringStringValue(object):
-    """
-    Attributes:
-     - intValue
-     - stringValue1
-     - stringValue2
-    """
-
-
-    def __init__(self, intValue=None, stringValue1=None, stringValue2=None,):
-        self.intValue = intValue
-        self.stringValue1 = stringValue1
-        self.stringValue2 = stringValue2
-
-    def read(self, iprot):
-        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
-            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
-            return
-        iprot.readStructBegin()
-        while True:
-            (fname, ftype, fid) = iprot.readFieldBegin()
-            if ftype == TType.STOP:
-                break
-            if fid == 1:
-                if ftype == TType.I32:
-                    self.intValue = iprot.readI32()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 2:
-                if ftype == TType.STRING:
-                    self.stringValue1 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 3:
-                if ftype == TType.STRING:
-                    self.stringValue2 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            else:
-                iprot.skip(ftype)
-            iprot.readFieldEnd()
-        iprot.readStructEnd()
-
-    def write(self, oprot):
-        if oprot._fast_encode is not None and self.thrift_spec is not None:
-            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
-            return
-        oprot.writeStructBegin('TIntStringStringValue')
-        if self.intValue is not None:
-            oprot.writeFieldBegin('intValue', TType.I32, 1)
-            oprot.writeI32(self.intValue)
-            oprot.writeFieldEnd()
-        if self.stringValue1 is not None:
-            oprot.writeFieldBegin('stringValue1', TType.STRING, 2)
-            oprot.writeString(self.stringValue1.encode('utf-8') if sys.version_info[0] == 2 else self.stringValue1)
-            oprot.writeFieldEnd()
-        if self.stringValue2 is not None:
-            oprot.writeFieldBegin('stringValue2', TType.STRING, 3)
-            oprot.writeString(self.stringValue2.encode('utf-8') if sys.version_info[0] == 2 else self.stringValue2)
-            oprot.writeFieldEnd()
-        oprot.writeFieldStop()
-        oprot.writeStructEnd()
-
-    def validate(self):
-        return
-
-    def __repr__(self):
-        L = ['%s=%r' % (key, value)
-             for key, value in self.__dict__.items()]
-        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-    def __eq__(self, other):
-        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-    def __ne__(self, other):
-        return not (self == other)
-
-
-class TLongIntIntByteByteStringValue(object):
-    """
-    Attributes:
-     - longValue
-     - intValue1
-     - intValue2
-     - byteValue1
-     - byteValue2
-     - stringValue
-    """
-
-
-    def __init__(self, longValue=None, intValue1=None, intValue2=None, byteValue1=None, byteValue2=None, stringValue=None,):
-        self.longValue = longValue
-        self.intValue1 = intValue1
-        self.intValue2 = intValue2
-        self.byteValue1 = byteValue1
-        self.byteValue2 = byteValue2
-        self.stringValue = stringValue
-
-    def read(self, iprot):
-        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
-            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
-            return
-        iprot.readStructBegin()
-        while True:
-            (fname, ftype, fid) = iprot.readFieldBegin()
-            if ftype == TType.STOP:
-                break
-            if fid == 1:
-                if ftype == TType.I64:
-                    self.longValue = iprot.readI64()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 2:
-                if ftype == TType.I32:
-                    self.intValue1 = iprot.readI32()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 3:
-                if ftype == TType.I32:
-                    self.intValue2 = iprot.readI32()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 4:
-                if ftype == TType.BYTE:
-                    self.byteValue1 = iprot.readByte()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 5:
-                if ftype == TType.BYTE:
-                    self.byteValue2 = iprot.readByte()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 6:
-                if ftype == TType.STRING:
-                    self.stringValue = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            else:
-                iprot.skip(ftype)
-            iprot.readFieldEnd()
-        iprot.readStructEnd()
-
-    def write(self, oprot):
-        if oprot._fast_encode is not None and self.thrift_spec is not None:
-            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
-            return
-        oprot.writeStructBegin('TLongIntIntByteByteStringValue')
-        if self.longValue is not None:
-            oprot.writeFieldBegin('longValue', TType.I64, 1)
-            oprot.writeI64(self.longValue)
-            oprot.writeFieldEnd()
-        if self.intValue1 is not None:
-            oprot.writeFieldBegin('intValue1', TType.I32, 2)
-            oprot.writeI32(self.intValue1)
-            oprot.writeFieldEnd()
-        if self.intValue2 is not None:
-            oprot.writeFieldBegin('intValue2', TType.I32, 3)
-            oprot.writeI32(self.intValue2)
-            oprot.writeFieldEnd()
-        if self.byteValue1 is not None:
-            oprot.writeFieldBegin('byteValue1', TType.BYTE, 4)
-            oprot.writeByte(self.byteValue1)
-            oprot.writeFieldEnd()
-        if self.byteValue2 is not None:
-            oprot.writeFieldBegin('byteValue2', TType.BYTE, 5)
-            oprot.writeByte(self.byteValue2)
-            oprot.writeFieldEnd()
-        if self.stringValue is not None:
-            oprot.writeFieldBegin('stringValue', TType.STRING, 6)
-            oprot.writeString(self.stringValue.encode('utf-8') if sys.version_info[0] == 2 else self.stringValue)
-            oprot.writeFieldEnd()
-        oprot.writeFieldStop()
-        oprot.writeStructEnd()
-
-    def validate(self):
-        return
-
-    def __repr__(self):
-        L = ['%s=%r' % (key, value)
-             for key, value in self.__dict__.items()]
-        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-    def __eq__(self, other):
-        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-    def __ne__(self, other):
-        return not (self == other)
-
-
-class TIntBooleanIntBooleanValue(object):
-    """
-    Attributes:
-     - intValue1
-     - boolValue1
-     - intValue2
-     - boolValue2
-    """
-
-
-    def __init__(self, intValue1=None, boolValue1=None, intValue2=None, boolValue2=None,):
-        self.intValue1 = intValue1
-        self.boolValue1 = boolValue1
-        self.intValue2 = intValue2
-        self.boolValue2 = boolValue2
-
-    def read(self, iprot):
-        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
-            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
-            return
-        iprot.readStructBegin()
-        while True:
-            (fname, ftype, fid) = iprot.readFieldBegin()
-            if ftype == TType.STOP:
-                break
-            if fid == 1:
-                if ftype == TType.I32:
-                    self.intValue1 = iprot.readI32()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 2:
-                if ftype == TType.BOOL:
-                    self.boolValue1 = iprot.readBool()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 3:
-                if ftype == TType.I32:
-                    self.intValue2 = iprot.readI32()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 4:
-                if ftype == TType.BOOL:
-                    self.boolValue2 = iprot.readBool()
-                else:
-                    iprot.skip(ftype)
-            else:
-                iprot.skip(ftype)
-            iprot.readFieldEnd()
-        iprot.readStructEnd()
-
-    def write(self, oprot):
-        if oprot._fast_encode is not None and self.thrift_spec is not None:
-            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
-            return
-        oprot.writeStructBegin('TIntBooleanIntBooleanValue')
-        if self.intValue1 is not None:
-            oprot.writeFieldBegin('intValue1', TType.I32, 1)
-            oprot.writeI32(self.intValue1)
-            oprot.writeFieldEnd()
-        if self.boolValue1 is not None:
-            oprot.writeFieldBegin('boolValue1', TType.BOOL, 2)
-            oprot.writeBool(self.boolValue1)
-            oprot.writeFieldEnd()
-        if self.intValue2 is not None:
-            oprot.writeFieldBegin('intValue2', TType.I32, 3)
-            oprot.writeI32(self.intValue2)
-            oprot.writeFieldEnd()
-        if self.boolValue2 is not None:
-            oprot.writeFieldBegin('boolValue2', TType.BOOL, 4)
-            oprot.writeBool(self.boolValue2)
-            oprot.writeFieldEnd()
-        oprot.writeFieldStop()
-        oprot.writeStructEnd()
-
-    def validate(self):
-        return
-
-    def __repr__(self):
-        L = ['%s=%r' % (key, value)
-             for key, value in self.__dict__.items()]
-        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-    def __eq__(self, other):
-        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-    def __ne__(self, other):
-        return not (self == other)
-
-
-class TAnnotationValue(object):
-    """
-    Attributes:
-     - stringValue
-     - boolValue
-     - intValue
-     - longValue
-     - shortValue
-     - doubleValue
-     - binaryValue
-     - byteValue
-     - intStringValue
-     - intStringStringValue
-     - longIntIntByteByteStringValue
-     - intBooleanIntBooleanValue
-    """
-
-
-    def __init__(self, stringValue=None, boolValue=None, intValue=None, longValue=None, shortValue=None, doubleValue=None, binaryValue=None, byteValue=None, intStringValue=None, intStringStringValue=None, longIntIntByteByteStringValue=None, intBooleanIntBooleanValue=None,):
-        self.stringValue = stringValue
-        self.boolValue = boolValue
-        self.intValue = intValue
-        self.longValue = longValue
-        self.shortValue = shortValue
-        self.doubleValue = doubleValue
-        self.binaryValue = binaryValue
-        self.byteValue = byteValue
-        self.intStringValue = intStringValue
-        self.intStringStringValue = intStringStringValue
-        self.longIntIntByteByteStringValue = longIntIntByteByteStringValue
-        self.intBooleanIntBooleanValue = intBooleanIntBooleanValue
-
-    def read(self, iprot):
-        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
-            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
-            return
-        iprot.readStructBegin()
-        while True:
-            (fname, ftype, fid) = iprot.readFieldBegin()
-            if ftype == TType.STOP:
-                break
-            if fid == 1:
-                if ftype == TType.STRING:
-                    self.stringValue = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 2:
-                if ftype == TType.BOOL:
-                    self.boolValue = iprot.readBool()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 3:
-                if ftype == TType.I32:
-                    self.intValue = iprot.readI32()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 4:
-                if ftype == TType.I64:
-                    self.longValue = iprot.readI64()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 5:
-                if ftype == TType.I16:
-                    self.shortValue = iprot.readI16()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 6:
-                if ftype == TType.DOUBLE:
-                    self.doubleValue = iprot.readDouble()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 7:
-                if ftype == TType.STRING:
-                    self.binaryValue = iprot.readBinary()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 8:
-                if ftype == TType.BYTE:
-                    self.byteValue = iprot.readByte()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 9:
-                if ftype == TType.STRUCT:
-                    self.intStringValue = TIntStringValue()
-                    self.intStringValue.read(iprot)
-                else:
-                    iprot.skip(ftype)
-            elif fid == 10:
-                if ftype == TType.STRUCT:
-                    self.intStringStringValue = TIntStringStringValue()
-                    self.intStringStringValue.read(iprot)
-                else:
-                    iprot.skip(ftype)
-            elif fid == 11:
-                if ftype == TType.STRUCT:
-                    self.longIntIntByteByteStringValue = TLongIntIntByteByteStringValue()
-                    self.longIntIntByteByteStringValue.read(iprot)
-                else:
-                    iprot.skip(ftype)
-            elif fid == 12:
-                if ftype == TType.STRUCT:
-                    self.intBooleanIntBooleanValue = TIntBooleanIntBooleanValue()
-                    self.intBooleanIntBooleanValue.read(iprot)
-                else:
-                    iprot.skip(ftype)
-            else:
-                iprot.skip(ftype)
-            iprot.readFieldEnd()
-        iprot.readStructEnd()
-
-    def write(self, oprot):
-        if oprot._fast_encode is not None and self.thrift_spec is not None:
-            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
-            return
-        oprot.writeStructBegin('TAnnotationValue')
-        if self.stringValue is not None:
-            oprot.writeFieldBegin('stringValue', TType.STRING, 1)
-            oprot.writeString(self.stringValue.encode('utf-8') if sys.version_info[0] == 2 else self.stringValue)
-            oprot.writeFieldEnd()
-        if self.boolValue is not None:
-            oprot.writeFieldBegin('boolValue', TType.BOOL, 2)
-            oprot.writeBool(self.boolValue)
-            oprot.writeFieldEnd()
-        if self.intValue is not None:
-            oprot.writeFieldBegin('intValue', TType.I32, 3)
-            oprot.writeI32(self.intValue)
-            oprot.writeFieldEnd()
-        if self.longValue is not None:
-            oprot.writeFieldBegin('longValue', TType.I64, 4)
-            oprot.writeI64(self.longValue)
-            oprot.writeFieldEnd()
-        if self.shortValue is not None:
-            oprot.writeFieldBegin('shortValue', TType.I16, 5)
-            oprot.writeI16(self.shortValue)
-            oprot.writeFieldEnd()
-        if self.doubleValue is not None:
-            oprot.writeFieldBegin('doubleValue', TType.DOUBLE, 6)
-            oprot.writeDouble(self.doubleValue)
-            oprot.writeFieldEnd()
-        if self.binaryValue is not None:
-            oprot.writeFieldBegin('binaryValue', TType.STRING, 7)
-            oprot.writeBinary(self.binaryValue)
-            oprot.writeFieldEnd()
-        if self.byteValue is not None:
-            oprot.writeFieldBegin('byteValue', TType.BYTE, 8)
-            oprot.writeByte(self.byteValue)
-            oprot.writeFieldEnd()
-        if self.intStringValue is not None:
-            oprot.writeFieldBegin('intStringValue', TType.STRUCT, 9)
-            self.intStringValue.write(oprot)
-            oprot.writeFieldEnd()
-        if self.intStringStringValue is not None:
-            oprot.writeFieldBegin('intStringStringValue', TType.STRUCT, 10)
-            self.intStringStringValue.write(oprot)
-            oprot.writeFieldEnd()
-        if self.longIntIntByteByteStringValue is not None:
-            oprot.writeFieldBegin('longIntIntByteByteStringValue', TType.STRUCT, 11)
-            self.longIntIntByteByteStringValue.write(oprot)
-            oprot.writeFieldEnd()
-        if self.intBooleanIntBooleanValue is not None:
-            oprot.writeFieldBegin('intBooleanIntBooleanValue', TType.STRUCT, 12)
-            self.intBooleanIntBooleanValue.write(oprot)
-            oprot.writeFieldEnd()
-        oprot.writeFieldStop()
-        oprot.writeStructEnd()
-
-    def validate(self):
-        return
-
-    def __repr__(self):
-        L = ['%s=%r' % (key, value)
-             for key, value in self.__dict__.items()]
-        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-    def __eq__(self, other):
-        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-    def __ne__(self, other):
-        return not (self == other)
-
-
-class TAnnotation(object):
-    """
-    Attributes:
-     - key
-     - value
-    """
-
-
-    def __init__(self, key=None, value=None,):
-        self.key = key
-        self.value = value
-
-    def read(self, iprot):
-        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
-            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
-            return
-        iprot.readStructBegin()
-        while True:
-            (fname, ftype, fid) = iprot.readFieldBegin()
-            if ftype == TType.STOP:
-                break
-            if fid == 1:
-                if ftype == TType.I32:
-                    self.key = iprot.readI32()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 2:
-                if ftype == TType.STRUCT:
-                    self.value = TAnnotationValue()
-                    self.value.read(iprot)
-                else:
-                    iprot.skip(ftype)
-            else:
-                iprot.skip(ftype)
-            iprot.readFieldEnd()
-        iprot.readStructEnd()
-
-    def write(self, oprot):
-        if oprot._fast_encode is not None and self.thrift_spec is not None:
-            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
-            return
-        oprot.writeStructBegin('TAnnotation')
-        if self.key is not None:
-            oprot.writeFieldBegin('key', TType.I32, 1)
-            oprot.writeI32(self.key)
-            oprot.writeFieldEnd()
-        if self.value is not None:
-            oprot.writeFieldBegin('value', TType.STRUCT, 2)
-            self.value.write(oprot)
-            oprot.writeFieldEnd()
-        oprot.writeFieldStop()
-        oprot.writeStructEnd()
-
-    def validate(self):
-        return
-
-    def __repr__(self):
-        L = ['%s=%r' % (key, value)
-             for key, value in self.__dict__.items()]
-        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-    def __eq__(self, other):
-        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-    def __ne__(self, other):
-        return not (self == other)
-
-
-class TSpanEvent(object):
-    """
-    Attributes:
-     - spanId
-     - sequence
-     - startElapsed
-     - endElapsed
-     - rpc
-     - serviceType
-     - endPoint
-     - annotations
-     - depth
-     - nextSpanId
-     - destinationId
-     - apiId
-     - exceptionInfo
-     - asyncId
-     - nextAsyncId
-     - asyncSequence
-    """
-
-
-    def __init__(self, spanId=None, sequence=None, startElapsed=None, endElapsed=0, rpc=None, serviceType=None, endPoint=None, annotations=None, depth=-1, nextSpanId=-1, destinationId=None, apiId=None, exceptionInfo=None, asyncId=None, nextAsyncId=None, asyncSequence=None,):
-        self.spanId = spanId
-        self.sequence = sequence
-        self.startElapsed = startElapsed
-        self.endElapsed = endElapsed
-        self.rpc = rpc
-        self.serviceType = serviceType
-        self.endPoint = endPoint
-        self.annotations = annotations
-        self.depth = depth
-        self.nextSpanId = nextSpanId
-        self.destinationId = destinationId
-        self.apiId = apiId
-        self.exceptionInfo = exceptionInfo
-        self.asyncId = asyncId
-        self.nextAsyncId = nextAsyncId
-        self.asyncSequence = asyncSequence
-
-    def read(self, iprot):
-        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
-            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
-            return
-        iprot.readStructBegin()
-        while True:
-            (fname, ftype, fid) = iprot.readFieldBegin()
-            if ftype == TType.STOP:
-                break
-            if fid == 7:
-                if ftype == TType.I64:
-                    self.spanId = iprot.readI64()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 8:
-                if ftype == TType.I16:
-                    self.sequence = iprot.readI16()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 9:
-                if ftype == TType.I32:
-                    self.startElapsed = iprot.readI32()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 10:
-                if ftype == TType.I32:
-                    self.endElapsed = iprot.readI32()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 11:
-                if ftype == TType.STRING:
-                    self.rpc = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 12:
-                if ftype == TType.I16:
-                    self.serviceType = iprot.readI16()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 13:
-                if ftype == TType.STRING:
-                    self.endPoint = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 14:
-                if ftype == TType.LIST:
-                    self.annotations = []
-                    (_etype3, _size0) = iprot.readListBegin()
-                    for _i4 in range(_size0):
-                        _elem5 = TAnnotation()
-                        _elem5.read(iprot)
-                        self.annotations.append(_elem5)
-                    iprot.readListEnd()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 15:
-                if ftype == TType.I32:
-                    self.depth = iprot.readI32()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 16:
-                if ftype == TType.I64:
-                    self.nextSpanId = iprot.readI64()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 20:
-                if ftype == TType.STRING:
-                    self.destinationId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 25:
-                if ftype == TType.I32:
-                    self.apiId = iprot.readI32()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 26:
-                if ftype == TType.STRUCT:
-                    self.exceptionInfo = TIntStringValue()
-                    self.exceptionInfo.read(iprot)
-                else:
-                    iprot.skip(ftype)
-            elif fid == 30:
-                if ftype == TType.I32:
-                    self.asyncId = iprot.readI32()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 31:
-                if ftype == TType.I32:
-                    self.nextAsyncId = iprot.readI32()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 32:
-                if ftype == TType.I16:
-                    self.asyncSequence = iprot.readI16()
-                else:
-                    iprot.skip(ftype)
-            else:
-                iprot.skip(ftype)
-            iprot.readFieldEnd()
-        iprot.readStructEnd()
-
-    def write(self, oprot):
-        if oprot._fast_encode is not None and self.thrift_spec is not None:
-            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
-            return
-        oprot.writeStructBegin('TSpanEvent')
-        if self.spanId is not None:
-            oprot.writeFieldBegin('spanId', TType.I64, 7)
-            oprot.writeI64(self.spanId)
-            oprot.writeFieldEnd()
-        if self.sequence is not None:
-            oprot.writeFieldBegin('sequence', TType.I16, 8)
-            oprot.writeI16(self.sequence)
-            oprot.writeFieldEnd()
-        if self.startElapsed is not None:
-            oprot.writeFieldBegin('startElapsed', TType.I32, 9)
-            oprot.writeI32(self.startElapsed)
-            oprot.writeFieldEnd()
-        if self.endElapsed is not None:
-            oprot.writeFieldBegin('endElapsed', TType.I32, 10)
-            oprot.writeI32(self.endElapsed)
-            oprot.writeFieldEnd()
-        if self.rpc is not None:
-            oprot.writeFieldBegin('rpc', TType.STRING, 11)
-            oprot.writeString(self.rpc.encode('utf-8') if sys.version_info[0] == 2 else self.rpc)
-            oprot.writeFieldEnd()
-        if self.serviceType is not None:
-            oprot.writeFieldBegin('serviceType', TType.I16, 12)
-            oprot.writeI16(self.serviceType)
-            oprot.writeFieldEnd()
-        if self.endPoint is not None:
-            oprot.writeFieldBegin('endPoint', TType.STRING, 13)
-            oprot.writeString(self.endPoint.encode('utf-8') if sys.version_info[0] == 2 else self.endPoint)
-            oprot.writeFieldEnd()
-        if self.annotations is not None:
-            oprot.writeFieldBegin('annotations', TType.LIST, 14)
-            oprot.writeListBegin(TType.STRUCT, len(self.annotations))
-            for iter6 in self.annotations:
-                iter6.write(oprot)
-            oprot.writeListEnd()
-            oprot.writeFieldEnd()
-        if self.depth is not None:
-            oprot.writeFieldBegin('depth', TType.I32, 15)
-            oprot.writeI32(self.depth)
-            oprot.writeFieldEnd()
-        if self.nextSpanId is not None:
-            oprot.writeFieldBegin('nextSpanId', TType.I64, 16)
-            oprot.writeI64(self.nextSpanId)
-            oprot.writeFieldEnd()
-        if self.destinationId is not None:
-            oprot.writeFieldBegin('destinationId', TType.STRING, 20)
-            oprot.writeString(self.destinationId.encode('utf-8') if sys.version_info[0] == 2 else self.destinationId)
-            oprot.writeFieldEnd()
-        if self.apiId is not None:
-            oprot.writeFieldBegin('apiId', TType.I32, 25)
-            oprot.writeI32(self.apiId)
-            oprot.writeFieldEnd()
-        if self.exceptionInfo is not None:
-            oprot.writeFieldBegin('exceptionInfo', TType.STRUCT, 26)
-            self.exceptionInfo.write(oprot)
-            oprot.writeFieldEnd()
-        if self.asyncId is not None:
-            oprot.writeFieldBegin('asyncId', TType.I32, 30)
-            oprot.writeI32(self.asyncId)
-            oprot.writeFieldEnd()
-        if self.nextAsyncId is not None:
-            oprot.writeFieldBegin('nextAsyncId', TType.I32, 31)
-            oprot.writeI32(self.nextAsyncId)
-            oprot.writeFieldEnd()
-        if self.asyncSequence is not None:
-            oprot.writeFieldBegin('asyncSequence', TType.I16, 32)
-            oprot.writeI16(self.asyncSequence)
-            oprot.writeFieldEnd()
-        oprot.writeFieldStop()
-        oprot.writeStructEnd()
-
-    def validate(self):
-        return
-
-    def __repr__(self):
-        L = ['%s=%r' % (key, value)
-             for key, value in self.__dict__.items()]
-        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-    def __eq__(self, other):
-        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-    def __ne__(self, other):
-        return not (self == other)
-
-
-class TSpan(object):
-    """
-    Attributes:
-     - agentId
-     - applicationName
-     - agentStartTime
-     - transactionId
-     - spanId
-     - parentSpanId
-     - startTime
-     - elapsed
-     - rpc
-     - serviceType
-     - endPoint
-     - remoteAddr
-     - annotations
-     - flag
-     - err
-     - spanEventList
-     - parentApplicationName
-     - parentApplicationType
-     - acceptorHost
-     - apiId
-     - exceptionInfo
-     - applicationServiceType
-     - loggingTransactionInfo
-    """
-
-
-    def __init__(self, agentId=None, applicationName=None, agentStartTime=None, transactionId=None, spanId=None, parentSpanId=-1, startTime=None, elapsed=0, rpc=None, serviceType=None, endPoint=None, remoteAddr=None, annotations=None, flag=0, err=None, spanEventList=None, parentApplicationName=None, parentApplicationType=None, acceptorHost=None, apiId=None, exceptionInfo=None, applicationServiceType=None, loggingTransactionInfo=None,):
-        self.agentId = agentId
-        self.applicationName = applicationName
-        self.agentStartTime = agentStartTime
-        self.transactionId = transactionId
-        self.spanId = spanId
-        self.parentSpanId = parentSpanId
-        self.startTime = startTime
-        self.elapsed = elapsed
-        self.rpc = rpc
-        self.serviceType = serviceType
-        self.endPoint = endPoint
-        self.remoteAddr = remoteAddr
-        self.annotations = annotations
-        self.flag = flag
-        self.err = err
-        self.spanEventList = spanEventList
-        self.parentApplicationName = parentApplicationName
-        self.parentApplicationType = parentApplicationType
-        self.acceptorHost = acceptorHost
-        self.apiId = apiId
-        self.exceptionInfo = exceptionInfo
-        self.applicationServiceType = applicationServiceType
-        self.loggingTransactionInfo = loggingTransactionInfo
-
-    def read(self, iprot):
-        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
-            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
-            return
-        iprot.readStructBegin()
-        while True:
-            (fname, ftype, fid) = iprot.readFieldBegin()
-            if ftype == TType.STOP:
-                break
-            if fid == 1:
-                if ftype == TType.STRING:
-                    self.agentId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 2:
-                if ftype == TType.STRING:
-                    self.applicationName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 3:
-                if ftype == TType.I64:
-                    self.agentStartTime = iprot.readI64()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 4:
-                if ftype == TType.STRING:
-                    self.transactionId = iprot.readBinary()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 7:
-                if ftype == TType.I64:
-                    self.spanId = iprot.readI64()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 8:
-                if ftype == TType.I64:
-                    self.parentSpanId = iprot.readI64()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 9:
-                if ftype == TType.I64:
-                    self.startTime = iprot.readI64()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 10:
-                if ftype == TType.I32:
-                    self.elapsed = iprot.readI32()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 11:
-                if ftype == TType.STRING:
-                    self.rpc = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 12:
-                if ftype == TType.I16:
-                    self.serviceType = iprot.readI16()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 13:
-                if ftype == TType.STRING:
-                    self.endPoint = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 14:
-                if ftype == TType.STRING:
-                    self.remoteAddr = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 15:
-                if ftype == TType.LIST:
-                    self.annotations = []
-                    (_etype10, _size7) = iprot.readListBegin()
-                    for _i11 in range(_size7):
-                        _elem12 = TAnnotation()
-                        _elem12.read(iprot)
-                        self.annotations.append(_elem12)
-                    iprot.readListEnd()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 16:
-                if ftype == TType.I16:
-                    self.flag = iprot.readI16()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 17:
-                if ftype == TType.I32:
-                    self.err = iprot.readI32()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 18:
-                if ftype == TType.LIST:
-                    self.spanEventList = []
-                    (_etype16, _size13) = iprot.readListBegin()
-                    for _i17 in range(_size13):
-                        _elem18 = TSpanEvent()
-                        _elem18.read(iprot)
-                        self.spanEventList.append(_elem18)
-                    iprot.readListEnd()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 19:
-                if ftype == TType.STRING:
-                    self.parentApplicationName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 20:
-                if ftype == TType.I16:
-                    self.parentApplicationType = iprot.readI16()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 21:
-                if ftype == TType.STRING:
-                    self.acceptorHost = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 25:
-                if ftype == TType.I32:
-                    self.apiId = iprot.readI32()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 26:
-                if ftype == TType.STRUCT:
-                    self.exceptionInfo = TIntStringValue()
-                    self.exceptionInfo.read(iprot)
-                else:
-                    iprot.skip(ftype)
-            elif fid == 30:
-                if ftype == TType.I16:
-                    self.applicationServiceType = iprot.readI16()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 31:
-                if ftype == TType.BYTE:
-                    self.loggingTransactionInfo = iprot.readByte()
-                else:
-                    iprot.skip(ftype)
-            else:
-                iprot.skip(ftype)
-            iprot.readFieldEnd()
-        iprot.readStructEnd()
-
-    def write(self, oprot):
-        if oprot._fast_encode is not None and self.thrift_spec is not None:
-            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
-            return
-        oprot.writeStructBegin('TSpan')
-        if self.agentId is not None:
-            oprot.writeFieldBegin('agentId', TType.STRING, 1)
-            oprot.writeString(self.agentId.encode('utf-8') if sys.version_info[0] == 2 else self.agentId)
-            oprot.writeFieldEnd()
-        if self.applicationName is not None:
-            oprot.writeFieldBegin('applicationName', TType.STRING, 2)
-            oprot.writeString(self.applicationName.encode('utf-8') if sys.version_info[0] == 2 else self.applicationName)
-            oprot.writeFieldEnd()
-        if self.agentStartTime is not None:
-            oprot.writeFieldBegin('agentStartTime', TType.I64, 3)
-            oprot.writeI64(self.agentStartTime)
-            oprot.writeFieldEnd()
-        if self.transactionId is not None:
-            oprot.writeFieldBegin('transactionId', TType.STRING, 4)
-            oprot.writeBinary(self.transactionId)
-            oprot.writeFieldEnd()
-        if self.spanId is not None:
-            oprot.writeFieldBegin('spanId', TType.I64, 7)
-            oprot.writeI64(self.spanId)
-            oprot.writeFieldEnd()
-        if self.parentSpanId is not None:
-            oprot.writeFieldBegin('parentSpanId', TType.I64, 8)
-            oprot.writeI64(self.parentSpanId)
-            oprot.writeFieldEnd()
-        if self.startTime is not None:
-            oprot.writeFieldBegin('startTime', TType.I64, 9)
-            oprot.writeI64(self.startTime)
-            oprot.writeFieldEnd()
-        if self.elapsed is not None:
-            oprot.writeFieldBegin('elapsed', TType.I32, 10)
-            oprot.writeI32(self.elapsed)
-            oprot.writeFieldEnd()
-        if self.rpc is not None:
-            oprot.writeFieldBegin('rpc', TType.STRING, 11)
-            oprot.writeString(self.rpc.encode('utf-8') if sys.version_info[0] == 2 else self.rpc)
-            oprot.writeFieldEnd()
-        if self.serviceType is not None:
-            oprot.writeFieldBegin('serviceType', TType.I16, 12)
-            oprot.writeI16(self.serviceType)
-            oprot.writeFieldEnd()
-        if self.endPoint is not None:
-            oprot.writeFieldBegin('endPoint', TType.STRING, 13)
-            oprot.writeString(self.endPoint.encode('utf-8') if sys.version_info[0] == 2 else self.endPoint)
-            oprot.writeFieldEnd()
-        if self.remoteAddr is not None:
-            oprot.writeFieldBegin('remoteAddr', TType.STRING, 14)
-            oprot.writeString(self.remoteAddr.encode('utf-8') if sys.version_info[0] == 2 else self.remoteAddr)
-            oprot.writeFieldEnd()
-        if self.annotations is not None:
-            oprot.writeFieldBegin('annotations', TType.LIST, 15)
-            oprot.writeListBegin(TType.STRUCT, len(self.annotations))
-            for iter19 in self.annotations:
-                iter19.write(oprot)
-            oprot.writeListEnd()
-            oprot.writeFieldEnd()
-        if self.flag is not None:
-            oprot.writeFieldBegin('flag', TType.I16, 16)
-            oprot.writeI16(self.flag)
-            oprot.writeFieldEnd()
-        if self.err is not None:
-            oprot.writeFieldBegin('err', TType.I32, 17)
-            oprot.writeI32(self.err)
-            oprot.writeFieldEnd()
-        if self.spanEventList is not None:
-            oprot.writeFieldBegin('spanEventList', TType.LIST, 18)
-            oprot.writeListBegin(TType.STRUCT, len(self.spanEventList))
-            for iter20 in self.spanEventList:
-                iter20.write(oprot)
-            oprot.writeListEnd()
-            oprot.writeFieldEnd()
-        if self.parentApplicationName is not None:
-            oprot.writeFieldBegin('parentApplicationName', TType.STRING, 19)
-            oprot.writeString(self.parentApplicationName.encode('utf-8') if sys.version_info[0] == 2 else self.parentApplicationName)
-            oprot.writeFieldEnd()
-        if self.parentApplicationType is not None:
-            oprot.writeFieldBegin('parentApplicationType', TType.I16, 20)
-            oprot.writeI16(self.parentApplicationType)
-            oprot.writeFieldEnd()
-        if self.acceptorHost is not None:
-            oprot.writeFieldBegin('acceptorHost', TType.STRING, 21)
-            oprot.writeString(self.acceptorHost.encode('utf-8') if sys.version_info[0] == 2 else self.acceptorHost)
-            oprot.writeFieldEnd()
-        if self.apiId is not None:
-            oprot.writeFieldBegin('apiId', TType.I32, 25)
-            oprot.writeI32(self.apiId)
-            oprot.writeFieldEnd()
-        if self.exceptionInfo is not None:
-            oprot.writeFieldBegin('exceptionInfo', TType.STRUCT, 26)
-            self.exceptionInfo.write(oprot)
-            oprot.writeFieldEnd()
-        if self.applicationServiceType is not None:
-            oprot.writeFieldBegin('applicationServiceType', TType.I16, 30)
-            oprot.writeI16(self.applicationServiceType)
-            oprot.writeFieldEnd()
-        if self.loggingTransactionInfo is not None:
-            oprot.writeFieldBegin('loggingTransactionInfo', TType.BYTE, 31)
-            oprot.writeByte(self.loggingTransactionInfo)
-            oprot.writeFieldEnd()
-        oprot.writeFieldStop()
-        oprot.writeStructEnd()
-
-    def validate(self):
-        return
-
-    def __repr__(self):
-        L = ['%s=%r' % (key, value)
-             for key, value in self.__dict__.items()]
-        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-    def __eq__(self, other):
-        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-    def __ne__(self, other):
-        return not (self == other)
-
-
-class TSpanChunk(object):
-    """
-    Attributes:
-     - agentId
-     - applicationName
-     - agentStartTime
-     - serviceType
-     - transactionId
-     - spanId
-     - endPoint
-     - spanEventList
-     - applicationServiceType
-    """
-
-
-    def __init__(self, agentId=None, applicationName=None, agentStartTime=None, serviceType=None, transactionId=None, spanId=None, endPoint=None, spanEventList=None, applicationServiceType=None,):
-        self.agentId = agentId
-        self.applicationName = applicationName
-        self.agentStartTime = agentStartTime
-        self.serviceType = serviceType
-        self.transactionId = transactionId
-        self.spanId = spanId
-        self.endPoint = endPoint
-        self.spanEventList = spanEventList
-        self.applicationServiceType = applicationServiceType
-
-    def read(self, iprot):
-        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
-            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
-            return
-        iprot.readStructBegin()
-        while True:
-            (fname, ftype, fid) = iprot.readFieldBegin()
-            if ftype == TType.STOP:
-                break
-            if fid == 1:
-                if ftype == TType.STRING:
-                    self.agentId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 2:
-                if ftype == TType.STRING:
-                    self.applicationName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 3:
-                if ftype == TType.I64:
-                    self.agentStartTime = iprot.readI64()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 4:
-                if ftype == TType.I16:
-                    self.serviceType = iprot.readI16()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 5:
-                if ftype == TType.STRING:
-                    self.transactionId = iprot.readBinary()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 8:
-                if ftype == TType.I64:
-                    self.spanId = iprot.readI64()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 9:
-                if ftype == TType.STRING:
-                    self.endPoint = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 10:
-                if ftype == TType.LIST:
-                    self.spanEventList = []
-                    (_etype24, _size21) = iprot.readListBegin()
-                    for _i25 in range(_size21):
-                        _elem26 = TSpanEvent()
-                        _elem26.read(iprot)
-                        self.spanEventList.append(_elem26)
-                    iprot.readListEnd()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 11:
-                if ftype == TType.I16:
-                    self.applicationServiceType = iprot.readI16()
-                else:
-                    iprot.skip(ftype)
-            else:
-                iprot.skip(ftype)
-            iprot.readFieldEnd()
-        iprot.readStructEnd()
-
-    def write(self, oprot):
-        if oprot._fast_encode is not None and self.thrift_spec is not None:
-            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
-            return
-        oprot.writeStructBegin('TSpanChunk')
-        if self.agentId is not None:
-            oprot.writeFieldBegin('agentId', TType.STRING, 1)
-            oprot.writeString(self.agentId.encode('utf-8') if sys.version_info[0] == 2 else self.agentId)
-            oprot.writeFieldEnd()
-        if self.applicationName is not None:
-            oprot.writeFieldBegin('applicationName', TType.STRING, 2)
-            oprot.writeString(self.applicationName.encode('utf-8') if sys.version_info[0] == 2 else self.applicationName)
-            oprot.writeFieldEnd()
-        if self.agentStartTime is not None:
-            oprot.writeFieldBegin('agentStartTime', TType.I64, 3)
-            oprot.writeI64(self.agentStartTime)
-            oprot.writeFieldEnd()
-        if self.serviceType is not None:
-            oprot.writeFieldBegin('serviceType', TType.I16, 4)
-            oprot.writeI16(self.serviceType)
-            oprot.writeFieldEnd()
-        if self.transactionId is not None:
-            oprot.writeFieldBegin('transactionId', TType.STRING, 5)
-            oprot.writeBinary(self.transactionId)
-            oprot.writeFieldEnd()
-        if self.spanId is not None:
-            oprot.writeFieldBegin('spanId', TType.I64, 8)
-            oprot.writeI64(self.spanId)
-            oprot.writeFieldEnd()
-        if self.endPoint is not None:
-            oprot.writeFieldBegin('endPoint', TType.STRING, 9)
-            oprot.writeString(self.endPoint.encode('utf-8') if sys.version_info[0] == 2 else self.endPoint)
-            oprot.writeFieldEnd()
-        if self.spanEventList is not None:
-            oprot.writeFieldBegin('spanEventList', TType.LIST, 10)
-            oprot.writeListBegin(TType.STRUCT, len(self.spanEventList))
-            for iter27 in self.spanEventList:
-                iter27.write(oprot)
-            oprot.writeListEnd()
-            oprot.writeFieldEnd()
-        if self.applicationServiceType is not None:
-            oprot.writeFieldBegin('applicationServiceType', TType.I16, 11)
-            oprot.writeI16(self.applicationServiceType)
-            oprot.writeFieldEnd()
-        oprot.writeFieldStop()
-        oprot.writeStructEnd()
-
-    def validate(self):
-        return
-
-    def __repr__(self):
-        L = ['%s=%r' % (key, value)
-             for key, value in self.__dict__.items()]
-        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-    def __eq__(self, other):
-        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-    def __ne__(self, other):
-        return not (self == other)
-
-
-class TStringMetaData(object):
-    """
-    Attributes:
-     - agentId
-     - agentStartTime
-     - stringId
-     - stringValue
-    """
-
-
-    def __init__(self, agentId=None, agentStartTime=None, stringId=None, stringValue=None,):
-        self.agentId = agentId
-        self.agentStartTime = agentStartTime
-        self.stringId = stringId
-        self.stringValue = stringValue
-
-    def read(self, iprot):
-        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
-            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
-            return
-        iprot.readStructBegin()
-        while True:
-            (fname, ftype, fid) = iprot.readFieldBegin()
-            if ftype == TType.STOP:
-                break
-            if fid == 1:
-                if ftype == TType.STRING:
-                    self.agentId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 2:
-                if ftype == TType.I64:
-                    self.agentStartTime = iprot.readI64()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 4:
-                if ftype == TType.I32:
-                    self.stringId = iprot.readI32()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 5:
-                if ftype == TType.STRING:
-                    self.stringValue = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            else:
-                iprot.skip(ftype)
-            iprot.readFieldEnd()
-        iprot.readStructEnd()
-
-    def write(self, oprot):
-        if oprot._fast_encode is not None and self.thrift_spec is not None:
-            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
-            return
-        oprot.writeStructBegin('TStringMetaData')
-        if self.agentId is not None:
-            oprot.writeFieldBegin('agentId', TType.STRING, 1)
-            oprot.writeString(self.agentId.encode('utf-8') if sys.version_info[0] == 2 else self.agentId)
-            oprot.writeFieldEnd()
-        if self.agentStartTime is not None:
-            oprot.writeFieldBegin('agentStartTime', TType.I64, 2)
-            oprot.writeI64(self.agentStartTime)
-            oprot.writeFieldEnd()
-        if self.stringId is not None:
-            oprot.writeFieldBegin('stringId', TType.I32, 4)
-            oprot.writeI32(self.stringId)
-            oprot.writeFieldEnd()
-        if self.stringValue is not None:
-            oprot.writeFieldBegin('stringValue', TType.STRING, 5)
-            oprot.writeString(self.stringValue.encode('utf-8') if sys.version_info[0] == 2 else self.stringValue)
-            oprot.writeFieldEnd()
-        oprot.writeFieldStop()
-        oprot.writeStructEnd()
-
-    def validate(self):
-        return
-
-    def __repr__(self):
-        L = ['%s=%r' % (key, value)
-             for key, value in self.__dict__.items()]
-        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-    def __eq__(self, other):
-        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-    def __ne__(self, other):
-        return not (self == other)
-
-
-class TSqlMetaData(object):
-    """
-    Attributes:
-     - agentId
-     - agentStartTime
-     - sqlId
-     - sql
-    """
-
-
-    def __init__(self, agentId=None, agentStartTime=None, sqlId=None, sql=None,):
-        self.agentId = agentId
-        self.agentStartTime = agentStartTime
-        self.sqlId = sqlId
-        self.sql = sql
-
-    def read(self, iprot):
-        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
-            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
-            return
-        iprot.readStructBegin()
-        while True:
-            (fname, ftype, fid) = iprot.readFieldBegin()
-            if ftype == TType.STOP:
-                break
-            if fid == 1:
-                if ftype == TType.STRING:
-                    self.agentId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 2:
-                if ftype == TType.I64:
-                    self.agentStartTime = iprot.readI64()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 4:
-                if ftype == TType.I32:
-                    self.sqlId = iprot.readI32()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 5:
-                if ftype == TType.STRING:
-                    self.sql = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            else:
-                iprot.skip(ftype)
-            iprot.readFieldEnd()
-        iprot.readStructEnd()
-
-    def write(self, oprot):
-        if oprot._fast_encode is not None and self.thrift_spec is not None:
-            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
-            return
-        oprot.writeStructBegin('TSqlMetaData')
-        if self.agentId is not None:
-            oprot.writeFieldBegin('agentId', TType.STRING, 1)
-            oprot.writeString(self.agentId.encode('utf-8') if sys.version_info[0] == 2 else self.agentId)
-            oprot.writeFieldEnd()
-        if self.agentStartTime is not None:
-            oprot.writeFieldBegin('agentStartTime', TType.I64, 2)
-            oprot.writeI64(self.agentStartTime)
-            oprot.writeFieldEnd()
-        if self.sqlId is not None:
-            oprot.writeFieldBegin('sqlId', TType.I32, 4)
-            oprot.writeI32(self.sqlId)
-            oprot.writeFieldEnd()
-        if self.sql is not None:
-            oprot.writeFieldBegin('sql', TType.STRING, 5)
-            oprot.writeString(self.sql.encode('utf-8') if sys.version_info[0] == 2 else self.sql)
-            oprot.writeFieldEnd()
-        oprot.writeFieldStop()
-        oprot.writeStructEnd()
-
-    def validate(self):
-        return
-
-    def __repr__(self):
-        L = ['%s=%r' % (key, value)
-             for key, value in self.__dict__.items()]
-        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-    def __eq__(self, other):
-        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-    def __ne__(self, other):
-        return not (self == other)
-
-
-class TApiMetaData(object):
-    """
-    Attributes:
-     - agentId
-     - agentStartTime
-     - apiId
-     - apiInfo
-     - line
-     - type
-    """
-
-
-    def __init__(self, agentId=None, agentStartTime=None, apiId=None, apiInfo=None, line=None, type=None,):
-        self.agentId = agentId
-        self.agentStartTime = agentStartTime
-        self.apiId = apiId
-        self.apiInfo = apiInfo
-        self.line = line
-        self.type = type
-
-    def read(self, iprot):
-        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
-            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
-            return
-        iprot.readStructBegin()
-        while True:
-            (fname, ftype, fid) = iprot.readFieldBegin()
-            if ftype == TType.STOP:
-                break
-            if fid == 1:
-                if ftype == TType.STRING:
-                    self.agentId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 2:
-                if ftype == TType.I64:
-                    self.agentStartTime = iprot.readI64()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 4:
-                if ftype == TType.I32:
-                    self.apiId = iprot.readI32()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 5:
-                if ftype == TType.STRING:
-                    self.apiInfo = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 6:
-                if ftype == TType.I32:
-                    self.line = iprot.readI32()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 10:
-                if ftype == TType.I32:
-                    self.type = iprot.readI32()
-                else:
-                    iprot.skip(ftype)
-            else:
-                iprot.skip(ftype)
-            iprot.readFieldEnd()
-        iprot.readStructEnd()
-
-    def write(self, oprot):
-        if oprot._fast_encode is not None and self.thrift_spec is not None:
-            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
-            return
-        oprot.writeStructBegin('TApiMetaData')
-        if self.agentId is not None:
-            oprot.writeFieldBegin('agentId', TType.STRING, 1)
-            oprot.writeString(self.agentId.encode('utf-8') if sys.version_info[0] == 2 else self.agentId)
-            oprot.writeFieldEnd()
-        if self.agentStartTime is not None:
-            oprot.writeFieldBegin('agentStartTime', TType.I64, 2)
-            oprot.writeI64(self.agentStartTime)
-            oprot.writeFieldEnd()
-        if self.apiId is not None:
-            oprot.writeFieldBegin('apiId', TType.I32, 4)
-            oprot.writeI32(self.apiId)
-            oprot.writeFieldEnd()
-        if self.apiInfo is not None:
-            oprot.writeFieldBegin('apiInfo', TType.STRING, 5)
-            oprot.writeString(self.apiInfo.encode('utf-8') if sys.version_info[0] == 2 else self.apiInfo)
-            oprot.writeFieldEnd()
-        if self.line is not None:
-            oprot.writeFieldBegin('line', TType.I32, 6)
-            oprot.writeI32(self.line)
-            oprot.writeFieldEnd()
-        if self.type is not None:
-            oprot.writeFieldBegin('type', TType.I32, 10)
-            oprot.writeI32(self.type)
-            oprot.writeFieldEnd()
-        oprot.writeFieldStop()
-        oprot.writeStructEnd()
-
-    def validate(self):
-        return
-
-    def __repr__(self):
-        L = ['%s=%r' % (key, value)
-             for key, value in self.__dict__.items()]
-        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-    def __eq__(self, other):
-        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-    def __ne__(self, other):
-        return not (self == other)
-
-
-class TResult(object):
-    """
-    Attributes:
-     - success
-     - message
-    """
-
-
-    def __init__(self, success=None, message=None,):
-        self.success = success
-        self.message = message
-
-    def read(self, iprot):
-        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
-            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
-            return
-        iprot.readStructBegin()
-        while True:
-            (fname, ftype, fid) = iprot.readFieldBegin()
-            if ftype == TType.STOP:
-                break
-            if fid == 1:
-                if ftype == TType.BOOL:
-                    self.success = iprot.readBool()
-                else:
-                    iprot.skip(ftype)
-            elif fid == 2:
-                if ftype == TType.STRING:
-                    self.message = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
-                else:
-                    iprot.skip(ftype)
-            else:
-                iprot.skip(ftype)
-            iprot.readFieldEnd()
-        iprot.readStructEnd()
-
-    def write(self, oprot):
-        if oprot._fast_encode is not None and self.thrift_spec is not None:
-            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
-            return
-        oprot.writeStructBegin('TResult')
-        if self.success is not None:
-            oprot.writeFieldBegin('success', TType.BOOL, 1)
-            oprot.writeBool(self.success)
-            oprot.writeFieldEnd()
-        if self.message is not None:
-            oprot.writeFieldBegin('message', TType.STRING, 2)
-            oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message)
-            oprot.writeFieldEnd()
-        oprot.writeFieldStop()
-        oprot.writeStructEnd()
-
-    def validate(self):
-        return
-
-    def __repr__(self):
-        L = ['%s=%r' % (key, value)
-             for key, value in self.__dict__.items()]
-        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-    def __eq__(self, other):
-        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-    def __ne__(self, other):
-        return not (self == other)
-all_structs.append(TIntStringValue)
-TIntStringValue.thrift_spec = (
-    None,  # 0
-    (1, TType.I32, 'intValue', None, None, ),  # 1
-    (2, TType.STRING, 'stringValue', 'UTF8', None, ),  # 2
-)
-all_structs.append(TIntStringStringValue)
-TIntStringStringValue.thrift_spec = (
-    None,  # 0
-    (1, TType.I32, 'intValue', None, None, ),  # 1
-    (2, TType.STRING, 'stringValue1', 'UTF8', None, ),  # 2
-    (3, TType.STRING, 'stringValue2', 'UTF8', None, ),  # 3
-)
-all_structs.append(TLongIntIntByteByteStringValue)
-TLongIntIntByteByteStringValue.thrift_spec = (
-    None,  # 0
-    (1, TType.I64, 'longValue', None, None, ),  # 1
-    (2, TType.I32, 'intValue1', None, None, ),  # 2
-    (3, TType.I32, 'intValue2', None, None, ),  # 3
-    (4, TType.BYTE, 'byteValue1', None, None, ),  # 4
-    (5, TType.BYTE, 'byteValue2', None, None, ),  # 5
-    (6, TType.STRING, 'stringValue', 'UTF8', None, ),  # 6
-)
-all_structs.append(TIntBooleanIntBooleanValue)
-TIntBooleanIntBooleanValue.thrift_spec = (
-    None,  # 0
-    (1, TType.I32, 'intValue1', None, None, ),  # 1
-    (2, TType.BOOL, 'boolValue1', None, None, ),  # 2
-    (3, TType.I32, 'intValue2', None, None, ),  # 3
-    (4, TType.BOOL, 'boolValue2', None, None, ),  # 4
-)
-all_structs.append(TAnnotationValue)
-TAnnotationValue.thrift_spec = (
-    None,  # 0
-    (1, TType.STRING, 'stringValue', 'UTF8', None, ),  # 1
-    (2, TType.BOOL, 'boolValue', None, None, ),  # 2
-    (3, TType.I32, 'intValue', None, None, ),  # 3
-    (4, TType.I64, 'longValue', None, None, ),  # 4
-    (5, TType.I16, 'shortValue', None, None, ),  # 5
-    (6, TType.DOUBLE, 'doubleValue', None, None, ),  # 6
-    (7, TType.STRING, 'binaryValue', 'BINARY', None, ),  # 7
-    (8, TType.BYTE, 'byteValue', None, None, ),  # 8
-    (9, TType.STRUCT, 'intStringValue', [TIntStringValue, None], None, ),  # 9
-    (10, TType.STRUCT, 'intStringStringValue', [TIntStringStringValue, None], None, ),  # 10
-    (11, TType.STRUCT, 'longIntIntByteByteStringValue', [TLongIntIntByteByteStringValue, None], None, ),  # 11
-    (12, TType.STRUCT, 'intBooleanIntBooleanValue', [TIntBooleanIntBooleanValue, None], None, ),  # 12
-)
-all_structs.append(TAnnotation)
-TAnnotation.thrift_spec = (
-    None,  # 0
-    (1, TType.I32, 'key', None, None, ),  # 1
-    (2, TType.STRUCT, 'value', [TAnnotationValue, None], None, ),  # 2
-)
-all_structs.append(TSpanEvent)
-TSpanEvent.thrift_spec = (
-    None,  # 0
-    None,  # 1
-    None,  # 2
-    None,  # 3
-    None,  # 4
-    None,  # 5
-    None,  # 6
-    (7, TType.I64, 'spanId', None, None, ),  # 7
-    (8, TType.I16, 'sequence', None, None, ),  # 8
-    (9, TType.I32, 'startElapsed', None, None, ),  # 9
-    (10, TType.I32, 'endElapsed', None, 0, ),  # 10
-    (11, TType.STRING, 'rpc', 'UTF8', None, ),  # 11
-    (12, TType.I16, 'serviceType', None, None, ),  # 12
-    (13, TType.STRING, 'endPoint', 'UTF8', None, ),  # 13
-    (14, TType.LIST, 'annotations', (TType.STRUCT, [TAnnotation, None], False), None, ),  # 14
-    (15, TType.I32, 'depth', None, -1, ),  # 15
-    (16, TType.I64, 'nextSpanId', None, -1, ),  # 16
-    None,  # 17
-    None,  # 18
-    None,  # 19
-    (20, TType.STRING, 'destinationId', 'UTF8', None, ),  # 20
-    None,  # 21
-    None,  # 22
-    None,  # 23
-    None,  # 24
-    (25, TType.I32, 'apiId', None, None, ),  # 25
-    (26, TType.STRUCT, 'exceptionInfo', [TIntStringValue, None], None, ),  # 26
-    None,  # 27
-    None,  # 28
-    None,  # 29
-    (30, TType.I32, 'asyncId', None, None, ),  # 30
-    (31, TType.I32, 'nextAsyncId', None, None, ),  # 31
-    (32, TType.I16, 'asyncSequence', None, None, ),  # 32
-)
-all_structs.append(TSpan)
-TSpan.thrift_spec = (
-    None,  # 0
-    (1, TType.STRING, 'agentId', 'UTF8', None, ),  # 1
-    (2, TType.STRING, 'applicationName', 'UTF8', None, ),  # 2
-    (3, TType.I64, 'agentStartTime', None, None, ),  # 3
-    (4, TType.STRING, 'transactionId', 'BINARY', None, ),  # 4
-    None,  # 5
-    None,  # 6
-    (7, TType.I64, 'spanId', None, None, ),  # 7
-    (8, TType.I64, 'parentSpanId', None, -1, ),  # 8
-    (9, TType.I64, 'startTime', None, None, ),  # 9
-    (10, TType.I32, 'elapsed', None, 0, ),  # 10
-    (11, TType.STRING, 'rpc', 'UTF8', None, ),  # 11
-    (12, TType.I16, 'serviceType', None, None, ),  # 12
-    (13, TType.STRING, 'endPoint', 'UTF8', None, ),  # 13
-    (14, TType.STRING, 'remoteAddr', 'UTF8', None, ),  # 14
-    (15, TType.LIST, 'annotations', (TType.STRUCT, [TAnnotation, None], False), None, ),  # 15
-    (16, TType.I16, 'flag', None, 0, ),  # 16
-    (17, TType.I32, 'err', None, None, ),  # 17
-    (18, TType.LIST, 'spanEventList', (TType.STRUCT, [TSpanEvent, None], False), None, ),  # 18
-    (19, TType.STRING, 'parentApplicationName', 'UTF8', None, ),  # 19
-    (20, TType.I16, 'parentApplicationType', None, None, ),  # 20
-    (21, TType.STRING, 'acceptorHost', 'UTF8', None, ),  # 21
-    None,  # 22
-    None,  # 23
-    None,  # 24
-    (25, TType.I32, 'apiId', None, None, ),  # 25
-    (26, TType.STRUCT, 'exceptionInfo', [TIntStringValue, None], None, ),  # 26
-    None,  # 27
-    None,  # 28
-    None,  # 29
-    (30, TType.I16, 'applicationServiceType', None, None, ),  # 30
-    (31, TType.BYTE, 'loggingTransactionInfo', None, None, ),  # 31
-)
-all_structs.append(TSpanChunk)
-TSpanChunk.thrift_spec = (
-    None,  # 0
-    (1, TType.STRING, 'agentId', 'UTF8', None, ),  # 1
-    (2, TType.STRING, 'applicationName', 'UTF8', None, ),  # 2
-    (3, TType.I64, 'agentStartTime', None, None, ),  # 3
-    (4, TType.I16, 'serviceType', None, None, ),  # 4
-    (5, TType.STRING, 'transactionId', 'BINARY', None, ),  # 5
-    None,  # 6
-    None,  # 7
-    (8, TType.I64, 'spanId', None, None, ),  # 8
-    (9, TType.STRING, 'endPoint', 'UTF8', None, ),  # 9
-    (10, TType.LIST, 'spanEventList', (TType.STRUCT, [TSpanEvent, None], False), None, ),  # 10
-    (11, TType.I16, 'applicationServiceType', None, None, ),  # 11
-)
-all_structs.append(TStringMetaData)
-TStringMetaData.thrift_spec = (
-    None,  # 0
-    (1, TType.STRING, 'agentId', 'UTF8', None, ),  # 1
-    (2, TType.I64, 'agentStartTime', None, None, ),  # 2
-    None,  # 3
-    (4, TType.I32, 'stringId', None, None, ),  # 4
-    (5, TType.STRING, 'stringValue', 'UTF8', None, ),  # 5
-)
-all_structs.append(TSqlMetaData)
-TSqlMetaData.thrift_spec = (
-    None,  # 0
-    (1, TType.STRING, 'agentId', 'UTF8', None, ),  # 1
-    (2, TType.I64, 'agentStartTime', None, None, ),  # 2
-    None,  # 3
-    (4, TType.I32, 'sqlId', None, None, ),  # 4
-    (5, TType.STRING, 'sql', 'UTF8', None, ),  # 5
-)
-all_structs.append(TApiMetaData)
-TApiMetaData.thrift_spec = (
-    None,  # 0
-    (1, TType.STRING, 'agentId', 'UTF8', None, ),  # 1
-    (2, TType.I64, 'agentStartTime', None, None, ),  # 2
-    None,  # 3
-    (4, TType.I32, 'apiId', None, None, ),  # 4
-    (5, TType.STRING, 'apiInfo', 'UTF8', None, ),  # 5
-    (6, TType.I32, 'line', None, None, ),  # 6
-    None,  # 7
-    None,  # 8
-    None,  # 9
-    (10, TType.I32, 'type', None, None, ),  # 10
-)
-all_structs.append(TResult)
-TResult.thrift_spec = (
-    None,  # 0
-    (1, TType.BOOL, 'success', None, None, ),  # 1
-    (2, TType.STRING, 'message', 'UTF8', None, ),  # 2
-)
-fix_spec(all_structs)
-del all_structs
diff --git a/collector-agent/Proto/Trift/__init__.py b/collector-agent/Proto/Trift/__init__.py
deleted file mode 100644
index c74179376..000000000
--- a/collector-agent/Proto/Trift/__init__.py
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-# Created by eeliu at 9/4/19
\ No newline at end of file
diff --git a/collector-agent/Proto/grpc/.gitignore b/collector-agent/Proto/grpc/.gitignore
deleted file mode 100644
index 8e5bbf044..000000000
--- a/collector-agent/Proto/grpc/.gitignore
+++ /dev/null
@@ -1,1 +0,0 @@
-*.py
\ No newline at end of file
diff --git a/collector-agent/agent/AgentRouter.go b/collector-agent/agent/AgentRouter.go
new file mode 100644
index 000000000..e4fd7e581
--- /dev/null
+++ b/collector-agent/agent/AgentRouter.go
@@ -0,0 +1,138 @@
+package agent
+
+import (
+	"CollectorAgent/common"
+	"encoding/json"
+	"errors"
+	"fmt"
+	"strconv"
+	"strings"
+	"sync"
+	"time"
+
+	log "github.com/sirupsen/logrus"
+)
+
+type RawPacket struct {
+	Type    uint32
+	RawData []byte
+}
+
+type I_PacketRouter interface {
+	DispatchPacket(*RawPacket) error
+	Clean()
+}
+
+type AgentRouter struct {
+	AgentMap map[string]*GrpcAgent
+	PingId   int32
+	Quit     chan bool
+	WG       *sync.WaitGroup
+	rwMutex  sync.RWMutex
+}
+
+func (manager *AgentRouter) Clean() {
+	config := common.GetConfig()
+	ctime := time.Now().Unix()
+	manager.rwMutex.RLock()
+	for id, agent := range manager.AgentMap {
+		if agent.GetLastBusyTime()+int64(config.AgentFreeOnlineSurvivalTimeSec) < ctime {
+			log.Warnf("agent:%s expired after:%d sec. busyTime:%d", agent, config.AgentFreeOnlineSurvivalTimeSec, agent.GetLastBusyTime())
+			manager.rwMutex.RUnlock()
+			manager.rwMutex.Lock()
+			delete(manager.AgentMap, id)
+			agent.Stop()
+			manager.rwMutex.Unlock()
+			manager.rwMutex.RLock()
+		}
+	}
+	manager.rwMutex.RUnlock()
+}
+
+func (manager *AgentRouter) _createAgent(id, name string, agentType int32, startTime string) *GrpcAgent {
+	agent := GrpcAgent{PingId: manager.PingId, AgentOnLine: false}
+	manager.PingId += 1
+	agent.Init(id, name, agentType, startTime)
+	agent.Start()
+
+	log.Infof("agent:%v is launched", &agent)
+	return &agent
+}
+
+func GetAgentInfo(span map[string]interface{}) (id, name string, ft int32, startTime string, err error) {
+	if value, OK := span["appid"].(string); !OK {
+		return "", "", 0, "", errors.New("no appid")
+	} else {
+		id = value
+	}
+
+	if value, OK := span["appname"].(string); !OK {
+		return "", "", 0, "", errors.New("no appname")
+	} else {
+		name = value
+	}
+
+	if value, OK := span["FT"].(float64); !OK {
+		return "", "", 0, "", errors.New("no FT")
+	} else {
+		ft = int32(value)
+	}
+
+	// new feat: get current startTime
+	if value, OK := span["tid"].(string); OK {
+		holder := strings.Split(value, "^")
+		if len(holder) < 3 {
+			log.Warn("tid in wrong format")
+		}
+		startTime = holder[1] + "000"
+	} else {
+		startTime = strconv.FormatInt(common.GetConfig().StartTime, 10) + "000"
+	}
+
+	return id, name, ft, startTime, nil
+}
+
+func (manager *AgentRouter) DispatchPacket(packet *RawPacket) error {
+	var span map[string]interface{}
+	if err := json.Unmarshal(packet.RawData, &span); err != nil {
+		log.Warnf("Catches unjson-serialized data %s", packet.RawData)
+		goto PACKET_INVALIED
+	}
+
+	if id, name, ft, startTime, err := GetAgentInfo(span); err == nil {
+		manager.rwMutex.RLock()
+		log.Debug("Read-lock is holding")
+		agent, OK := manager.AgentMap[id]
+		if !OK {
+			// create a new agent
+			manager.rwMutex.RUnlock()
+			log.Infof("agent:%s not find, create a new agent.", id)
+			log.Debug("Try to get write-lock")
+			manager.rwMutex.Lock()
+			log.Debug("Write-lock is holding")
+			if _t, OK := manager.AgentMap[id]; OK {
+				agent = _t
+			} else {
+				agent = manager._createAgent(id, name, ft, startTime)
+			}
+			manager.AgentMap[id] = agent
+
+			manager.rwMutex.Unlock()
+			log.Debug("Write-lock is release")
+		} else {
+			manager.rwMutex.RUnlock()
+			log.Debug("Read-lock is release")
+		}
+
+		agent.CheckValid(name, ft) // CA just checking the name and ft
+		agent.SendSpan(span)
+		return nil
+
+	} else {
+		log.Warn(err)
+		return err
+	}
+
+PACKET_INVALIED:
+	return errors.New(fmt.Sprintf("input packet invalid %s", packet.RawData))
+}
diff --git a/collector-agent/agent/Filter.go b/collector-agent/agent/Filter.go
new file mode 100644
index 000000000..fa18f95f9
--- /dev/null
+++ b/collector-agent/agent/Filter.go
@@ -0,0 +1,5 @@
+package agent
+
+type Filter interface {
+	Interceptor(map[string]interface{}) bool
+}
diff --git a/collector-agent/agent/GrpcAgent.go b/collector-agent/agent/GrpcAgent.go
new file mode 100644
index 000000000..f8b4a7ca6
--- /dev/null
+++ b/collector-agent/agent/GrpcAgent.go
@@ -0,0 +1,445 @@
+package agent
+
+import (
+	"CollectorAgent/common"
+	v1 "CollectorAgent/protocol"
+	"context"
+	"errors"
+	"fmt"
+	"strconv"
+	"sync"
+	"time"
+
+	log "github.com/sirupsen/logrus"
+	"google.golang.org/grpc"
+	"google.golang.org/grpc/metadata"
+	"google.golang.org/protobuf/types/known/wrapperspb"
+)
+
+type GrpcAgent struct {
+	AgentId        string
+	agentName      string
+	agentType      int32
+	StartTime      string
+	BaseMD         metadata.MD
+	pingMd         metadata.MD
+	PingId         int32
+	spanFilter     []Filter
+	spanSender     SpanSender
+	AgentOnLine    bool
+	requestCounter RequestProfiler
+	tasksGroup     sync.WaitGroup
+	jsonSpan       chan map[string]interface{}
+	ExitCh         chan bool
+	log            *log.Entry
+}
+
+func (agent *GrpcAgent) SendSpan(span map[string]interface{}) {
+	defer func() {
+		if r := recover(); r != nil {
+			log.Warnf("sendSpan met:%s", r)
+		}
+	}()
+
+	agent.jsonSpan <- span
+}
+
+func (agent *GrpcAgent) GetLastBusyTime() int64 {
+	return agent.requestCounter.CTime
+}
+
+func (agent *GrpcAgent) Stop() {
+	agent.log.Warn("I'm exiting")
+	close(agent.jsonSpan)
+	close(agent.ExitCh)
+	agent.tasksGroup.Wait()
+	agent.log.Warn("I'm exit")
+}
+
+func (agent *GrpcAgent) AddFilter(filter Filter) {
+	agent.spanFilter = append(agent.spanFilter, filter)
+}
+
+func (agent *GrpcAgent) Interceptor(map[string]interface{}) bool {
+	return agent.AgentOnLine
+}
+
+func (agent *GrpcAgent) String() string {
+	return fmt.Sprintf("id:%s name:%s type:%d startTime:%s", agent.AgentId, agent.agentName, agent.agentType, agent.StartTime)
+}
+
+func (agent *GrpcAgent) agentOnline() error {
+
+	commandTask := sync.WaitGroup{}
+	defer commandTask.Wait()
+
+	config := common.GetConfig()
+	agent.log.Debugf("connect AgentChannel:%s for agentOnline", config.AgentAddress)
+
+	conn, err := common.CreateGrpcConnection(config.AgentAddress)
+	if err != nil {
+		agent.log.Warnf("connect %s timeout", config.AgentAddress)
+		return errors.New("connect pinpoint-collector timeout")
+	}
+
+	defer func() {
+		agent.log.Info("client activity close grpc connection")
+		if err := conn.Close(); err != nil {
+			agent.log.Warnf("close connection:%s", err)
+		}
+	}()
+
+	client := v1.NewAgentClient(conn)
+	ctx, cancel := common.BuildPinpointCtx(config.GrpcConTextTimeOutSec, agent.BaseMD)
+	defer cancel()
+	pbAgentInfo := common.GetPBAgentInfo(agent.agentType)
+	agent.log.Debugf("RequestAgentInfo pbAgentInfo:%v", pbAgentInfo)
+	if res, err := client.RequestAgentInfo(ctx, &pbAgentInfo); err != nil {
+		errorMsg := fmt.Sprintf("RequestAgentInfo failed. %s", err)
+		agent.log.Warn(errorMsg)
+		return errors.New(errorMsg)
+	} else {
+		agent.log.Debugf("RequestAgentInfo response:%s", res)
+	}
+
+	// send ping
+	pingCtx := metadata.NewOutgoingContext(context.Background(), agent.pingMd)
+
+	stream, err := client.PingSession(pingCtx)
+	if err != nil {
+		errorMsg := fmt.Sprintf("Get PingSession Failed:%s", err)
+		agent.log.Error(errorMsg)
+		return errors.New(errorMsg)
+	}
+
+	defer func() {
+		if err := stream.CloseSend(); err != nil {
+			agent.log.Warnf("unwanted err when stream.CloseSend:%s", nil)
+		}
+	}()
+
+	// handle command
+	go agent.handleCommand(conn, &commandTask)
+
+	agent.AgentOnLine = true
+
+	defer func() { agent.AgentOnLine = false }()
+
+	ping := v1.PPing{}
+	for {
+		// send ping
+		agent.log.Infof("ping  %s %v", agent, agent.pingMd)
+		if err := stream.Send(&ping); err != nil {
+			agent.log.Warnf("agentOnline Send  ping failed. %s", err)
+			return err
+		}
+		// recv ping
+		if _, err := stream.Recv(); err != nil {
+			agent.log.Warnf("agentOnline recv ping failed. %s", err)
+			return err
+		}
+
+		if common.WaitChannelEvent(agent.ExitCh, config.PingInterval) == common.E_AGENT_STOPPING {
+			return errors.New("catch exit during ping")
+		}
+	}
+}
+
+func (agent *GrpcAgent) keepAgentOnline() {
+	agent.tasksGroup.Add(1)
+	defer agent.tasksGroup.Done()
+
+	for {
+		if err := agent.agentOnline(); err != nil {
+			agent.log.Infof("agent online exit:%s ", err)
+		}
+
+		config := common.GetConfig()
+		if common.WaitChannelEvent(agent.ExitCh, config.PingInterval) == common.E_AGENT_STOPPING {
+			break
+		}
+	}
+	agent.spanSender.Stop()
+}
+
+func (agent *GrpcAgent) registerFilter() {
+	// online/off
+	agent.log.Debug("register agent filter")
+	agent.AddFilter(agent)
+	// req count
+	agent.log.Debug("register requestCounter filter")
+	agent.AddFilter(&agent.requestCounter)
+
+	// send span
+	agent.log.Debug("register spanSender filter")
+	agent.AddFilter(&agent.spanSender)
+
+}
+
+func (agent *GrpcAgent) sendStat() {
+
+	config := common.GetConfig()
+	agent.log.Debugf("connect StatAddress:%s", config.StatAddress)
+
+	conn, err := common.CreateGrpcConnection(config.StatAddress)
+	if err != nil {
+		errorMsg := fmt.Sprintf("Dail %s failed err:%s", config.StatAddress, err)
+		agent.log.Warn(errorMsg)
+		return
+	}
+
+	defer func() {
+		if err := conn.Close(); err != nil {
+			agent.log.Warnf("conn close with:%s", err)
+		}
+	}()
+
+	ctx, _ := common.BuildPinpointCtx(-1, agent.pingMd)
+
+	client := v1.NewStatClient(conn)
+
+	stream, err := client.SendAgentStat(ctx)
+	if err != nil {
+		errorMsg := fmt.Sprintf("create stat client failed:%s", config.StatAddress)
+		agent.log.Warn(errorMsg)
+		return
+	}
+
+	for {
+		msg := CollectPStateMessage(agent.requestCounter.GetMaxAvg, agent.requestCounter.GetReqTimeProfiler)
+
+		agent.log.Infof("%v", msg)
+		if err := stream.Send(msg); err != nil {
+			agent.log.Warn(err)
+			return
+		}
+		//config.StatInterval
+		if common.WaitChannelEvent(agent.ExitCh, 0) == common.E_AGENT_STOPPING {
+			return
+		}
+	}
+
+}
+
+func (agent *GrpcAgent) uploadStatInfo() {
+	agent.tasksGroup.Add(1)
+	defer agent.tasksGroup.Done()
+
+	for {
+		agent.sendStat()
+
+		config := common.GetConfig()
+		if common.WaitChannelEvent(agent.ExitCh, config.StatInterval) == common.E_AGENT_STOPPING {
+			return
+		}
+	}
+}
+
+func (agent *GrpcAgent) Init(id, _name string, _type int32, StartTime string) {
+	agent.log = log.WithFields(log.Fields{"appid": id})
+
+	agent.AgentId = id
+	agent.agentName = _name
+	agent.agentType = _type
+	agent.StartTime = StartTime
+	agent.BaseMD = metadata.New(map[string]string{
+		"starttime":       StartTime,
+		"agentid":         id,
+		"applicationname": _name,
+	})
+
+	pingIdStr := strconv.FormatInt(int64(agent.PingId), 10)
+
+	agent.pingMd = metadata.New(map[string]string{
+		"starttime":       agent.StartTime,
+		"agentid":         agent.AgentId,
+		"applicationname": agent.agentName,
+		"socketid":        pingIdStr,
+	})
+
+	config := common.GetConfig()
+
+	agent.jsonSpan = make(chan map[string]interface{}, config.AgentChannelSize)
+	agent.ExitCh = make(chan bool)
+	agent.spanSender = SpanSender{Md: agent.BaseMD, ExitCh: agent.ExitCh}
+	agent.spanSender.Init()
+	agent.requestCounter.CTime = time.Now().Unix()
+	agent.registerFilter()
+	// start agentOnline
+	go agent.keepAgentOnline()
+	// send stat
+	go agent.uploadStatInfo()
+
+}
+
+func (agent *GrpcAgent) Start() {
+	go agent.consumeJsonSpan()
+}
+
+func (agent *GrpcAgent) collectorActiveThreadCount(conn *grpc.ClientConn, responseId int32, interval time.Duration, wg *sync.WaitGroup) {
+	wg.Add(1)
+	defer wg.Done()
+
+	client := v1.NewProfilerCommandServiceClient(conn)
+	ctx, _ := common.BuildPinpointCtx(-1, agent.pingMd)
+
+	if activeThreadCountClient, err := client.CommandStreamActiveThreadCount(ctx); err == nil {
+		sequenceId := int32(1)
+		for {
+			agent.log.Infof("ResponseId %d", responseId)
+			response := v1.PCmdStreamResponse{
+				ResponseId: responseId,
+				SequenceId: sequenceId,
+				Message: &wrapperspb.StringValue{
+					Value: "hello",
+				},
+			}
+			sequenceId += 1
+
+			res := v1.PCmdActiveThreadCountRes{
+				CommonStreamResponse: &response,
+			}
+
+			for _, value := range agent.requestCounter.GetReqTimeProfiler() {
+				res.ActiveThreadCount = append(res.ActiveThreadCount, int32(value))
+			}
+
+			res.TimeStamp = time.Now().Unix()
+			res.HistogramSchemaType = 2
+
+			agent.log.Infof("try to send PCmdActiveThreadCountRes:%v", res)
+
+			if err := activeThreadCountClient.Send(&res); err != nil {
+				agent.log.Infof("collectorActiveThreadCount:responseId:%d end with:%s", responseId, err)
+				break
+			}
+
+			if common.WaitChannelEvent(agent.ExitCh, interval) == common.E_AGENT_STOPPING {
+				agent.log.Info("catch exit during send collectorActiveThreadCount")
+				break
+			}
+		}
+
+	}
+}
+
+func (agent *GrpcAgent) genCmdHandshake() *v1.PCmdMessage {
+	handshake := v1.PCmdServiceHandshake{}
+	handshake.SupportCommandServiceKey = append(handshake.SupportCommandServiceKey, int32(v1.PCommandType_PING))
+	handshake.SupportCommandServiceKey = append(handshake.SupportCommandServiceKey, int32(v1.PCommandType_PONG))
+	handshake.SupportCommandServiceKey = append(handshake.SupportCommandServiceKey, int32(v1.PCommandType_ECHO))
+	handshake.SupportCommandServiceKey = append(handshake.SupportCommandServiceKey, int32(v1.PCommandType_ACTIVE_THREAD_COUNT))
+	handshake.SupportCommandServiceKey = append(handshake.SupportCommandServiceKey, int32(v1.PCommandType_ACTIVE_THREAD_DUMP))
+	handshake.SupportCommandServiceKey = append(handshake.SupportCommandServiceKey, int32(v1.PCommandType_ACTIVE_THREAD_LIGHT_DUMP))
+
+	return &v1.PCmdMessage{
+		Message: &v1.PCmdMessage_HandshakeMessage{
+			HandshakeMessage: &handshake,
+		},
+	}
+}
+
+func (agent *GrpcAgent) handleCommand(conn *grpc.ClientConn, wg *sync.WaitGroup) {
+	defer wg.Done()
+	wg.Add(1)
+
+	cmdWg := sync.WaitGroup{}
+	defer cmdWg.Wait()
+
+	//
+	//config := common.GetConfig()
+	//agent.log.Debugf("connect AgentChannel:%s for agentOnline", config.AgentAddress)
+	//conn, err := grpc.Dial(config.AgentAddress, common.GetDialOption()...)
+	//if err != nil {
+	//	errorMsg := fmt.Sprintf("Dail %s failed", config.AgentAddress)
+	//	agent.log.Warn(errorMsg)
+	//}
+
+	client := v1.NewProfilerCommandServiceClient(conn)
+	//config.AgentReTryTimeout
+	ctx, _ := common.BuildPinpointCtx(-1, agent.pingMd)
+
+	commandClient, err := client.HandleCommand(ctx)
+
+	if err != nil {
+		agent.log.Warnf("handleCommand got err:%s", err)
+		return
+	}
+
+	// send handleshake
+	if err := commandClient.Send(agent.genCmdHandshake()); err != nil {
+		agent.log.Warnf("handleCommand Send got err:%s", err)
+		return
+	}
+	agent.log.Debugf("send command handshake %s", agent.genCmdHandshake())
+	for {
+		if cmd, err := commandClient.Recv(); err != nil {
+			agent.log.Warnf("handleCommand.Recv got err:%s", err)
+			return
+		} else {
+			agent.log.Infof("appid:%s handleCommand: get cmd %s", agent.AgentId, cmd)
+			switch cmd.Command.(type) {
+			case *v1.PCmdRequest_CommandEcho:
+				{
+					agent.log.Debug("PCmdRequest_CommandEcho")
+				}
+			case *v1.PCmdRequest_CommandActiveThreadCount:
+				// create a new coro to send active thread
+				go agent.collectorActiveThreadCount(conn, cmd.RequestId, 1, &cmdWg)
+			case *v1.PCmdRequest_CommandActiveThreadDump:
+				agent.log.Debug("PCmdRequest_CommandActiveThreadDump")
+			case *v1.PCmdRequest_CommandActiveThreadLightDump:
+				response := v1.PCmdResponse{
+					ResponseId: cmd.RequestId,
+				}
+
+				dumpRes := v1.PCmdActiveThreadLightDumpRes{
+					Type:           "java",
+					SubType:        "oracle",
+					Version:        "1.8.105",
+					CommonResponse: &response,
+				}
+
+				go func(in *v1.PCmdActiveThreadLightDumpRes) {
+					defer cmdWg.Done()
+					cmdWg.Add(1)
+
+					if _, err := client.CommandActiveThreadLightDump(ctx, in); err != nil {
+						agent.log.Warnf("CommandActiveThreadLightDump failed! err:%s", err)
+					}
+				}(&dumpRes)
+
+			default:
+				agent.log.Warnf("unknown command type %v", cmd)
+			}
+		}
+	}
+
+}
+
+func (agent *GrpcAgent) consumeJsonSpan() {
+	defer agent.tasksGroup.Done()
+	agent.tasksGroup.Add(1)
+
+	for span := range agent.jsonSpan {
+		if span == nil {
+			agent.log.Infof("agent:%v get EOF", agent)
+			return
+		}
+		for i := range agent.spanFilter {
+			if agent.spanFilter[i].Interceptor(span) == false {
+				break
+			}
+		}
+	}
+}
+
+func (agent *GrpcAgent) CheckValid(name string, ft int32) bool {
+	if name != agent.agentName || ft != agent.agentType {
+		agent.log.Warn("name or FT not equal")
+		return false
+	} else {
+		return true
+	}
+
+}
diff --git a/collector-agent/agent/MetaData.go b/collector-agent/agent/MetaData.go
new file mode 100644
index 000000000..f5e7c1243
--- /dev/null
+++ b/collector-agent/agent/MetaData.go
@@ -0,0 +1,36 @@
+package agent
+
+type PARAMS_TYPE map[string]int32
+
+var _id int32 = 1
+
+type I_SendMeta interface {
+	SenderGrpcMetaData(name string, id int32, Type int32, params PARAMS_TYPE)
+}
+
+type MetaData struct {
+	MetaDataType int32
+	IDMap        PARAMS_TYPE
+	Sender       I_SendMeta
+}
+
+func (meta *MetaData) ResetMeta() {
+	// reset with an empty one
+	meta.IDMap = make(PARAMS_TYPE)
+}
+
+func (meta *MetaData) GetId(name string, params PARAMS_TYPE) int32 {
+	id, OK := meta.IDMap[name]
+	if OK {
+		return id
+	} else {
+		_id += 1
+		meta.IDMap[name] = _id
+		meta.registerSelf(name, _id, meta.MetaDataType, params, meta.Sender)
+		return _id
+	}
+}
+
+func (meta *MetaData) registerSelf(name string, id, Type int32, params PARAMS_TYPE, sender I_SendMeta) {
+	go sender.SenderGrpcMetaData(name, id, Type, params)
+}
diff --git a/collector-agent/agent/RequestCounter.go b/collector-agent/agent/RequestCounter.go
new file mode 100644
index 000000000..05b8770fb
--- /dev/null
+++ b/collector-agent/agent/RequestCounter.go
@@ -0,0 +1,90 @@
+package agent
+
+import (
+	"CollectorAgent/common"
+	"math"
+	"time"
+
+	log "github.com/sirupsen/logrus"
+)
+
+type RequestProfiler struct {
+	reqProfiler                                [4]uint16
+	reqProfileLastTime, reqTop1LastTime, CTime int64
+	max, total, times                          uint32
+}
+
+// exp in seconds
+func (self *RequestProfiler) getReqLevel(exp uint32) int32 {
+	if exp <= 1 {
+		return 0
+	} else if exp <= 3 {
+		return 1
+	} else if exp <= 5 {
+		return 2
+	} else {
+		return 3
+	}
+}
+
+func (self *RequestProfiler) updateReqTimeProfile(exp uint32) {
+	if self.reqProfileLastTime != self.CTime {
+		for i, _ := range self.reqProfiler {
+			self.reqProfiler[i] = 0
+		}
+	}
+
+	self.reqProfiler[self.getReqLevel(exp)] += 1
+	self.reqProfileLastTime = self.CTime
+}
+
+func (self *RequestProfiler) updateReqTop1TimeSummary(exp uint32) {
+	config := common.GetConfig()
+	if self.CTime >= (self.reqTop1LastTime + int64(config.StatInterval) + 1) { // reset response time summary
+		self.reqTop1LastTime = self.CTime
+		self.total = 0
+		self.times = 0
+		self.max = 0
+	}
+
+	if self.max < exp {
+		self.max = exp
+	}
+
+	self.total += exp
+	self.times += 1
+}
+
+func (self *RequestProfiler) GetMaxAvg() (max, avg uint32) {
+	config := common.GetConfig()
+	if time.Now().Unix() < (self.reqTop1LastTime + int64(config.StatInterval) + 1) {
+		return self.max, self.total / self.times
+	} else {
+		return 0, 0
+	}
+}
+
+func (self *RequestProfiler) GetReqTimeProfiler() [4]uint16 {
+	now := time.Now().Unix()
+	if now < self.reqProfileLastTime+2 {
+		return self.reqProfiler
+	} else {
+		return [4]uint16{0, 0, 0, 0}
+	}
+}
+
+func (self *RequestProfiler) Interceptor(span map[string]interface{}) bool {
+	if exp, OK := span["E"]; OK {
+		self.CTime = time.Now().Unix()
+		if iexp, OK := exp.(float64); OK {
+
+			self.updateReqTop1TimeSummary(uint32(iexp))
+			exp := uint32(math.Ceil(iexp / 1000.0))
+			self.updateReqTimeProfile(exp)
+
+		} else {
+			log.Warnf("Convert exp to float64 failed.Reason %s", exp)
+		}
+	}
+	return true
+}
diff --git a/collector-agent/agent/SpanSender.go b/collector-agent/agent/SpanSender.go
new file mode 100644
index 000000000..46eab3b05
--- /dev/null
+++ b/collector-agent/agent/SpanSender.go
@@ -0,0 +1,523 @@
+package agent
+
+import (
+	"CollectorAgent/common"
+	v1 "CollectorAgent/protocol"
+	"context"
+	"errors"
+	"strconv"
+	"strings"
+	"sync"
+	"time"
+
+	log "github.com/sirupsen/logrus"
+	"google.golang.org/grpc/metadata"
+	"google.golang.org/protobuf/types/known/wrapperspb"
+)
+
+type SpanSender struct {
+	sequenceId    int32
+	apiMeta       MetaData
+	stringMeta    MetaData
+	sqlMeta       MetaData
+	Md            metadata.MD
+	ExitCh        chan bool
+	spanMessageCh chan *v1.PSpanMessage
+	spanRespCh    chan int32
+	wg            sync.WaitGroup
+}
+
+func (spanSender *SpanSender) Stop() {
+	log.Warn("Try to close spanSend goroutine")
+	close(spanSender.spanMessageCh)
+	close(spanSender.spanRespCh)
+	spanSender.wg.Wait()
+	log.Warn("Span sender goroutine exit")
+}
+
+func (spanSender *SpanSender) senderMain() {
+	config := common.GetConfig()
+	conn, err := common.CreateGrpcConnection(config.SpanAddress)
+	if err != nil {
+		log.Warnf("connect:%s failed. %s", config.SpanAddress, err)
+		return
+	}
+	defer conn.Close()
+	client := v1.NewSpanClient(conn)
+
+	ctx := metadata.NewOutgoingContext(context.Background(), spanSender.Md)
+
+	stream, err := client.SendSpan(ctx)
+	if err != nil {
+		log.Warnf("create streamfailed. %s", err)
+		return
+	}
+	defer stream.CloseSend()
+
+	for span := range spanSender.spanMessageCh {
+		log.Debugf("send Main send:%v", span)
+		//if rand.Intn(100000) != 1 {
+		//	continue
+		//}
+
+		if err := stream.Send(span); err != nil {
+			log.Warnf("send span failed with:%s", err)
+			// response the stream is not available
+			spanSender.spanRespCh <- 500
+			return
+		}
+	}
+}
+
+func (spanSender *SpanSender) sendThread() {
+	defer spanSender.wg.Done()
+
+	spanSender.wg.Add(1)
+	for {
+		spanSender.senderMain()
+		config := common.GetConfig()
+		if common.WaitChannelEvent(spanSender.ExitCh, config.SpanTimeWaitSec) == common.E_AGENT_STOPPING {
+			break
+		}
+	}
+	log.Info("sendThread exit")
+}
+
+func (spanSender *SpanSender) Init() {
+	spanSender.sqlMeta = MetaData{MetaDataType: common.META_SQL, IDMap: make(PARAMS_TYPE), Sender: spanSender}
+	spanSender.apiMeta = MetaData{MetaDataType: common.META_API, IDMap: make(PARAMS_TYPE), Sender: spanSender}
+	spanSender.stringMeta = MetaData{MetaDataType: common.META_STRING, IDMap: make(PARAMS_TYPE), Sender: spanSender}
+
+	spanSender.spanMessageCh = make(chan *v1.PSpanMessage, common.GetConfig().AgentChannelSize)
+	spanSender.spanRespCh = make(chan int32, 1)
+	log.Debug("SpanSender::Init span spanSender thread start")
+	for i := int32(0); i < common.GetConfig().SpanStreamParallelismSize; i++ {
+		go spanSender.sendThread()
+	}
+	log.Debug("SpanSender::Init done")
+}
+
+func (spanSender *SpanSender) cleanAllMetaData() {
+	log.Info("Clean all metaData")
+	spanSender.sqlMeta.ResetMeta()
+	spanSender.apiMeta.ResetMeta()
+	spanSender.stringMeta.ResetMeta()
+}
+
+func (spanSender *SpanSender) makePinpointSpanEv(genSpan *v1.PSpan, Ispan interface{}, depth int32) error {
+	if span, OK := Ispan.(map[string]interface{}); OK {
+		if spanEv, err := spanSender.createPinpointSpanEv(span); err == nil {
+			spanEv.Sequence = spanSender.sequenceId
+			spanSender.sequenceId += 1
+			spanEv.Depth = depth
+			genSpan.SpanEvent = append(genSpan.SpanEvent, spanEv)
+			if calls, OK := span["calls"].([]interface{}); OK {
+				for _, call := range calls {
+					spanSender.makePinpointSpanEv(genSpan, call, depth+1)
+				}
+			}
+			return nil
+		} else {
+			return err
+		}
+	} else {
+		panic(Ispan)
+	}
+}
+
+func (spanSender *SpanSender) createPinpointSpanEv(span map[string]interface{}) (*v1.PSpanEvent, error) {
+	pspanEv := v1.PSpanEvent{}
+	if name, OK := span["name"].(string); OK {
+		pspanEv.ApiId = int32(spanSender.apiMeta.GetId(name, PARAMS_TYPE{"type": common.API_DEFAULT}))
+	} else {
+		return nil, errors.New("no name")
+	}
+
+	if value, OK := span["EXP"].(string); OK {
+		id := spanSender.stringMeta.GetId("EXP", nil)
+		pspanEv.ExceptionInfo = &v1.PIntStringValue{}
+		pspanEv.ExceptionInfo.IntValue = id
+		stringValue := wrapperspb.StringValue{Value: value}
+		pspanEv.ExceptionInfo.StringValue = &stringValue
+	}
+
+	nextEv := v1.PMessageEvent{}
+
+	if value, OK := span["dst"].(string); OK {
+		nextEv.DestinationId = value
+	}
+
+	if value, OK := span["nsid"].(string); OK {
+		if value, err := strconv.ParseInt(value, 10, 64); err == nil {
+			nextEv.NextSpanId = value
+		}
+	}
+
+	if value, OK := span["server"].(string); OK {
+		nextEv.EndPoint = value
+	}
+	pspanEv.NextEvent = &v1.PNextEvent{
+		Field: &v1.PNextEvent_MessageEvent{
+			MessageEvent: &nextEv},
+	}
+
+	if value, OK := span["S"].(float64); OK {
+		//if value, err := strconv.ParseInt(value, 10, 32); err == nil {
+		//}
+		pspanEv.StartElapsed = int32(value)
+	}
+
+	if value, OK := span["E"].(float64); OK {
+		pspanEv.EndElapsed = int32(value)
+	}
+
+	if value, OK := span["stp"].(string); OK {
+		if itype, err := strconv.ParseInt(value, 10, 32); err == nil {
+			pspanEv.ServiceType = int32(itype)
+		}
+	} else {
+		pspanEv.ServiceType = 1501
+	}
+
+	//pspanEv.AsyncEvent = 1
+
+	if value, OK := span["clues"].([]interface{}); OK {
+
+		for _, ann := range value {
+			if annStr, OK := ann.(string); OK {
+				iColon := strings.Index(annStr, ":")
+				if value, err := strconv.ParseInt(annStr[0:iColon], 10, 32); err == nil {
+					stringValue := v1.PAnnotationValue_StringValue{StringValue: annStr[iColon+1:]}
+
+					pAnvalue := v1.PAnnotationValue{
+						Field: &stringValue,
+					}
+					ann := v1.PAnnotation{
+						Key:   int32(value),
+						Value: &pAnvalue,
+					}
+					pspanEv.Annotation = append(pspanEv.Annotation, &ann)
+				}
+			}
+		}
+	}
+
+	if value, OK := span["SQL"].(string); OK {
+		id := spanSender.sqlMeta.GetId(value, nil)
+		sqlvalue := v1.PIntStringStringValue{
+			IntValue: id,
+		}
+		pspanEv.Annotation = append(pspanEv.Annotation, &v1.PAnnotation{
+			Key: 20,
+			Value: &v1.PAnnotationValue{
+				Field: &v1.PAnnotationValue_IntStringStringValue{
+					&sqlvalue,
+				},
+			},
+		})
+	}
+
+	return &pspanEv, nil
+}
+
+func (spanSender *SpanSender) makePinpointSpan(span map[string]interface{}) (*v1.PSpan, error) {
+	spanSender.sequenceId = 0
+	pspan := v1.PSpan{}
+	pspan.Version = 1
+	if name, OK := span["name"].(string); OK {
+		pspan.ApiId = spanSender.apiMeta.GetId(name, PARAMS_TYPE{"type": int32(common.API_WEB_REQUEST)})
+	} else {
+		return nil, errors.New("no name")
+	}
+
+	if value, OK := span["stp"].(string); OK {
+		if itype, err := strconv.ParseInt(value, 10, 32); err == nil {
+			pspan.ServiceType = int32(itype)
+		}
+	} else {
+		pspan.ServiceType = 1500
+	}
+
+	if value, OK := span["FT"].(float64); OK {
+		pspan.ApplicationServiceType = int32(value)
+	} else {
+		pspan.ServiceType = 1500
+	}
+
+	if _type, OK := span["psid"].(string); OK {
+		if itype, err := strconv.ParseInt(_type, 10, 64); err == nil {
+			pspan.ParentSpanId = itype
+		}
+	} else {
+		pspan.ParentSpanId = -1
+	}
+
+	if value, OK := span["tid"].(string); OK {
+		strholder := strings.Split(value, "^")
+		agentId, startTime, seqenceid := strholder[0], strholder[1], strholder[2]
+		transactionId := v1.PTransactionId{AgentId: agentId}
+
+		if value, err := strconv.ParseInt(startTime, 10, 64); err == nil {
+			transactionId.AgentStartTime = value
+		}
+
+		if value, err := strconv.ParseInt(seqenceid, 10, 64); err == nil {
+			transactionId.Sequence = value
+		}
+		pspan.TransactionId = &transactionId
+	} else {
+		return nil, errors.New("no tid")
+	}
+
+	if value, OK := span["sid"].(string); OK {
+		if value, err := strconv.ParseInt(value, 10, 64); err == nil {
+			pspan.SpanId = value
+		}
+	} else {
+		return nil, errors.New("no sid")
+	}
+
+	if value, OK := span["S"].(float64); OK {
+		pspan.StartTime = int64(value)
+	} else {
+		panic(span["S"])
+	}
+
+	if value, OK := span["E"].(float64); OK {
+		pspan.Elapsed = int32(value)
+	}
+	acceptEv := v1.PAcceptEvent{}
+	if value, OK := span["uri"].(string); OK {
+		acceptEv.Rpc = value
+	}
+
+	if value, OK := span["server"].(string); OK {
+		acceptEv.EndPoint = value
+	}
+
+	if value, OK := span["client"].(string); OK {
+		acceptEv.RemoteAddr = value
+	}
+
+	parentInfo := v1.PParentInfo{}
+
+	if value, OK := span["pname"].(string); OK {
+		parentInfo.ParentApplicationName = value
+	}
+
+	if value, OK := span["ptype"].(string); OK {
+		if value, err := strconv.ParseInt(value, 10, 32); err == nil {
+			parentInfo.ParentApplicationType = int32(value)
+		}
+	}
+
+	if value, OK := span["Ah"].(string); OK {
+		parentInfo.AcceptorHost = value
+	}
+	acceptEv.ParentInfo = &parentInfo
+
+	pspan.AcceptEvent = &acceptEv
+
+	if value, OK := span["ERR"]; OK {
+		id := spanSender.stringMeta.GetId("ERR", nil)
+		pspan.ExceptionInfo = &v1.PIntStringValue{}
+		pspan.ExceptionInfo.IntValue = id
+		pspan.Err = 1 // mark as an error
+		if value, OK := value.(map[string]interface{}); OK {
+			if value, OK := value["msg"].(string); OK {
+				stringValue := wrapperspb.StringValue{Value: value}
+				pspan.ExceptionInfo.StringValue = &stringValue
+			}
+		}
+	}
+
+	if value, OK := span["EXP"].(string); OK {
+		id := spanSender.stringMeta.GetId("EXP", nil)
+		pspan.ExceptionInfo.IntValue = id
+		stringValue := wrapperspb.StringValue{Value: value}
+		pspan.ExceptionInfo.StringValue = &stringValue
+	}
+
+	if value, OK := span["clues"].([]interface{}); OK {
+		for _, ann := range value {
+			if annStr, OK := ann.(string); OK {
+				iColon := strings.Index(annStr, ":")
+				if iColon > 0 {
+					if value, err := strconv.ParseInt(annStr[0:iColon], 10, 32); err == nil {
+						stringValue := v1.PAnnotationValue_StringValue{StringValue: annStr[iColon+1:]}
+						pAnn := v1.PAnnotationValue{
+							Field: &stringValue,
+						}
+						ann := v1.PAnnotation{
+							Key:   int32(value),
+							Value: &pAnn,
+						}
+						pspan.Annotation = append(pspan.Annotation, &ann)
+					}
+				}
+
+			}
+		}
+	}
+
+	// collector data from nginx-header
+	if value, OK := span["NP"].(string); OK {
+		pvalue := v1.PAnnotationValue_LongIntIntByteByteStringValue{
+			LongIntIntByteByteStringValue: &v1.PLongIntIntByteByteStringValue{},
+		}
+		pvalue.LongIntIntByteByteStringValue.IntValue1 = 2
+		npAr := common.ParseStringField(value)
+		if value, OK := npAr["D"]; OK {
+			if value, err := common.ParseDotFormatToTime(value); err == nil {
+				pvalue.LongIntIntByteByteStringValue.IntValue2 = int32(value)
+			}
+		}
+		if value, OK := npAr["t"]; OK {
+			if value, err := common.ParseDotFormatToTime(value); err == nil {
+				pvalue.LongIntIntByteByteStringValue.LongValue = value
+			}
+		}
+
+		ann := v1.PAnnotation{
+			Key: 300,
+			Value: &v1.PAnnotationValue{
+				Field: &pvalue,
+			},
+		}
+		pspan.Annotation = append(pspan.Annotation, &ann)
+	}
+	// collect data from apache-header
+	if value, OK := span["AP"].(string); OK {
+		pvalue := v1.PAnnotationValue_LongIntIntByteByteStringValue{
+			LongIntIntByteByteStringValue: &v1.PLongIntIntByteByteStringValue{},
+		}
+		pvalue.LongIntIntByteByteStringValue.IntValue1 = 3
+		npAr := common.ParseStringField(value)
+		if value, OK := npAr["i"]; OK {
+			if value, err := strconv.ParseInt(value, 10, 32); err == nil {
+				pvalue.LongIntIntByteByteStringValue.ByteValue1 = int32(value)
+			}
+		}
+		if value, OK := npAr["b"]; OK {
+			if value, err := strconv.ParseInt(value, 10, 32); err == nil {
+				pvalue.LongIntIntByteByteStringValue.ByteValue2 = int32(value)
+			}
+		}
+		if value, OK := npAr["D"]; OK {
+			if value, err := strconv.ParseInt(value, 10, 32); err == nil {
+				pvalue.LongIntIntByteByteStringValue.IntValue2 = int32(value)
+			}
+		}
+		if value, OK := npAr["t"]; OK {
+			if value, err := strconv.ParseInt(value, 10, 64); err == nil {
+				pvalue.LongIntIntByteByteStringValue.LongValue = value / 1000
+			}
+		}
+	}
+
+	return &pspan, nil
+}
+
+func (spanSender *SpanSender) makeSpan(span map[string]interface{}) (*v1.PSpan, error) {
+	if pspan, err := spanSender.makePinpointSpan(span); err == nil {
+		if calls, OK := span["calls"].([]interface{}); OK {
+			for _, call := range calls {
+				spanSender.makePinpointSpanEv(pspan, call, 1)
+			}
+		}
+		return pspan, nil
+	} else {
+		return nil, err
+	}
+}
+
+func (spanSender *SpanSender) Interceptor(span map[string]interface{}) bool {
+	log.Debug("span spanSender interceptor")
+	if span, err := spanSender.makeSpan(span); err == nil {
+		// send channel
+		spanSender.spanMessageCh <- &v1.PSpanMessage{
+			Field: &v1.PSpanMessage_Span{
+				Span: span,
+			},
+		}
+		// recv the channel status
+		select {
+		case statusCode := <-spanSender.spanRespCh:
+			log.Warn("span send stream is offline statusCode:%d, clear all string/sql/api meta data", statusCode)
+			spanSender.cleanAllMetaData()
+		case <-time.After(0 * time.Second):
+			// do nothing, just go on
+		}
+	} else {
+		log.Warnf("SpanSender::Interceptor return err:%s", err)
+	}
+	return true
+}
+
+func (spanSender *SpanSender) SenderGrpcMetaData(name string, id int32, Type int32,
+	params PARAMS_TYPE) {
+	config := common.GetConfig()
+	conn, err := common.CreateGrpcConnection(config.AgentAddress)
+	if err != nil {
+		log.Warnf("connect:%s failed. %s", config.AgentAddress, err)
+		return
+	}
+
+	defer conn.Close()
+	client := v1.NewMetadataClient(conn)
+
+	ctx, cancel := common.BuildPinpointCtx(config.MetaDataTimeWaitSec, spanSender.Md)
+	defer cancel()
+
+	switch Type {
+	case common.META_API:
+		{
+			//line := int32(0)
+			_type := int32(common.API_DEFAULT) //
+			if params != nil {
+				if value, OK := params["type"]; OK {
+					_type = value
+				}
+
+				//if value, OK := params["line"]; OK {
+				//	line = value
+				//}
+			}
+			// disable line
+			apiMeta := v1.PApiMetaData{ApiId: id, ApiInfo: name, Type: _type}
+
+			if _, err = client.RequestApiMetaData(ctx, &apiMeta); err != nil {
+				log.Warnf("agentOnline api meta failed %s", err)
+			}
+		}
+		break
+	case common.META_STRING:
+		{
+			metaMeta := v1.PStringMetaData{
+				StringId:    id,
+				StringValue: name,
+			}
+
+			if _, err = client.RequestStringMetaData(ctx, &metaMeta); err != nil {
+				log.Warnf("agentOnline api meta failed %s", err)
+			}
+		}
+		break
+	case common.META_SQL:
+		{
+			sqlMeta := v1.PSqlMetaData{
+				SqlId: id,
+				Sql:   name,
+			}
+
+			if _, err = client.RequestSqlMetaData(ctx, &sqlMeta); err != nil {
+				log.Warnf("agentOnline api meta failed %s", err)
+			}
+		}
+		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)
+}
diff --git a/collector-agent/agent/Stat.go b/collector-agent/agent/Stat.go
new file mode 100644
index 000000000..72d19c5d8
--- /dev/null
+++ b/collector-agent/agent/Stat.go
@@ -0,0 +1,78 @@
+package agent
+
+import (
+	"CollectorAgent/common"
+	"CollectorAgent/protocol"
+	"time"
+
+	"github.com/shirou/gopsutil/cpu"
+	"github.com/shirou/gopsutil/v3/mem"
+)
+
+//type convert func(int) string
+
+type GetMaxAvg func() (max, avg uint32)
+type GetReqTimeCounter func() [4]uint16
+
+func CollectPStateMessage(getMacAvr GetMaxAvg, getReqTimeCounter GetReqTimeCounter) *v1.PStatMessage {
+	config := common.GetConfig()
+	max, avg := getMacAvr()
+	responseTime := v1.PResponseTime{
+		Max: int64(max),
+		Avg: int64(avg),
+	}
+
+	v, _ := mem.VirtualMemory()
+
+	jvmGc := v1.PJvmGc{
+		Type:                 v1.PJvmGcType_JVM_GC_TYPE_PARALLEL,
+		JvmMemoryHeapUsed:    int64(v.Used),
+		JvmMemoryHeapMax:     int64(v.Total),
+		JvmMemoryNonHeapUsed: int64(v.Buffers),
+		JvmMemoryNonHeapMax:  int64(v.Cached),
+		JvmGcOldCount:        0,
+		JvmGcOldTime:         0,
+		JvmGcDetailed:        &v1.PJvmGcDetailed{},
+	}
+	totalPer, _ := cpu.Percent(config.StatInterval*time.Second, false)
+	totalCpuUsage := totalPer[0] / 100
+	cpuload := v1.PCpuLoad{
+		SystemCpuLoad: totalCpuUsage,
+		JvmCpuLoad:    totalCpuUsage,
+	}
+	var activeTraceCount []int32
+	for _, value := range getReqTimeCounter() {
+		activeTraceCount = append(activeTraceCount, int32(value))
+	}
+
+	agentStat := v1.PAgentStat{
+		ResponseTime:    &responseTime,
+		Gc:              &jvmGc,
+		CollectInterval: int64(config.StatInterval),
+		Timestamp:       int64(time.Now().UnixNano() / int64(time.Millisecond)),
+		CpuLoad:         &cpuload,
+		Transaction:     &v1.PTransaction{},
+		ActiveTrace: &v1.PActiveTrace{
+			Histogram: &v1.PActiveTraceHistogram{
+				Version:             1,
+				HistogramSchemaType: 2, //NORMAL SCHEMA
+				ActiveTraceCount:    activeTraceCount,
+			},
+		},
+		DataSourceList: nil,
+		Deadlock:       nil,
+		FileDescriptor: nil,
+		DirectBuffer:   nil,
+		Metadata:       "",
+	}
+
+	pStateAgentStat := v1.PStatMessage_AgentStat{
+		AgentStat: &agentStat,
+	}
+
+	sateMessage := v1.PStatMessage{
+		Field: &pStateAgentStat,
+	}
+
+	return &sateMessage
+}
diff --git a/collector-agent/common/Defines.go b/collector-agent/common/Defines.go
new file mode 100644
index 000000000..a4d5343ec
--- /dev/null
+++ b/collector-agent/common/Defines.go
@@ -0,0 +1,9 @@
+package common
+
+const API_WEB_REQUEST = 100
+const API_DEFAULT = 0
+const (
+	META_API    = 1
+	META_STRING = 2
+	META_SQL    = 3
+)
diff --git a/collector-agent/common/Utils.go b/collector-agent/common/Utils.go
new file mode 100644
index 000000000..d56a2a7fa
--- /dev/null
+++ b/collector-agent/common/Utils.go
@@ -0,0 +1,71 @@
+package common
+
+import (
+	"context"
+	"errors"
+	"fmt"
+	"google.golang.org/grpc"
+	"google.golang.org/grpc/metadata"
+	"strconv"
+	"strings"
+	"time"
+)
+
+type E_AGENT_STATUS int32
+
+const (
+	E_AGENT_STOPPING E_AGENT_STATUS = 0
+	E_AGENT_GOON     E_AGENT_STATUS = 1
+)
+
+func ParseStringField(v string) map[string]string {
+	ret := map[string]string{}
+	for _, item := range strings.Split(v, " ") {
+		values := strings.SplitN(item, "=", 2)
+		ret[values[0]] = values[1]
+	}
+	return ret
+}
+
+func ParseDotFormatToTime(v string) (int64, error) {
+	ar := strings.Split(v, ".")
+	if sec, err := strconv.ParseInt(ar[0], 10, 32); err == nil {
+		if ms, err := strconv.ParseInt(ar[1], 10, 32); err == nil {
+			return sec*1000 + ms, nil
+		}
+	}
+	return 0, errors.New(fmt.Sprintf("input:%s is invalid", v))
+}
+
+func WaitChannelEvent(doneCh chan bool, sec time.Duration) E_AGENT_STATUS {
+	select {
+	case <-doneCh:
+		return E_AGENT_STOPPING
+	case <-time.After(sec * time.Second):
+		return E_AGENT_GOON
+	}
+}
+
+func BuildPinpointCtx(sec time.Duration, md metadata.MD) (ctx context.Context, cancel context.CancelFunc) {
+	if sec == -1 {
+		ctx = context.Background()
+		//cancel = nil
+		ctx = metadata.NewOutgoingContext(ctx, md)
+		return ctx, nil
+	} else {
+		ctx, cancel = context.WithTimeout(context.Background(), sec*time.Second)
+		ctx = metadata.NewOutgoingContext(ctx, md)
+		return ctx, cancel
+	}
+
+}
+
+func CreateGrpcConnection(address string) (*grpc.ClientConn, error) {
+	ctx, cancel := context.WithTimeout(context.Background(), time.Second*config.GrpcConTextTimeOutSec)
+	defer cancel()
+	conn, err := grpc.DialContext(ctx, address, GetDialOption()...)
+	if err != nil {
+		return nil, err
+	}
+	return conn, nil
+}
diff --git a/collector-agent/common/config.go b/collector-agent/common/config.go
new file mode 100644
index 000000000..a43eee397
--- /dev/null
+++ b/collector-agent/common/config.go
@@ -0,0 +1,133 @@
+package common
+
+import (
+	"CollectorAgent/protocol"
+	"fmt"
+	"net"
+	"os"
+	"time"
+
+	"google.golang.org/grpc"
+)
+
+type Config struct {
+	SocketType   string
+	Address      string
+	StatAddress  string
+	SpanAddress  string
+	AgentAddress string
+
+	WebPorts    int16
+	LoggerLevel string
+	LoggerDir   string
+	// tuning
+	AgentChannelSize          uint64
+	SpanStreamParallelismSize int32
+
+	AgentReTryTimeout     time.Duration
+	PingInterval          time.Duration
+	StatInterval          time.Duration
+	SpanTimeWaitSec       time.Duration
+	MetaDataTimeWaitSec   time.Duration
+	GrpcConTextTimeOutSec time.Duration
+	// agent auto offline after xxxx
+	AgentFreeOnlineSurvivalTimeSec time.Duration
+	// agentInfo
+	HostName   string
+	HostIp     string
+	Pid        int32
+	StartTime  int64
+	ServerType int32
+	Container  bool
+}
+
+var config = &Config{
+	WebPorts:                       80,
+	AgentChannelSize:               1000,
+	SpanStreamParallelismSize:      2,
+	AgentReTryTimeout:              10,
+	PingInterval:                   300,
+	StatInterval:                   5,
+	SpanTimeWaitSec:                10,
+	MetaDataTimeWaitSec:            10,
+	GrpcConTextTimeOutSec:          5,
+	AgentFreeOnlineSurvivalTimeSec: 1 * 60 * 60, // 1 hour
+	ServerType:                     1700,        // PHP
+	LoggerLevel:                    "DEBUG",
+	LoggerDir:                      "/tmp/",
+	StartTime:                      time.Now().Unix(),
+	Pid:                            int32(os.Getgid()),
+	HostName:                       getHostName(),
+	HostIp:                         lookupIpFromName(getHostName()),
+}
+
+func getHostName() string {
+	name, err := os.Hostname()
+	if err != nil {
+		return "localhost"
+	}
+	return name
+}
+
+func lookupIpFromName(name string) string {
+	conn, err := net.Dial("udp", "8.8.8.8:80")
+	if err == nil {
+		defer conn.Close()
+		ipAddress := conn.LocalAddr().(*net.UDPAddr)
+		return ipAddress.IP.String()
+	}
+	return "127.0.0.1"
+}
+
+//var once sync.Once
+
+func GetConfig() *Config {
+	//once.Do(
+	//	func() {
+	//		//tuning
+	//		config = &Config{
+	//			WebPorts:                  80,
+	//			AgentChannelSize:          1000,
+	//			SpanStreamParallelismSize: 2,
+	//			AgentReTryTimeout:         10,
+	//			PingInterval:              300,
+	//			StatInterval:              300,
+	//			SpanTimeWaitSec:           10,
+	//			MetaDataTimeWaitSec:       10,
+	//
+	//			ServerType:  1700, // PHP
+	//			LoggerLevel: "DEBUG",
+	//			LoggerDir:   "/tmp/",
+	//			StartTime:   time.Now().Unix(),
+	//			Pid:         int32(os.Getgid()),
+	//		}
+	//	})
+	return config
+}
+
+/**
+WithInsecure,WithBlock
+*/
+func GetDialOption() []grpc.DialOption {
+	var opts []grpc.DialOption
+	opts = append(opts, grpc.WithInsecure())
+	opts = append(opts, grpc.WithBlock())
+	return opts
+}
+
+func GetPBAgentInfo(serverType int32) v1.PAgentInfo {
+	agentInfo := v1.PAgentInfo{
+		Hostname:     config.HostName,
+		Ip:           config.HostIp,
+		Pid:          config.Pid,
+		ServiceType:  serverType,
+		Container:    config.Container,
+		EndTimestamp: -1,
+	}
+
+	return agentInfo
+}
+
+func (self *Config) String() string {
+	return fmt.Sprintf("SocketType:%s Address:%s  StatAddress:%s SpanAddress:%s AgentAddress%s WebPorts:%d  LoggerLevel:%s LoggerDir:%s AgentChannelSize:%d SpanStreamParallelismSize:%d AgentReTryTimeout:%s PingInterval:%d StatInterval:%d SpanTimeWaitSec:%d MetaDataTimeWaitSec:%d Pid:%d StartTime:%d ServerType:%d Container:%t", self.SocketType, self.Address, self.StatAddress, self.SpanAddress, self.AgentAddress, self.WebPorts, self.LoggerLevel, self.LoggerDir, self.AgentChannelSize, self.SpanStreamParallelismSize, self.AgentReTryTimeout, self.PingInterval, self.StatInterval, self.SpanTimeWaitSec, self.MetaDataTimeWaitSec, self.Pid, self.StartTime, self.ServerType, self.Container)
+}
diff --git a/collector-agent/conf/collector.conf b/collector-agent/conf/collector.conf
deleted file mode 100644
index 2d479451f..000000000
--- a/collector-agent/conf/collector.conf
+++ /dev/null
@@ -1,20 +0,0 @@
-[Collector]
-collector.grpc.agent.ip=collectorHost
-collector.grpc.agent.port=9991
-collector.grpc.stat.ip=collectorHost
-collector.grpc.stat.port=9992
-collector.grpc.span.ip=collectorHost
-collector.grpc.span.port=9993
-//collector.grpc.discardpolicy.maxpendingthreshold=10000
-[Common]
-Web_Port=8001
-Log_Level=ERROR
-LOG_DIR=/tmp/
-Isdocker = false
-[Agent]
-# the same as below "pinpoint_php.CollectorHost"
-# use tcp port
-Address=0.0.0.0@9999
-# use unix socket
-#Address=/tmp/collector-agent.sock
-
diff --git a/collector-agent/conf/env.file b/collector-agent/conf/env.file
deleted file mode 100644
index 914e81ffe..000000000
--- a/collector-agent/conf/env.file
+++ /dev/null
@@ -1,18 +0,0 @@
-# pinpoint collector span ip
-PP_COLLECTOR_AGENT_SPAN_IP=dev-pinpoint
-# pinpoint collector span port
-PP_COLLECTOR_AGENT_SPAN_PORT=9993
-# pinpoint collector agent IP
-PP_COLLECTOR_AGENT_AGENT_IP=dev-pinpoint
-# pinpoint collector agent port
-PP_COLLECTOR_AGENT_AGENT_PORT=9991
-# pinpoint collector stat ip
-PP_COLLECTOR_AGENT_STAT_IP=dev-pinpoint
-# pinpoint collector stat port
-PP_COLLECTOR_AGENT_STAT_PORT=9992
-# mark all agent a docker
-PP_COLLECTOR_AGENT_ISDOCKER=true
-PP_LOG_DIR=/tmp/
-PP_Log_Level=ERROR
-# binds on
-PP_ADDRESS=0.0.0.0@9999
\ No newline at end of file
diff --git a/collector-agent/go.mod b/collector-agent/go.mod
new file mode 100644
index 000000000..cb6bdc9be
--- /dev/null
+++ b/collector-agent/go.mod
@@ -0,0 +1,20 @@
+module CollectorAgent
+
+go 1.15
+
+require (
+    github.com/BurntSushi/toml v0.3.1
+    github.com/golang/protobuf v1.4.3
+    github.com/mattn/go-colorable v0.1.8 // indirect
+    github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
+    github.com/shirou/gopsutil v3.21.2+incompatible
+    github.com/shirou/gopsutil/v3 v3.21.2
+    github.com/sirupsen/logrus v1.8.1
+    github.com/x-cray/logrus-prefixed-formatter v0.5.2
+    golang.org/x/sys v0.0.0-20210217105451-b926d437f341
+    google.golang.org/grpc v1.36.0
+    google.golang.org/grpc/examples v0.0.0-20210316215007-967933baf52a
+    google.golang.org/protobuf v1.25.0
+    gopkg.in/natefinch/lumberjack.v2 v2.0.0
+    gopkg.in/yaml.v2 v2.4.0
+)
diff --git a/collector-agent/go.sum b/collector-agent/go.sum
new file mode 100644
index 000000000..04a6c49e7
--- /dev/null
+++ b/collector-agent/go.sum
@@ -0,0 +1,138 @@
+cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
+cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
+github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
+github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
+github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d h1:G0m3OIz70MZUWq3EgK3CesDbo8upS2Vm9/P3FtgI+Jk=
+github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg=
+github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
+github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
+github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
+github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
+github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
+github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
+github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
+github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
+github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
+github.com/go-ole/go-ole v1.2.4 h1:nNBDSCOigTSiarFpYE9J/KtEA1IOW4CNeqT9TQDqCxI=
+github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM=
+github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
+github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
+github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
+github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
+github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
+github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
+github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
+github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
+github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
+github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
+github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM=
+github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
+github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
+github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
+github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
+github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w=
+github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8=
+github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
+github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
+github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
+github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d h1:5PJl274Y63IEHC+7izoQE9x6ikvDFZS2mDVS3drnohI=
+github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
+github.com/shirou/gopsutil v3.21.2+incompatible h1:U+YvJfjCh6MslYlIAXvPtzhW3YZEtc9uncueUNpD/0A=
+github.com/shirou/gopsutil v3.21.2+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
+github.com/shirou/gopsutil/v3 v3.21.2 h1:fIOk3hyqV1oGKogfGNjUZa0lUbtlkx3+ZT0IoJth2uM=
+github.com/shirou/gopsutil/v3 v3.21.2/go.mod h1:ghfMypLDrFSWN2c9cDYFLHyynQ+QUht0cv/18ZqVczw=
+github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
+github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
+github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
+github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
+github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M=
+github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek=
+github.com/tklauser/numcpus v0.2.1 h1:ct88eFm+Q7m2ZfXJdan1xYoXKlmwsfP+k88q05KvlZc=
+github.com/tklauser/numcpus v0.2.1/go.mod h1:9aU+wOc6WjUIZEwWMP62PL/41d65P+iks1gBkr4QyP8=
+github.com/x-cray/logrus-prefixed-formatter v0.5.2 h1:00txxvfBM9muc0jiLIEAkAcIMJzfthRT6usrui8uGmg=
+github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
+golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
+golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
+golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
+golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190311183353-d8887717615a h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628=
+golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
+golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
+golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210217105451-b926d437f341 h1:2/QtM1mL37YmcsT8HaDNHDgTqqFVw+zr8UzMiBVLzYU=
+golang.org/x/sys v0.0.0-20210217105451-b926d437f341/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
+golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
+golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
+google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
+google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
+google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
+google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
+google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98 h1:LCO0fg4kb6WwkXQXRQQgUYsFeFb5taTX5WAx5O/Vt28=
+google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
+google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
+google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
+google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
+google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
+google.golang.org/grpc v1.36.0 h1:o1bcQ6imQMIOpdrO3SWf2z5RV72WbDwdXuK0MDlc8As=
+google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
+google.golang.org/grpc/examples v0.0.0-20210316215007-967933baf52a h1:pXCsqscUZpzJcrYuq0FnyMAyyLa3JttLynkhNq5szXA=
+google.golang.org/grpc/examples v0.0.0-20210316215007-967933baf52a/go.mod h1:Ly7ZA/ARzg8fnPU9TyZIxoz33sEUuWX7txiqs8lPTgE=
+google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
+google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
+google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
+google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
+google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
+google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
+google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
+google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
+google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
+google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c=
+google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8=
+gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
+gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
+gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
diff --git a/collector-agent/init_python_env.sh b/collector-agent/init_python_env.sh
deleted file mode 100755
index 607993753..000000000
--- a/collector-agent/init_python_env.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/bash
-pip install grpcio-tools
-python -m grpc_tools.protoc -I./Proto/grpc --python_out=./Proto/grpc --grpc_python_out=./Proto/grpc ./Proto/grpc/*.proto
\ No newline at end of file
diff --git a/collector-agent/protocol/Annotation.pb.go b/collector-agent/protocol/Annotation.pb.go
new file mode 100644
index 000000000..5c2262c20
--- /dev/null
+++ b/collector-agent/protocol/Annotation.pb.go
@@ -0,0 +1,661 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: Annotation.proto
+
+package v1
+
+import (
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	wrappers "github.com/golang/protobuf/ptypes/wrappers"
+	math "math"
+)
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
+
+type PIntStringValue struct {
+	IntValue             int32                 `protobuf:"varint,1,opt,name=intValue,proto3" json:"intValue,omitempty"`
+	StringValue          *wrappers.StringValue `protobuf:"bytes,2,opt,name=stringValue,proto3" json:"stringValue,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
+	XXX_unrecognized     []byte                `json:"-"`
+	XXX_sizecache        int32                 `json:"-"`
+}
+
+func (m *PIntStringValue) Reset()         { *m = PIntStringValue{} }
+func (m *PIntStringValue) String() string { return proto.CompactTextString(m) }
+func (*PIntStringValue) ProtoMessage()    {}
+func (*PIntStringValue) Descriptor() ([]byte, []int) {
+	return fileDescriptor_22207ca389a047ff, []int{0}
+}
+
+func (m *PIntStringValue) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PIntStringValue.Unmarshal(m, b)
+}
+func (m *PIntStringValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PIntStringValue.Marshal(b, m, deterministic)
+}
+func (m *PIntStringValue) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PIntStringValue.Merge(m, src)
+}
+func (m *PIntStringValue) XXX_Size() int {
+	return xxx_messageInfo_PIntStringValue.Size(m)
+}
+func (m *PIntStringValue) XXX_DiscardUnknown() {
+	xxx_messageInfo_PIntStringValue.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PIntStringValue proto.InternalMessageInfo
+
+func (m *PIntStringValue) GetIntValue() int32 {
+	if m != nil {
+		return m.IntValue
+	}
+	return 0
+}
+
+func (m *PIntStringValue) GetStringValue() *wrappers.StringValue {
+	if m != nil {
+		return m.StringValue
+	}
+	return nil
+}
+
+type PIntStringStringValue struct {
+	IntValue             int32                 `protobuf:"varint,1,opt,name=intValue,proto3" json:"intValue,omitempty"`
+	StringValue1         *wrappers.StringValue `protobuf:"bytes,2,opt,name=stringValue1,proto3" json:"stringValue1,omitempty"`
+	StringValue2         *wrappers.StringValue `protobuf:"bytes,3,opt,name=stringValue2,proto3" json:"stringValue2,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
+	XXX_unrecognized     []byte                `json:"-"`
+	XXX_sizecache        int32                 `json:"-"`
+}
+
+func (m *PIntStringStringValue) Reset()         { *m = PIntStringStringValue{} }
+func (m *PIntStringStringValue) String() string { return proto.CompactTextString(m) }
+func (*PIntStringStringValue) ProtoMessage()    {}
+func (*PIntStringStringValue) Descriptor() ([]byte, []int) {
+	return fileDescriptor_22207ca389a047ff, []int{1}
+}
+
+func (m *PIntStringStringValue) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PIntStringStringValue.Unmarshal(m, b)
+}
+func (m *PIntStringStringValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PIntStringStringValue.Marshal(b, m, deterministic)
+}
+func (m *PIntStringStringValue) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PIntStringStringValue.Merge(m, src)
+}
+func (m *PIntStringStringValue) XXX_Size() int {
+	return xxx_messageInfo_PIntStringStringValue.Size(m)
+}
+func (m *PIntStringStringValue) XXX_DiscardUnknown() {
+	xxx_messageInfo_PIntStringStringValue.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PIntStringStringValue proto.InternalMessageInfo
+
+func (m *PIntStringStringValue) GetIntValue() int32 {
+	if m != nil {
+		return m.IntValue
+	}
+	return 0
+}
+
+func (m *PIntStringStringValue) GetStringValue1() *wrappers.StringValue {
+	if m != nil {
+		return m.StringValue1
+	}
+	return nil
+}
+
+func (m *PIntStringStringValue) GetStringValue2() *wrappers.StringValue {
+	if m != nil {
+		return m.StringValue2
+	}
+	return nil
+}
+
+type PLongIntIntByteByteStringValue struct {
+	LongValue            int64                 `protobuf:"varint,1,opt,name=longValue,proto3" json:"longValue,omitempty"`
+	IntValue1            int32                 `protobuf:"varint,2,opt,name=intValue1,proto3" json:"intValue1,omitempty"`
+	IntValue2            int32                 `protobuf:"varint,3,opt,name=intValue2,proto3" json:"intValue2,omitempty"`
+	ByteValue1           int32                 `protobuf:"zigzag32,4,opt,name=byteValue1,proto3" json:"byteValue1,omitempty"`
+	ByteValue2           int32                 `protobuf:"zigzag32,5,opt,name=byteValue2,proto3" json:"byteValue2,omitempty"`
+	StringValue          *wrappers.StringValue `protobuf:"bytes,6,opt,name=stringValue,proto3" json:"stringValue,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
+	XXX_unrecognized     []byte                `json:"-"`
+	XXX_sizecache        int32                 `json:"-"`
+}
+
+func (m *PLongIntIntByteByteStringValue) Reset()         { *m = PLongIntIntByteByteStringValue{} }
+func (m *PLongIntIntByteByteStringValue) String() string { return proto.CompactTextString(m) }
+func (*PLongIntIntByteByteStringValue) ProtoMessage()    {}
+func (*PLongIntIntByteByteStringValue) Descriptor() ([]byte, []int) {
+	return fileDescriptor_22207ca389a047ff, []int{2}
+}
+
+func (m *PLongIntIntByteByteStringValue) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PLongIntIntByteByteStringValue.Unmarshal(m, b)
+}
+func (m *PLongIntIntByteByteStringValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PLongIntIntByteByteStringValue.Marshal(b, m, deterministic)
+}
+func (m *PLongIntIntByteByteStringValue) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PLongIntIntByteByteStringValue.Merge(m, src)
+}
+func (m *PLongIntIntByteByteStringValue) XXX_Size() int {
+	return xxx_messageInfo_PLongIntIntByteByteStringValue.Size(m)
+}
+func (m *PLongIntIntByteByteStringValue) XXX_DiscardUnknown() {
+	xxx_messageInfo_PLongIntIntByteByteStringValue.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PLongIntIntByteByteStringValue proto.InternalMessageInfo
+
+func (m *PLongIntIntByteByteStringValue) GetLongValue() int64 {
+	if m != nil {
+		return m.LongValue
+	}
+	return 0
+}
+
+func (m *PLongIntIntByteByteStringValue) GetIntValue1() int32 {
+	if m != nil {
+		return m.IntValue1
+	}
+	return 0
+}
+
+func (m *PLongIntIntByteByteStringValue) GetIntValue2() int32 {
+	if m != nil {
+		return m.IntValue2
+	}
+	return 0
+}
+
+func (m *PLongIntIntByteByteStringValue) GetByteValue1() int32 {
+	if m != nil {
+		return m.ByteValue1
+	}
+	return 0
+}
+
+func (m *PLongIntIntByteByteStringValue) GetByteValue2() int32 {
+	if m != nil {
+		return m.ByteValue2
+	}
+	return 0
+}
+
+func (m *PLongIntIntByteByteStringValue) GetStringValue() *wrappers.StringValue {
+	if m != nil {
+		return m.StringValue
+	}
+	return nil
+}
+
+type PIntBooleanIntBooleanValue struct {
+	IntValue1            int32    `protobuf:"varint,1,opt,name=intValue1,proto3" json:"intValue1,omitempty"`
+	BoolValue1           bool     `protobuf:"varint,2,opt,name=boolValue1,proto3" json:"boolValue1,omitempty"`
+	IntValue2            int32    `protobuf:"varint,3,opt,name=intValue2,proto3" json:"intValue2,omitempty"`
+	BoolValue2           bool     `protobuf:"varint,4,opt,name=boolValue2,proto3" json:"boolValue2,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *PIntBooleanIntBooleanValue) Reset()         { *m = PIntBooleanIntBooleanValue{} }
+func (m *PIntBooleanIntBooleanValue) String() string { return proto.CompactTextString(m) }
+func (*PIntBooleanIntBooleanValue) ProtoMessage()    {}
+func (*PIntBooleanIntBooleanValue) Descriptor() ([]byte, []int) {
+	return fileDescriptor_22207ca389a047ff, []int{3}
+}
+
+func (m *PIntBooleanIntBooleanValue) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PIntBooleanIntBooleanValue.Unmarshal(m, b)
+}
+func (m *PIntBooleanIntBooleanValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PIntBooleanIntBooleanValue.Marshal(b, m, deterministic)
+}
+func (m *PIntBooleanIntBooleanValue) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PIntBooleanIntBooleanValue.Merge(m, src)
+}
+func (m *PIntBooleanIntBooleanValue) XXX_Size() int {
+	return xxx_messageInfo_PIntBooleanIntBooleanValue.Size(m)
+}
+func (m *PIntBooleanIntBooleanValue) XXX_DiscardUnknown() {
+	xxx_messageInfo_PIntBooleanIntBooleanValue.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PIntBooleanIntBooleanValue proto.InternalMessageInfo
+
+func (m *PIntBooleanIntBooleanValue) GetIntValue1() int32 {
+	if m != nil {
+		return m.IntValue1
+	}
+	return 0
+}
+
+func (m *PIntBooleanIntBooleanValue) GetBoolValue1() bool {
+	if m != nil {
+		return m.BoolValue1
+	}
+	return false
+}
+
+func (m *PIntBooleanIntBooleanValue) GetIntValue2() int32 {
+	if m != nil {
+		return m.IntValue2
+	}
+	return 0
+}
+
+func (m *PIntBooleanIntBooleanValue) GetBoolValue2() bool {
+	if m != nil {
+		return m.BoolValue2
+	}
+	return false
+}
+
+type PStringStringValue struct {
+	StringValue1         *wrappers.StringValue `protobuf:"bytes,1,opt,name=stringValue1,proto3" json:"stringValue1,omitempty"`
+	StringValue2         *wrappers.StringValue `protobuf:"bytes,2,opt,name=stringValue2,proto3" json:"stringValue2,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
+	XXX_unrecognized     []byte                `json:"-"`
+	XXX_sizecache        int32                 `json:"-"`
+}
+
+func (m *PStringStringValue) Reset()         { *m = PStringStringValue{} }
+func (m *PStringStringValue) String() string { return proto.CompactTextString(m) }
+func (*PStringStringValue) ProtoMessage()    {}
+func (*PStringStringValue) Descriptor() ([]byte, []int) {
+	return fileDescriptor_22207ca389a047ff, []int{4}
+}
+
+func (m *PStringStringValue) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PStringStringValue.Unmarshal(m, b)
+}
+func (m *PStringStringValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PStringStringValue.Marshal(b, m, deterministic)
+}
+func (m *PStringStringValue) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PStringStringValue.Merge(m, src)
+}
+func (m *PStringStringValue) XXX_Size() int {
+	return xxx_messageInfo_PStringStringValue.Size(m)
+}
+func (m *PStringStringValue) XXX_DiscardUnknown() {
+	xxx_messageInfo_PStringStringValue.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PStringStringValue proto.InternalMessageInfo
+
+func (m *PStringStringValue) GetStringValue1() *wrappers.StringValue {
+	if m != nil {
+		return m.StringValue1
+	}
+	return nil
+}
+
+func (m *PStringStringValue) GetStringValue2() *wrappers.StringValue {
+	if m != nil {
+		return m.StringValue2
+	}
+	return nil
+}
+
+type PAnnotationValue struct {
+	// Types that are valid to be assigned to Field:
+	//	*PAnnotationValue_StringValue
+	//	*PAnnotationValue_BoolValue
+	//	*PAnnotationValue_IntValue
+	//	*PAnnotationValue_LongValue
+	//	*PAnnotationValue_ShortValue
+	//	*PAnnotationValue_DoubleValue
+	//	*PAnnotationValue_BinaryValue
+	//	*PAnnotationValue_ByteValue
+	//	*PAnnotationValue_IntStringValue
+	//	*PAnnotationValue_StringStringValue
+	//	*PAnnotationValue_IntStringStringValue
+	//	*PAnnotationValue_LongIntIntByteByteStringValue
+	//	*PAnnotationValue_IntBooleanIntBooleanValue
+	Field                isPAnnotationValue_Field `protobuf_oneof:"field"`
+	XXX_NoUnkeyedLiteral struct{}                 `json:"-"`
+	XXX_unrecognized     []byte                   `json:"-"`
+	XXX_sizecache        int32                    `json:"-"`
+}
+
+func (m *PAnnotationValue) Reset()         { *m = PAnnotationValue{} }
+func (m *PAnnotationValue) String() string { return proto.CompactTextString(m) }
+func (*PAnnotationValue) ProtoMessage()    {}
+func (*PAnnotationValue) Descriptor() ([]byte, []int) {
+	return fileDescriptor_22207ca389a047ff, []int{5}
+}
+
+func (m *PAnnotationValue) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PAnnotationValue.Unmarshal(m, b)
+}
+func (m *PAnnotationValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PAnnotationValue.Marshal(b, m, deterministic)
+}
+func (m *PAnnotationValue) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PAnnotationValue.Merge(m, src)
+}
+func (m *PAnnotationValue) XXX_Size() int {
+	return xxx_messageInfo_PAnnotationValue.Size(m)
+}
+func (m *PAnnotationValue) XXX_DiscardUnknown() {
+	xxx_messageInfo_PAnnotationValue.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PAnnotationValue proto.InternalMessageInfo
+
+type isPAnnotationValue_Field interface {
+	isPAnnotationValue_Field()
+}
+
+type PAnnotationValue_StringValue struct {
+	StringValue string `protobuf:"bytes,1,opt,name=stringValue,proto3,oneof"`
+}
+
+type PAnnotationValue_BoolValue struct {
+	BoolValue bool `protobuf:"varint,2,opt,name=boolValue,proto3,oneof"`
+}
+
+type PAnnotationValue_IntValue struct {
+	IntValue int32 `protobuf:"varint,3,opt,name=intValue,proto3,oneof"`
+}
+
+type PAnnotationValue_LongValue struct {
+	LongValue int64 `protobuf:"varint,4,opt,name=longValue,proto3,oneof"`
+}
+
+type PAnnotationValue_ShortValue struct {
+	ShortValue int32 `protobuf:"zigzag32,5,opt,name=shortValue,proto3,oneof"`
+}
+
+type PAnnotationValue_DoubleValue struct {
+	DoubleValue float64 `protobuf:"fixed64,6,opt,name=doubleValue,proto3,oneof"`
+}
+
+type PAnnotationValue_BinaryValue struct {
+	BinaryValue []byte `protobuf:"bytes,7,opt,name=binaryValue,proto3,oneof"`
+}
+
+type PAnnotationValue_ByteValue struct {
+	ByteValue int32 `protobuf:"zigzag32,8,opt,name=byteValue,proto3,oneof"`
+}
+
+type PAnnotationValue_IntStringValue struct {
+	IntStringValue *PIntStringValue `protobuf:"bytes,9,opt,name=intStringValue,proto3,oneof"`
+}
+
+type PAnnotationValue_StringStringValue struct {
+	StringStringValue *PStringStringValue `protobuf:"bytes,10,opt,name=stringStringValue,proto3,oneof"`
+}
+
+type PAnnotationValue_IntStringStringValue struct {
+	IntStringStringValue *PIntStringStringValue `protobuf:"bytes,11,opt,name=intStringStringValue,proto3,oneof"`
+}
+
+type PAnnotationValue_LongIntIntByteByteStringValue struct {
+	LongIntIntByteByteStringValue *PLongIntIntByteByteStringValue `protobuf:"bytes,12,opt,name=longIntIntByteByteStringValue,proto3,oneof"`
+}
+
+type PAnnotationValue_IntBooleanIntBooleanValue struct {
+	IntBooleanIntBooleanValue *PIntBooleanIntBooleanValue `protobuf:"bytes,13,opt,name=intBooleanIntBooleanValue,proto3,oneof"`
+}
+
+func (*PAnnotationValue_StringValue) isPAnnotationValue_Field() {}
+
+func (*PAnnotationValue_BoolValue) isPAnnotationValue_Field() {}
+
+func (*PAnnotationValue_IntValue) isPAnnotationValue_Field() {}
+
+func (*PAnnotationValue_LongValue) isPAnnotationValue_Field() {}
+
+func (*PAnnotationValue_ShortValue) isPAnnotationValue_Field() {}
+
+func (*PAnnotationValue_DoubleValue) isPAnnotationValue_Field() {}
+
+func (*PAnnotationValue_BinaryValue) isPAnnotationValue_Field() {}
+
+func (*PAnnotationValue_ByteValue) isPAnnotationValue_Field() {}
+
+func (*PAnnotationValue_IntStringValue) isPAnnotationValue_Field() {}
+
+func (*PAnnotationValue_StringStringValue) isPAnnotationValue_Field() {}
+
+func (*PAnnotationValue_IntStringStringValue) isPAnnotationValue_Field() {}
+
+func (*PAnnotationValue_LongIntIntByteByteStringValue) isPAnnotationValue_Field() {}
+
+func (*PAnnotationValue_IntBooleanIntBooleanValue) isPAnnotationValue_Field() {}
+
+func (m *PAnnotationValue) GetField() isPAnnotationValue_Field {
+	if m != nil {
+		return m.Field
+	}
+	return nil
+}
+
+func (m *PAnnotationValue) GetStringValue() string {
+	if x, ok := m.GetField().(*PAnnotationValue_StringValue); ok {
+		return x.StringValue
+	}
+	return ""
+}
+
+func (m *PAnnotationValue) GetBoolValue() bool {
+	if x, ok := m.GetField().(*PAnnotationValue_BoolValue); ok {
+		return x.BoolValue
+	}
+	return false
+}
+
+func (m *PAnnotationValue) GetIntValue() int32 {
+	if x, ok := m.GetField().(*PAnnotationValue_IntValue); ok {
+		return x.IntValue
+	}
+	return 0
+}
+
+func (m *PAnnotationValue) GetLongValue() int64 {
+	if x, ok := m.GetField().(*PAnnotationValue_LongValue); ok {
+		return x.LongValue
+	}
+	return 0
+}
+
+func (m *PAnnotationValue) GetShortValue() int32 {
+	if x, ok := m.GetField().(*PAnnotationValue_ShortValue); ok {
+		return x.ShortValue
+	}
+	return 0
+}
+
+func (m *PAnnotationValue) GetDoubleValue() float64 {
+	if x, ok := m.GetField().(*PAnnotationValue_DoubleValue); ok {
+		return x.DoubleValue
+	}
+	return 0
+}
+
+func (m *PAnnotationValue) GetBinaryValue() []byte {
+	if x, ok := m.GetField().(*PAnnotationValue_BinaryValue); ok {
+		return x.BinaryValue
+	}
+	return nil
+}
+
+func (m *PAnnotationValue) GetByteValue() int32 {
+	if x, ok := m.GetField().(*PAnnotationValue_ByteValue); ok {
+		return x.ByteValue
+	}
+	return 0
+}
+
+func (m *PAnnotationValue) GetIntStringValue() *PIntStringValue {
+	if x, ok := m.GetField().(*PAnnotationValue_IntStringValue); ok {
+		return x.IntStringValue
+	}
+	return nil
+}
+
+func (m *PAnnotationValue) GetStringStringValue() *PStringStringValue {
+	if x, ok := m.GetField().(*PAnnotationValue_StringStringValue); ok {
+		return x.StringStringValue
+	}
+	return nil
+}
+
+func (m *PAnnotationValue) GetIntStringStringValue() *PIntStringStringValue {
+	if x, ok := m.GetField().(*PAnnotationValue_IntStringStringValue); ok {
+		return x.IntStringStringValue
+	}
+	return nil
+}
+
+func (m *PAnnotationValue) GetLongIntIntByteByteStringValue() *PLongIntIntByteByteStringValue {
+	if x, ok := m.GetField().(*PAnnotationValue_LongIntIntByteByteStringValue); ok {
+		return x.LongIntIntByteByteStringValue
+	}
+	return nil
+}
+
+func (m *PAnnotationValue) GetIntBooleanIntBooleanValue() *PIntBooleanIntBooleanValue {
+	if x, ok := m.GetField().(*PAnnotationValue_IntBooleanIntBooleanValue); ok {
+		return x.IntBooleanIntBooleanValue
+	}
+	return nil
+}
+
+// XXX_OneofWrappers is for the internal use of the proto package.
+func (*PAnnotationValue) XXX_OneofWrappers() []interface{} {
+	return []interface{}{
+		(*PAnnotationValue_StringValue)(nil),
+		(*PAnnotationValue_BoolValue)(nil),
+		(*PAnnotationValue_IntValue)(nil),
+		(*PAnnotationValue_LongValue)(nil),
+		(*PAnnotationValue_ShortValue)(nil),
+		(*PAnnotationValue_DoubleValue)(nil),
+		(*PAnnotationValue_BinaryValue)(nil),
+		(*PAnnotationValue_ByteValue)(nil),
+		(*PAnnotationValue_IntStringValue)(nil),
+		(*PAnnotationValue_StringStringValue)(nil),
+		(*PAnnotationValue_IntStringStringValue)(nil),
+		(*PAnnotationValue_LongIntIntByteByteStringValue)(nil),
+		(*PAnnotationValue_IntBooleanIntBooleanValue)(nil),
+	}
+}
+
+type PAnnotation struct {
+	Key                  int32             `protobuf:"varint,1,opt,name=key,proto3" json:"key,omitempty"`
+	Value                *PAnnotationValue `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
+	XXX_unrecognized     []byte            `json:"-"`
+	XXX_sizecache        int32             `json:"-"`
+}
+
+func (m *PAnnotation) Reset()         { *m = PAnnotation{} }
+func (m *PAnnotation) String() string { return proto.CompactTextString(m) }
+func (*PAnnotation) ProtoMessage()    {}
+func (*PAnnotation) Descriptor() ([]byte, []int) {
+	return fileDescriptor_22207ca389a047ff, []int{6}
+}
+
+func (m *PAnnotation) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PAnnotation.Unmarshal(m, b)
+}
+func (m *PAnnotation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PAnnotation.Marshal(b, m, deterministic)
+}
+func (m *PAnnotation) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PAnnotation.Merge(m, src)
+}
+func (m *PAnnotation) XXX_Size() int {
+	return xxx_messageInfo_PAnnotation.Size(m)
+}
+func (m *PAnnotation) XXX_DiscardUnknown() {
+	xxx_messageInfo_PAnnotation.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PAnnotation proto.InternalMessageInfo
+
+func (m *PAnnotation) GetKey() int32 {
+	if m != nil {
+		return m.Key
+	}
+	return 0
+}
+
+func (m *PAnnotation) GetValue() *PAnnotationValue {
+	if m != nil {
+		return m.Value
+	}
+	return nil
+}
+
+func init() {
+	proto.RegisterType((*PIntStringValue)(nil), "v1.PIntStringValue")
+	proto.RegisterType((*PIntStringStringValue)(nil), "v1.PIntStringStringValue")
+	proto.RegisterType((*PLongIntIntByteByteStringValue)(nil), "v1.PLongIntIntByteByteStringValue")
+	proto.RegisterType((*PIntBooleanIntBooleanValue)(nil), "v1.PIntBooleanIntBooleanValue")
+	proto.RegisterType((*PStringStringValue)(nil), "v1.PStringStringValue")
+	proto.RegisterType((*PAnnotationValue)(nil), "v1.PAnnotationValue")
+	proto.RegisterType((*PAnnotation)(nil), "v1.PAnnotation")
+}
+
+func init() {
+	proto.RegisterFile("Annotation.proto", fileDescriptor_22207ca389a047ff)
+}
+
+var fileDescriptor_22207ca389a047ff = []byte{
+	// 599 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0x51, 0x6f, 0xd3, 0x30,
+	0x10, 0x8e, 0x57, 0xb2, 0xad, 0xd7, 0xc2, 0x3a, 0x33, 0x50, 0x56, 0x95, 0xa8, 0xe4, 0xa9, 0xe2,
+	0x21, 0x53, 0x83, 0xc4, 0x1b, 0x08, 0xfa, 0x80, 0x52, 0x81, 0x44, 0x64, 0x24, 0x1e, 0x91, 0xd2,
+	0xce, 0x2b, 0x81, 0xcc, 0x8e, 0x52, 0xb7, 0xa8, 0xff, 0x84, 0x7f, 0xc2, 0x8f, 0xe0, 0x1f, 0xf1,
+	0x84, 0xec, 0x34, 0xb3, 0x93, 0x76, 0x55, 0x2b, 0x1e, 0x2a, 0xb9, 0xe7, 0xbb, 0xef, 0xee, 0x3b,
+	0x7f, 0x77, 0x81, 0xce, 0x3b, 0xc6, 0xb8, 0x88, 0x45, 0xc2, 0x99, 0x9f, 0xe5, 0x5c, 0x70, 0x7c,
+	0xb4, 0x1c, 0x76, 0xdd, 0x19, 0xe7, 0xb3, 0x94, 0x5e, 0x29, 0xcb, 0x64, 0x71, 0x73, 0xf5, 0x33,
+	0x8f, 0xb3, 0x8c, 0xe6, 0xf3, 0xc2, 0xc7, 0xbb, 0x85, 0xb3, 0x68, 0xcc, 0xc4, 0x67, 0x91, 0x27,
+	0x6c, 0xf6, 0x25, 0x4e, 0x17, 0x14, 0x77, 0xe1, 0x34, 0x61, 0x42, 0x9d, 0x1d, 0xd4, 0x47, 0x03,
+	0x9b, 0xdc, 0xfd, 0xc7, 0x6f, 0xa0, 0x35, 0xd7, 0xae, 0xce, 0x51, 0x1f, 0x0d, 0x5a, 0x41, 0xcf,
+	0x2f, 0x92, 0xf8, 0x65, 0x12, 0xdf, 0x80, 0x23, 0x66, 0x80, 0xf7, 0x1b, 0xc1, 0x13, 0x9d, 0x6f,
+	0xdf, 0xac, 0x6f, 0xa1, 0x6d, 0x80, 0x0c, 0xf7, 0x4a, 0x5b, 0x89, 0xa8, 0x21, 0x04, 0x4e, 0xe3,
+	0x40, 0x84, 0xc0, 0xfb, 0x8b, 0xc0, 0x8d, 0x3e, 0x72, 0x36, 0x1b, 0x33, 0x31, 0x66, 0x62, 0xb4,
+	0x12, 0x54, 0xfe, 0x4c, 0x0a, 0x3d, 0x68, 0xa6, 0xbc, 0x6c, 0x8d, 0xe4, 0xd0, 0x20, 0xda, 0x20,
+	0x6f, 0x4b, 0x42, 0x05, 0x03, 0x9b, 0x68, 0x83, 0x79, 0x5b, 0x54, 0x67, 0xdc, 0x06, 0xd8, 0x05,
+	0x98, 0xac, 0x04, 0x5d, 0x07, 0x3f, 0xe8, 0xa3, 0xc1, 0x39, 0x31, 0x2c, 0x95, 0xfb, 0xc0, 0xb1,
+	0x6b, 0xf7, 0x41, 0xfd, 0xd9, 0x8e, 0x0f, 0x7d, 0xb6, 0x5f, 0x08, 0xba, 0xf2, 0xd9, 0x46, 0x9c,
+	0xa7, 0x34, 0x66, 0xfa, 0xb4, 0x85, 0x1a, 0xaa, 0x53, 0x93, 0xc5, 0x71, 0x9e, 0x1a, 0xcc, 0x4f,
+	0x89, 0x61, 0xd9, 0x83, 0x7a, 0xe9, 0x1b, 0x28, 0xea, 0x66, 0x74, 0x20, 0x4b, 0xc3, 0xd1, 0xa6,
+	0x9c, 0xea, 0x92, 0x41, 0xff, 0x2d, 0x99, 0xa3, 0x83, 0x25, 0xf3, 0xc7, 0x86, 0x4e, 0xa4, 0xa7,
+	0xb2, 0x28, 0xcc, 0xab, 0x3e, 0x85, 0xac, 0xab, 0x19, 0x5a, 0x95, 0x76, 0x63, 0x17, 0x9a, 0x77,
+	0x0c, 0x8b, 0x86, 0x85, 0x16, 0xd1, 0x26, 0xdc, 0x33, 0x66, 0x45, 0x35, 0x2c, 0xb4, 0x8c, 0x69,
+	0x71, 0x4d, 0x19, 0xca, 0x86, 0x35, 0x64, 0xb4, 0x16, 0x62, 0x1f, 0x60, 0xfe, 0x8d, 0xe7, 0xeb,
+	0x78, 0x25, 0x96, 0xd0, 0x22, 0x86, 0x4d, 0xd6, 0x78, 0xcd, 0x17, 0x93, 0x94, 0x6a, 0xb9, 0x20,
+	0x59, 0xa3, 0x61, 0x94, 0x3e, 0x93, 0x84, 0xc5, 0xf9, 0xaa, 0xf0, 0x39, 0xe9, 0xa3, 0x41, 0x5b,
+	0xfa, 0x18, 0x46, 0xc5, 0xa3, 0x14, 0xa1, 0x73, 0xba, 0x4e, 0xa4, 0x4d, 0xf8, 0x35, 0x3c, 0x4a,
+	0x2a, 0xbb, 0xc7, 0x69, 0xaa, 0x26, 0x3f, 0xf6, 0x97, 0x43, 0xbf, 0xb6, 0x96, 0x42, 0x8b, 0xd4,
+	0x9c, 0xf1, 0x7b, 0x38, 0x9f, 0xd7, 0x1f, 0xde, 0x01, 0x85, 0xf0, 0x54, 0x21, 0x6c, 0xc8, 0x22,
+	0xb4, 0xc8, 0x66, 0x08, 0xfe, 0x04, 0x17, 0xc9, 0x96, 0x95, 0xe4, 0xb4, 0x14, 0xd4, 0x65, 0xb5,
+	0x98, 0x2a, 0xda, 0xd6, 0x40, 0xfc, 0x1d, 0x9e, 0xa5, 0xbb, 0x36, 0x85, 0xd3, 0x56, 0xc8, 0x9e,
+	0x42, 0xde, 0xb9, 0x53, 0x42, 0x8b, 0xec, 0x86, 0xc2, 0x5f, 0xe1, 0x32, 0xb9, 0x6f, 0x30, 0x9d,
+	0x87, 0x2a, 0x8f, 0x5b, 0x32, 0xd8, 0xee, 0x15, 0x5a, 0xe4, 0x7e, 0x88, 0xd1, 0x09, 0xd8, 0x37,
+	0x09, 0x4d, 0xaf, 0xbd, 0x0f, 0xd0, 0x32, 0xc4, 0x8c, 0x3b, 0xd0, 0xf8, 0x41, 0x57, 0xeb, 0x69,
+	0x97, 0x47, 0xfc, 0x02, 0xec, 0xa5, 0xf1, 0x55, 0xb8, 0x50, 0x59, 0x6b, 0xf2, 0x27, 0x85, 0xcb,
+	0xe8, 0x15, 0x3c, 0x9f, 0xf2, 0x5b, 0x9f, 0xc5, 0x4b, 0x9a, 0x4f, 0x79, 0x9e, 0xf9, 0x59, 0xc2,
+	0x32, 0x9e, 0x30, 0xe1, 0xcf, 0xf2, 0x6c, 0xea, 0x8b, 0x3c, 0x9e, 0xd2, 0xd1, 0x99, 0x0e, 0x8e,
+	0xe4, 0xb4, 0x45, 0x68, 0x72, 0xac, 0xc6, 0xee, 0xe5, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x2a,
+	0x1f, 0x5b, 0xfa, 0xed, 0x06, 0x00, 0x00,
+}
diff --git a/collector-agent/protocol/Cmd.pb.go b/collector-agent/protocol/Cmd.pb.go
new file mode 100644
index 000000000..a6bf0cb11
--- /dev/null
+++ b/collector-agent/protocol/Cmd.pb.go
@@ -0,0 +1,919 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: Cmd.proto
+
+package v1
+
+import (
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	wrappers "github.com/golang/protobuf/ptypes/wrappers"
+	math "math"
+)
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
+
+type PCommandType int32
+
+const (
+	PCommandType_NONE                     PCommandType = 0
+	PCommandType_PING                     PCommandType = 100
+	PCommandType_PONG                     PCommandType = 101
+	PCommandType_ECHO                     PCommandType = 710
+	PCommandType_ACTIVE_THREAD_COUNT      PCommandType = 730
+	PCommandType_ACTIVE_THREAD_DUMP       PCommandType = 740
+	PCommandType_ACTIVE_THREAD_LIGHT_DUMP PCommandType = 750
+)
+
+var PCommandType_name = map[int32]string{
+	0:   "NONE",
+	100: "PING",
+	101: "PONG",
+	710: "ECHO",
+	730: "ACTIVE_THREAD_COUNT",
+	740: "ACTIVE_THREAD_DUMP",
+	750: "ACTIVE_THREAD_LIGHT_DUMP",
+}
+
+var PCommandType_value = map[string]int32{
+	"NONE":                     0,
+	"PING":                     100,
+	"PONG":                     101,
+	"ECHO":                     710,
+	"ACTIVE_THREAD_COUNT":      730,
+	"ACTIVE_THREAD_DUMP":       740,
+	"ACTIVE_THREAD_LIGHT_DUMP": 750,
+}
+
+func (x PCommandType) String() string {
+	return proto.EnumName(PCommandType_name, int32(x))
+}
+
+func (PCommandType) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_58faf01eae08271f, []int{0}
+}
+
+type PCmdMessage struct {
+	// Types that are valid to be assigned to Message:
+	//	*PCmdMessage_HandshakeMessage
+	//	*PCmdMessage_FailMessage
+	Message              isPCmdMessage_Message `protobuf_oneof:"message"`
+	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
+	XXX_unrecognized     []byte                `json:"-"`
+	XXX_sizecache        int32                 `json:"-"`
+}
+
+func (m *PCmdMessage) Reset()         { *m = PCmdMessage{} }
+func (m *PCmdMessage) String() string { return proto.CompactTextString(m) }
+func (*PCmdMessage) ProtoMessage()    {}
+func (*PCmdMessage) Descriptor() ([]byte, []int) {
+	return fileDescriptor_58faf01eae08271f, []int{0}
+}
+
+func (m *PCmdMessage) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PCmdMessage.Unmarshal(m, b)
+}
+func (m *PCmdMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PCmdMessage.Marshal(b, m, deterministic)
+}
+func (m *PCmdMessage) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PCmdMessage.Merge(m, src)
+}
+func (m *PCmdMessage) XXX_Size() int {
+	return xxx_messageInfo_PCmdMessage.Size(m)
+}
+func (m *PCmdMessage) XXX_DiscardUnknown() {
+	xxx_messageInfo_PCmdMessage.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PCmdMessage proto.InternalMessageInfo
+
+type isPCmdMessage_Message interface {
+	isPCmdMessage_Message()
+}
+
+type PCmdMessage_HandshakeMessage struct {
+	HandshakeMessage *PCmdServiceHandshake `protobuf:"bytes,1,opt,name=handshakeMessage,proto3,oneof"`
+}
+
+type PCmdMessage_FailMessage struct {
+	FailMessage *PCmdResponse `protobuf:"bytes,2,opt,name=failMessage,proto3,oneof"`
+}
+
+func (*PCmdMessage_HandshakeMessage) isPCmdMessage_Message() {}
+
+func (*PCmdMessage_FailMessage) isPCmdMessage_Message() {}
+
+func (m *PCmdMessage) GetMessage() isPCmdMessage_Message {
+	if m != nil {
+		return m.Message
+	}
+	return nil
+}
+
+func (m *PCmdMessage) GetHandshakeMessage() *PCmdServiceHandshake {
+	if x, ok := m.GetMessage().(*PCmdMessage_HandshakeMessage); ok {
+		return x.HandshakeMessage
+	}
+	return nil
+}
+
+func (m *PCmdMessage) GetFailMessage() *PCmdResponse {
+	if x, ok := m.GetMessage().(*PCmdMessage_FailMessage); ok {
+		return x.FailMessage
+	}
+	return nil
+}
+
+// XXX_OneofWrappers is for the internal use of the proto package.
+func (*PCmdMessage) XXX_OneofWrappers() []interface{} {
+	return []interface{}{
+		(*PCmdMessage_HandshakeMessage)(nil),
+		(*PCmdMessage_FailMessage)(nil),
+	}
+}
+
+type PCmdServiceHandshake struct {
+	// initial message
+	SupportCommandServiceKey []int32  `protobuf:"varint,1,rep,packed,name=supportCommandServiceKey,proto3" json:"supportCommandServiceKey,omitempty"`
+	XXX_NoUnkeyedLiteral     struct{} `json:"-"`
+	XXX_unrecognized         []byte   `json:"-"`
+	XXX_sizecache            int32    `json:"-"`
+}
+
+func (m *PCmdServiceHandshake) Reset()         { *m = PCmdServiceHandshake{} }
+func (m *PCmdServiceHandshake) String() string { return proto.CompactTextString(m) }
+func (*PCmdServiceHandshake) ProtoMessage()    {}
+func (*PCmdServiceHandshake) Descriptor() ([]byte, []int) {
+	return fileDescriptor_58faf01eae08271f, []int{1}
+}
+
+func (m *PCmdServiceHandshake) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PCmdServiceHandshake.Unmarshal(m, b)
+}
+func (m *PCmdServiceHandshake) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PCmdServiceHandshake.Marshal(b, m, deterministic)
+}
+func (m *PCmdServiceHandshake) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PCmdServiceHandshake.Merge(m, src)
+}
+func (m *PCmdServiceHandshake) XXX_Size() int {
+	return xxx_messageInfo_PCmdServiceHandshake.Size(m)
+}
+func (m *PCmdServiceHandshake) XXX_DiscardUnknown() {
+	xxx_messageInfo_PCmdServiceHandshake.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PCmdServiceHandshake proto.InternalMessageInfo
+
+func (m *PCmdServiceHandshake) GetSupportCommandServiceKey() []int32 {
+	if m != nil {
+		return m.SupportCommandServiceKey
+	}
+	return nil
+}
+
+type PCmdResponse struct {
+	ResponseId           int32                 `protobuf:"varint,1,opt,name=responseId,proto3" json:"responseId,omitempty"`
+	Status               int32                 `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"`
+	Message              *wrappers.StringValue `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
+	XXX_unrecognized     []byte                `json:"-"`
+	XXX_sizecache        int32                 `json:"-"`
+}
+
+func (m *PCmdResponse) Reset()         { *m = PCmdResponse{} }
+func (m *PCmdResponse) String() string { return proto.CompactTextString(m) }
+func (*PCmdResponse) ProtoMessage()    {}
+func (*PCmdResponse) Descriptor() ([]byte, []int) {
+	return fileDescriptor_58faf01eae08271f, []int{2}
+}
+
+func (m *PCmdResponse) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PCmdResponse.Unmarshal(m, b)
+}
+func (m *PCmdResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PCmdResponse.Marshal(b, m, deterministic)
+}
+func (m *PCmdResponse) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PCmdResponse.Merge(m, src)
+}
+func (m *PCmdResponse) XXX_Size() int {
+	return xxx_messageInfo_PCmdResponse.Size(m)
+}
+func (m *PCmdResponse) XXX_DiscardUnknown() {
+	xxx_messageInfo_PCmdResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PCmdResponse proto.InternalMessageInfo
+
+func (m *PCmdResponse) GetResponseId() int32 {
+	if m != nil {
+		return m.ResponseId
+	}
+	return 0
+}
+
+func (m *PCmdResponse) GetStatus() int32 {
+	if m != nil {
+		return m.Status
+	}
+	return 0
+}
+
+func (m *PCmdResponse) GetMessage() *wrappers.StringValue {
+	if m != nil {
+		return m.Message
+	}
+	return nil
+}
+
+type PCmdStreamResponse struct {
+	ResponseId           int32                 `protobuf:"varint,1,opt,name=responseId,proto3" json:"responseId,omitempty"`
+	SequenceId           int32                 `protobuf:"varint,2,opt,name=sequenceId,proto3" json:"sequenceId,omitempty"`
+	Message              *wrappers.StringValue `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
+	XXX_unrecognized     []byte                `json:"-"`
+	XXX_sizecache        int32                 `json:"-"`
+}
+
+func (m *PCmdStreamResponse) Reset()         { *m = PCmdStreamResponse{} }
+func (m *PCmdStreamResponse) String() string { return proto.CompactTextString(m) }
+func (*PCmdStreamResponse) ProtoMessage()    {}
+func (*PCmdStreamResponse) Descriptor() ([]byte, []int) {
+	return fileDescriptor_58faf01eae08271f, []int{3}
+}
+
+func (m *PCmdStreamResponse) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PCmdStreamResponse.Unmarshal(m, b)
+}
+func (m *PCmdStreamResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PCmdStreamResponse.Marshal(b, m, deterministic)
+}
+func (m *PCmdStreamResponse) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PCmdStreamResponse.Merge(m, src)
+}
+func (m *PCmdStreamResponse) XXX_Size() int {
+	return xxx_messageInfo_PCmdStreamResponse.Size(m)
+}
+func (m *PCmdStreamResponse) XXX_DiscardUnknown() {
+	xxx_messageInfo_PCmdStreamResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PCmdStreamResponse proto.InternalMessageInfo
+
+func (m *PCmdStreamResponse) GetResponseId() int32 {
+	if m != nil {
+		return m.ResponseId
+	}
+	return 0
+}
+
+func (m *PCmdStreamResponse) GetSequenceId() int32 {
+	if m != nil {
+		return m.SequenceId
+	}
+	return 0
+}
+
+func (m *PCmdStreamResponse) GetMessage() *wrappers.StringValue {
+	if m != nil {
+		return m.Message
+	}
+	return nil
+}
+
+type PCmdRequest struct {
+	RequestId int32 `protobuf:"varint,1,opt,name=requestId,proto3" json:"requestId,omitempty"`
+	// Types that are valid to be assigned to Command:
+	//	*PCmdRequest_CommandEcho
+	//	*PCmdRequest_CommandActiveThreadCount
+	//	*PCmdRequest_CommandActiveThreadDump
+	//	*PCmdRequest_CommandActiveThreadLightDump
+	Command              isPCmdRequest_Command `protobuf_oneof:"command"`
+	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
+	XXX_unrecognized     []byte                `json:"-"`
+	XXX_sizecache        int32                 `json:"-"`
+}
+
+func (m *PCmdRequest) Reset()         { *m = PCmdRequest{} }
+func (m *PCmdRequest) String() string { return proto.CompactTextString(m) }
+func (*PCmdRequest) ProtoMessage()    {}
+func (*PCmdRequest) Descriptor() ([]byte, []int) {
+	return fileDescriptor_58faf01eae08271f, []int{4}
+}
+
+func (m *PCmdRequest) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PCmdRequest.Unmarshal(m, b)
+}
+func (m *PCmdRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PCmdRequest.Marshal(b, m, deterministic)
+}
+func (m *PCmdRequest) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PCmdRequest.Merge(m, src)
+}
+func (m *PCmdRequest) XXX_Size() int {
+	return xxx_messageInfo_PCmdRequest.Size(m)
+}
+func (m *PCmdRequest) XXX_DiscardUnknown() {
+	xxx_messageInfo_PCmdRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PCmdRequest proto.InternalMessageInfo
+
+func (m *PCmdRequest) GetRequestId() int32 {
+	if m != nil {
+		return m.RequestId
+	}
+	return 0
+}
+
+type isPCmdRequest_Command interface {
+	isPCmdRequest_Command()
+}
+
+type PCmdRequest_CommandEcho struct {
+	CommandEcho *PCmdEcho `protobuf:"bytes,710,opt,name=commandEcho,proto3,oneof"`
+}
+
+type PCmdRequest_CommandActiveThreadCount struct {
+	CommandActiveThreadCount *PCmdActiveThreadCount `protobuf:"bytes,730,opt,name=commandActiveThreadCount,proto3,oneof"`
+}
+
+type PCmdRequest_CommandActiveThreadDump struct {
+	CommandActiveThreadDump *PCmdActiveThreadDump `protobuf:"bytes,740,opt,name=commandActiveThreadDump,proto3,oneof"`
+}
+
+type PCmdRequest_CommandActiveThreadLightDump struct {
+	CommandActiveThreadLightDump *PCmdActiveThreadLightDump `protobuf:"bytes,750,opt,name=commandActiveThreadLightDump,proto3,oneof"`
+}
+
+func (*PCmdRequest_CommandEcho) isPCmdRequest_Command() {}
+
+func (*PCmdRequest_CommandActiveThreadCount) isPCmdRequest_Command() {}
+
+func (*PCmdRequest_CommandActiveThreadDump) isPCmdRequest_Command() {}
+
+func (*PCmdRequest_CommandActiveThreadLightDump) isPCmdRequest_Command() {}
+
+func (m *PCmdRequest) GetCommand() isPCmdRequest_Command {
+	if m != nil {
+		return m.Command
+	}
+	return nil
+}
+
+func (m *PCmdRequest) GetCommandEcho() *PCmdEcho {
+	if x, ok := m.GetCommand().(*PCmdRequest_CommandEcho); ok {
+		return x.CommandEcho
+	}
+	return nil
+}
+
+func (m *PCmdRequest) GetCommandActiveThreadCount() *PCmdActiveThreadCount {
+	if x, ok := m.GetCommand().(*PCmdRequest_CommandActiveThreadCount); ok {
+		return x.CommandActiveThreadCount
+	}
+	return nil
+}
+
+func (m *PCmdRequest) GetCommandActiveThreadDump() *PCmdActiveThreadDump {
+	if x, ok := m.GetCommand().(*PCmdRequest_CommandActiveThreadDump); ok {
+		return x.CommandActiveThreadDump
+	}
+	return nil
+}
+
+func (m *PCmdRequest) GetCommandActiveThreadLightDump() *PCmdActiveThreadLightDump {
+	if x, ok := m.GetCommand().(*PCmdRequest_CommandActiveThreadLightDump); ok {
+		return x.CommandActiveThreadLightDump
+	}
+	return nil
+}
+
+// XXX_OneofWrappers is for the internal use of the proto package.
+func (*PCmdRequest) XXX_OneofWrappers() []interface{} {
+	return []interface{}{
+		(*PCmdRequest_CommandEcho)(nil),
+		(*PCmdRequest_CommandActiveThreadCount)(nil),
+		(*PCmdRequest_CommandActiveThreadDump)(nil),
+		(*PCmdRequest_CommandActiveThreadLightDump)(nil),
+	}
+}
+
+type PCmdEcho struct {
+	Message              string   `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *PCmdEcho) Reset()         { *m = PCmdEcho{} }
+func (m *PCmdEcho) String() string { return proto.CompactTextString(m) }
+func (*PCmdEcho) ProtoMessage()    {}
+func (*PCmdEcho) Descriptor() ([]byte, []int) {
+	return fileDescriptor_58faf01eae08271f, []int{5}
+}
+
+func (m *PCmdEcho) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PCmdEcho.Unmarshal(m, b)
+}
+func (m *PCmdEcho) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PCmdEcho.Marshal(b, m, deterministic)
+}
+func (m *PCmdEcho) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PCmdEcho.Merge(m, src)
+}
+func (m *PCmdEcho) XXX_Size() int {
+	return xxx_messageInfo_PCmdEcho.Size(m)
+}
+func (m *PCmdEcho) XXX_DiscardUnknown() {
+	xxx_messageInfo_PCmdEcho.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PCmdEcho proto.InternalMessageInfo
+
+func (m *PCmdEcho) GetMessage() string {
+	if m != nil {
+		return m.Message
+	}
+	return ""
+}
+
+type PCmdEchoResponse struct {
+	CommonResponse       *PCmdResponse `protobuf:"bytes,1,opt,name=commonResponse,proto3" json:"commonResponse,omitempty"`
+	Message              string        `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
+	XXX_unrecognized     []byte        `json:"-"`
+	XXX_sizecache        int32         `json:"-"`
+}
+
+func (m *PCmdEchoResponse) Reset()         { *m = PCmdEchoResponse{} }
+func (m *PCmdEchoResponse) String() string { return proto.CompactTextString(m) }
+func (*PCmdEchoResponse) ProtoMessage()    {}
+func (*PCmdEchoResponse) Descriptor() ([]byte, []int) {
+	return fileDescriptor_58faf01eae08271f, []int{6}
+}
+
+func (m *PCmdEchoResponse) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PCmdEchoResponse.Unmarshal(m, b)
+}
+func (m *PCmdEchoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PCmdEchoResponse.Marshal(b, m, deterministic)
+}
+func (m *PCmdEchoResponse) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PCmdEchoResponse.Merge(m, src)
+}
+func (m *PCmdEchoResponse) XXX_Size() int {
+	return xxx_messageInfo_PCmdEchoResponse.Size(m)
+}
+func (m *PCmdEchoResponse) XXX_DiscardUnknown() {
+	xxx_messageInfo_PCmdEchoResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PCmdEchoResponse proto.InternalMessageInfo
+
+func (m *PCmdEchoResponse) GetCommonResponse() *PCmdResponse {
+	if m != nil {
+		return m.CommonResponse
+	}
+	return nil
+}
+
+func (m *PCmdEchoResponse) GetMessage() string {
+	if m != nil {
+		return m.Message
+	}
+	return ""
+}
+
+type PCmdActiveThreadDump struct {
+	Limit                int32    `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"`
+	ThreadName           []string `protobuf:"bytes,2,rep,name=threadName,proto3" json:"threadName,omitempty"`
+	LocalTraceId         []int64  `protobuf:"varint,3,rep,packed,name=localTraceId,proto3" json:"localTraceId,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *PCmdActiveThreadDump) Reset()         { *m = PCmdActiveThreadDump{} }
+func (m *PCmdActiveThreadDump) String() string { return proto.CompactTextString(m) }
+func (*PCmdActiveThreadDump) ProtoMessage()    {}
+func (*PCmdActiveThreadDump) Descriptor() ([]byte, []int) {
+	return fileDescriptor_58faf01eae08271f, []int{7}
+}
+
+func (m *PCmdActiveThreadDump) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PCmdActiveThreadDump.Unmarshal(m, b)
+}
+func (m *PCmdActiveThreadDump) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PCmdActiveThreadDump.Marshal(b, m, deterministic)
+}
+func (m *PCmdActiveThreadDump) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PCmdActiveThreadDump.Merge(m, src)
+}
+func (m *PCmdActiveThreadDump) XXX_Size() int {
+	return xxx_messageInfo_PCmdActiveThreadDump.Size(m)
+}
+func (m *PCmdActiveThreadDump) XXX_DiscardUnknown() {
+	xxx_messageInfo_PCmdActiveThreadDump.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PCmdActiveThreadDump proto.InternalMessageInfo
+
+func (m *PCmdActiveThreadDump) GetLimit() int32 {
+	if m != nil {
+		return m.Limit
+	}
+	return 0
+}
+
+func (m *PCmdActiveThreadDump) GetThreadName() []string {
+	if m != nil {
+		return m.ThreadName
+	}
+	return nil
+}
+
+func (m *PCmdActiveThreadDump) GetLocalTraceId() []int64 {
+	if m != nil {
+		return m.LocalTraceId
+	}
+	return nil
+}
+
+type PCmdActiveThreadDumpRes struct {
+	CommonResponse       *PCmdResponse        `protobuf:"bytes,1,opt,name=commonResponse,proto3" json:"commonResponse,omitempty"`
+	ThreadDump           []*PActiveThreadDump `protobuf:"bytes,2,rep,name=threadDump,proto3" json:"threadDump,omitempty"`
+	Type                 string               `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
+	SubType              string               `protobuf:"bytes,4,opt,name=subType,proto3" json:"subType,omitempty"`
+	Version              string               `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
+	XXX_unrecognized     []byte               `json:"-"`
+	XXX_sizecache        int32                `json:"-"`
+}
+
+func (m *PCmdActiveThreadDumpRes) Reset()         { *m = PCmdActiveThreadDumpRes{} }
+func (m *PCmdActiveThreadDumpRes) String() string { return proto.CompactTextString(m) }
+func (*PCmdActiveThreadDumpRes) ProtoMessage()    {}
+func (*PCmdActiveThreadDumpRes) Descriptor() ([]byte, []int) {
+	return fileDescriptor_58faf01eae08271f, []int{8}
+}
+
+func (m *PCmdActiveThreadDumpRes) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PCmdActiveThreadDumpRes.Unmarshal(m, b)
+}
+func (m *PCmdActiveThreadDumpRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PCmdActiveThreadDumpRes.Marshal(b, m, deterministic)
+}
+func (m *PCmdActiveThreadDumpRes) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PCmdActiveThreadDumpRes.Merge(m, src)
+}
+func (m *PCmdActiveThreadDumpRes) XXX_Size() int {
+	return xxx_messageInfo_PCmdActiveThreadDumpRes.Size(m)
+}
+func (m *PCmdActiveThreadDumpRes) XXX_DiscardUnknown() {
+	xxx_messageInfo_PCmdActiveThreadDumpRes.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PCmdActiveThreadDumpRes proto.InternalMessageInfo
+
+func (m *PCmdActiveThreadDumpRes) GetCommonResponse() *PCmdResponse {
+	if m != nil {
+		return m.CommonResponse
+	}
+	return nil
+}
+
+func (m *PCmdActiveThreadDumpRes) GetThreadDump() []*PActiveThreadDump {
+	if m != nil {
+		return m.ThreadDump
+	}
+	return nil
+}
+
+func (m *PCmdActiveThreadDumpRes) GetType() string {
+	if m != nil {
+		return m.Type
+	}
+	return ""
+}
+
+func (m *PCmdActiveThreadDumpRes) GetSubType() string {
+	if m != nil {
+		return m.SubType
+	}
+	return ""
+}
+
+func (m *PCmdActiveThreadDumpRes) GetVersion() string {
+	if m != nil {
+		return m.Version
+	}
+	return ""
+}
+
+type PCmdActiveThreadLightDump struct {
+	Limit                int32    `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"`
+	ThreadName           []string `protobuf:"bytes,2,rep,name=threadName,proto3" json:"threadName,omitempty"`
+	LocalTraceId         []int64  `protobuf:"varint,3,rep,packed,name=localTraceId,proto3" json:"localTraceId,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *PCmdActiveThreadLightDump) Reset()         { *m = PCmdActiveThreadLightDump{} }
+func (m *PCmdActiveThreadLightDump) String() string { return proto.CompactTextString(m) }
+func (*PCmdActiveThreadLightDump) ProtoMessage()    {}
+func (*PCmdActiveThreadLightDump) Descriptor() ([]byte, []int) {
+	return fileDescriptor_58faf01eae08271f, []int{9}
+}
+
+func (m *PCmdActiveThreadLightDump) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PCmdActiveThreadLightDump.Unmarshal(m, b)
+}
+func (m *PCmdActiveThreadLightDump) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PCmdActiveThreadLightDump.Marshal(b, m, deterministic)
+}
+func (m *PCmdActiveThreadLightDump) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PCmdActiveThreadLightDump.Merge(m, src)
+}
+func (m *PCmdActiveThreadLightDump) XXX_Size() int {
+	return xxx_messageInfo_PCmdActiveThreadLightDump.Size(m)
+}
+func (m *PCmdActiveThreadLightDump) XXX_DiscardUnknown() {
+	xxx_messageInfo_PCmdActiveThreadLightDump.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PCmdActiveThreadLightDump proto.InternalMessageInfo
+
+func (m *PCmdActiveThreadLightDump) GetLimit() int32 {
+	if m != nil {
+		return m.Limit
+	}
+	return 0
+}
+
+func (m *PCmdActiveThreadLightDump) GetThreadName() []string {
+	if m != nil {
+		return m.ThreadName
+	}
+	return nil
+}
+
+func (m *PCmdActiveThreadLightDump) GetLocalTraceId() []int64 {
+	if m != nil {
+		return m.LocalTraceId
+	}
+	return nil
+}
+
+type PCmdActiveThreadLightDumpRes struct {
+	CommonResponse       *PCmdResponse             `protobuf:"bytes,1,opt,name=commonResponse,proto3" json:"commonResponse,omitempty"`
+	ThreadDump           []*PActiveThreadLightDump `protobuf:"bytes,2,rep,name=threadDump,proto3" json:"threadDump,omitempty"`
+	Type                 string                    `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
+	SubType              string                    `protobuf:"bytes,4,opt,name=subType,proto3" json:"subType,omitempty"`
+	Version              string                    `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}                  `json:"-"`
+	XXX_unrecognized     []byte                    `json:"-"`
+	XXX_sizecache        int32                     `json:"-"`
+}
+
+func (m *PCmdActiveThreadLightDumpRes) Reset()         { *m = PCmdActiveThreadLightDumpRes{} }
+func (m *PCmdActiveThreadLightDumpRes) String() string { return proto.CompactTextString(m) }
+func (*PCmdActiveThreadLightDumpRes) ProtoMessage()    {}
+func (*PCmdActiveThreadLightDumpRes) Descriptor() ([]byte, []int) {
+	return fileDescriptor_58faf01eae08271f, []int{10}
+}
+
+func (m *PCmdActiveThreadLightDumpRes) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PCmdActiveThreadLightDumpRes.Unmarshal(m, b)
+}
+func (m *PCmdActiveThreadLightDumpRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PCmdActiveThreadLightDumpRes.Marshal(b, m, deterministic)
+}
+func (m *PCmdActiveThreadLightDumpRes) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PCmdActiveThreadLightDumpRes.Merge(m, src)
+}
+func (m *PCmdActiveThreadLightDumpRes) XXX_Size() int {
+	return xxx_messageInfo_PCmdActiveThreadLightDumpRes.Size(m)
+}
+func (m *PCmdActiveThreadLightDumpRes) XXX_DiscardUnknown() {
+	xxx_messageInfo_PCmdActiveThreadLightDumpRes.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PCmdActiveThreadLightDumpRes proto.InternalMessageInfo
+
+func (m *PCmdActiveThreadLightDumpRes) GetCommonResponse() *PCmdResponse {
+	if m != nil {
+		return m.CommonResponse
+	}
+	return nil
+}
+
+func (m *PCmdActiveThreadLightDumpRes) GetThreadDump() []*PActiveThreadLightDump {
+	if m != nil {
+		return m.ThreadDump
+	}
+	return nil
+}
+
+func (m *PCmdActiveThreadLightDumpRes) GetType() string {
+	if m != nil {
+		return m.Type
+	}
+	return ""
+}
+
+func (m *PCmdActiveThreadLightDumpRes) GetSubType() string {
+	if m != nil {
+		return m.SubType
+	}
+	return ""
+}
+
+func (m *PCmdActiveThreadLightDumpRes) GetVersion() string {
+	if m != nil {
+		return m.Version
+	}
+	return ""
+}
+
+type PCmdActiveThreadCount struct {
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *PCmdActiveThreadCount) Reset()         { *m = PCmdActiveThreadCount{} }
+func (m *PCmdActiveThreadCount) String() string { return proto.CompactTextString(m) }
+func (*PCmdActiveThreadCount) ProtoMessage()    {}
+func (*PCmdActiveThreadCount) Descriptor() ([]byte, []int) {
+	return fileDescriptor_58faf01eae08271f, []int{11}
+}
+
+func (m *PCmdActiveThreadCount) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PCmdActiveThreadCount.Unmarshal(m, b)
+}
+func (m *PCmdActiveThreadCount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PCmdActiveThreadCount.Marshal(b, m, deterministic)
+}
+func (m *PCmdActiveThreadCount) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PCmdActiveThreadCount.Merge(m, src)
+}
+func (m *PCmdActiveThreadCount) XXX_Size() int {
+	return xxx_messageInfo_PCmdActiveThreadCount.Size(m)
+}
+func (m *PCmdActiveThreadCount) XXX_DiscardUnknown() {
+	xxx_messageInfo_PCmdActiveThreadCount.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PCmdActiveThreadCount proto.InternalMessageInfo
+
+type PCmdActiveThreadCountRes struct {
+	CommonStreamResponse *PCmdStreamResponse `protobuf:"bytes,1,opt,name=commonStreamResponse,proto3" json:"commonStreamResponse,omitempty"`
+	HistogramSchemaType  int32               `protobuf:"varint,2,opt,name=histogramSchemaType,proto3" json:"histogramSchemaType,omitempty"`
+	ActiveThreadCount    []int32             `protobuf:"varint,3,rep,packed,name=activeThreadCount,proto3" json:"activeThreadCount,omitempty"`
+	TimeStamp            int64               `protobuf:"varint,4,opt,name=timeStamp,proto3" json:"timeStamp,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}            `json:"-"`
+	XXX_unrecognized     []byte              `json:"-"`
+	XXX_sizecache        int32               `json:"-"`
+}
+
+func (m *PCmdActiveThreadCountRes) Reset()         { *m = PCmdActiveThreadCountRes{} }
+func (m *PCmdActiveThreadCountRes) String() string { return proto.CompactTextString(m) }
+func (*PCmdActiveThreadCountRes) ProtoMessage()    {}
+func (*PCmdActiveThreadCountRes) Descriptor() ([]byte, []int) {
+	return fileDescriptor_58faf01eae08271f, []int{12}
+}
+
+func (m *PCmdActiveThreadCountRes) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PCmdActiveThreadCountRes.Unmarshal(m, b)
+}
+func (m *PCmdActiveThreadCountRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PCmdActiveThreadCountRes.Marshal(b, m, deterministic)
+}
+func (m *PCmdActiveThreadCountRes) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PCmdActiveThreadCountRes.Merge(m, src)
+}
+func (m *PCmdActiveThreadCountRes) XXX_Size() int {
+	return xxx_messageInfo_PCmdActiveThreadCountRes.Size(m)
+}
+func (m *PCmdActiveThreadCountRes) XXX_DiscardUnknown() {
+	xxx_messageInfo_PCmdActiveThreadCountRes.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PCmdActiveThreadCountRes proto.InternalMessageInfo
+
+func (m *PCmdActiveThreadCountRes) GetCommonStreamResponse() *PCmdStreamResponse {
+	if m != nil {
+		return m.CommonStreamResponse
+	}
+	return nil
+}
+
+func (m *PCmdActiveThreadCountRes) GetHistogramSchemaType() int32 {
+	if m != nil {
+		return m.HistogramSchemaType
+	}
+	return 0
+}
+
+func (m *PCmdActiveThreadCountRes) GetActiveThreadCount() []int32 {
+	if m != nil {
+		return m.ActiveThreadCount
+	}
+	return nil
+}
+
+func (m *PCmdActiveThreadCountRes) GetTimeStamp() int64 {
+	if m != nil {
+		return m.TimeStamp
+	}
+	return 0
+}
+
+func init() {
+	proto.RegisterEnum("v1.PCommandType", PCommandType_name, PCommandType_value)
+	proto.RegisterType((*PCmdMessage)(nil), "v1.PCmdMessage")
+	proto.RegisterType((*PCmdServiceHandshake)(nil), "v1.PCmdServiceHandshake")
+	proto.RegisterType((*PCmdResponse)(nil), "v1.PCmdResponse")
+	proto.RegisterType((*PCmdStreamResponse)(nil), "v1.PCmdStreamResponse")
+	proto.RegisterType((*PCmdRequest)(nil), "v1.PCmdRequest")
+	proto.RegisterType((*PCmdEcho)(nil), "v1.PCmdEcho")
+	proto.RegisterType((*PCmdEchoResponse)(nil), "v1.PCmdEchoResponse")
+	proto.RegisterType((*PCmdActiveThreadDump)(nil), "v1.PCmdActiveThreadDump")
+	proto.RegisterType((*PCmdActiveThreadDumpRes)(nil), "v1.PCmdActiveThreadDumpRes")
+	proto.RegisterType((*PCmdActiveThreadLightDump)(nil), "v1.PCmdActiveThreadLightDump")
+	proto.RegisterType((*PCmdActiveThreadLightDumpRes)(nil), "v1.PCmdActiveThreadLightDumpRes")
+	proto.RegisterType((*PCmdActiveThreadCount)(nil), "v1.PCmdActiveThreadCount")
+	proto.RegisterType((*PCmdActiveThreadCountRes)(nil), "v1.PCmdActiveThreadCountRes")
+}
+
+func init() {
+	proto.RegisterFile("Cmd.proto", fileDescriptor_58faf01eae08271f)
+}
+
+var fileDescriptor_58faf01eae08271f = []byte{
+	// 827 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0x4d, 0x6f, 0xdb, 0x36,
+	0x18, 0xb6, 0xa2, 0xa8, 0x8b, 0x5f, 0x07, 0x83, 0xc6, 0xa6, 0x8d, 0x1a, 0xa4, 0x41, 0x26, 0xec,
+	0x10, 0x0c, 0x83, 0xb2, 0x74, 0x1f, 0x18, 0x7a, 0x4b, 0x14, 0x2f, 0xca, 0xd6, 0x3a, 0x06, 0xe3,
+	0x14, 0xbb, 0x15, 0x8c, 0xc4, 0xd8, 0xc2, 0x2c, 0x51, 0xa3, 0x28, 0x0f, 0xbd, 0x0c, 0xbb, 0x0e,
+	0xd8, 0x79, 0x3f, 0xa9, 0x3f, 0x60, 0xc7, 0x62, 0xc7, 0x9c, 0xfb, 0x1b, 0x06, 0x92, 0x92, 0x2d,
+	0x57, 0xf2, 0x30, 0xb4, 0xc8, 0x8d, 0x7c, 0x9f, 0xe7, 0xfd, 0x7a, 0xf8, 0x92, 0x84, 0xae, 0x9f,
+	0x44, 0x5e, 0xc6, 0x99, 0x60, 0x68, 0x6d, 0x76, 0xb4, 0xb3, 0x37, 0x66, 0x6c, 0x3c, 0xa5, 0x87,
+	0xca, 0x72, 0x5d, 0xdc, 0x1c, 0xfe, 0xca, 0x49, 0x96, 0x51, 0x9e, 0x6b, 0xce, 0x8e, 0x3d, 0x9a,
+	0x70, 0x4a, 0xa2, 0xd3, 0x22, 0xc9, 0xb4, 0xc5, 0xfd, 0xcb, 0x80, 0xde, 0xd0, 0x4f, 0xa2, 0xe7,
+	0x34, 0xcf, 0xc9, 0x98, 0xa2, 0xef, 0xc1, 0x9e, 0x90, 0x34, 0xca, 0x27, 0xe4, 0x67, 0x5a, 0xda,
+	0x1c, 0x63, 0xdf, 0x38, 0xe8, 0x3d, 0x71, 0xbc, 0xd9, 0x91, 0x27, 0xa9, 0x97, 0x94, 0xcf, 0xe2,
+	0x90, 0x06, 0x15, 0x2d, 0xe8, 0xe0, 0x86, 0x0f, 0xfa, 0x1a, 0x7a, 0x37, 0x24, 0x9e, 0x56, 0x21,
+	0xd6, 0x54, 0x08, 0xbb, 0x0a, 0x81, 0x69, 0x9e, 0xb1, 0x34, 0x97, 0xae, 0x75, 0xda, 0x49, 0x17,
+	0x3e, 0x4a, 0xf4, 0xd2, 0xc5, 0xb0, 0xd5, 0x96, 0x0c, 0x3d, 0x05, 0x27, 0x2f, 0xb2, 0x8c, 0x71,
+	0xe1, 0xb3, 0x24, 0x21, 0x69, 0xc5, 0xf8, 0x91, 0xbe, 0x72, 0x8c, 0x7d, 0xf3, 0xc0, 0xc2, 0x2b,
+	0x71, 0xf7, 0x37, 0xd8, 0xac, 0x67, 0x47, 0x7b, 0x00, 0xbc, 0x5c, 0x9f, 0x47, 0xaa, 0x4d, 0x0b,
+	0xd7, 0x2c, 0xe8, 0x21, 0xdc, 0xcb, 0x05, 0x11, 0x45, 0xae, 0xea, 0xb7, 0x70, 0xb9, 0x43, 0xdf,
+	0xce, 0xcb, 0x74, 0x4c, 0xd5, 0xd8, 0xae, 0xa7, 0x85, 0xf7, 0x2a, 0xe1, 0xbd, 0x4b, 0xc1, 0xe3,
+	0x74, 0xfc, 0x82, 0x4c, 0x0b, 0x8a, 0xe7, 0x3d, 0xfd, 0x69, 0x00, 0x52, 0x4d, 0x09, 0x4e, 0x49,
+	0xf2, 0xbf, 0xcb, 0xd8, 0x03, 0xc8, 0xe9, 0x2f, 0x05, 0x4d, 0x43, 0x89, 0xeb, 0x52, 0x6a, 0x96,
+	0xf7, 0x2e, 0xe7, 0x77, 0x53, 0x9f, 0x3d, 0x96, 0xa1, 0x72, 0x81, 0x76, 0xa1, 0xcb, 0xf5, 0x72,
+	0x5e, 0xc6, 0xc2, 0x80, 0x8e, 0xa0, 0x17, 0x6a, 0x45, 0xfb, 0xe1, 0x84, 0x39, 0xaf, 0x2d, 0x95,
+	0x6a, 0xb3, 0x3a, 0x52, 0x69, 0x94, 0xc7, 0x59, 0xe3, 0xa0, 0x9f, 0xc0, 0x29, 0xb7, 0xc7, 0xa1,
+	0x88, 0x67, 0x54, 0x4f, 0x9f, 0xcf, 0x8a, 0x54, 0x38, 0x6f, 0xb4, 0xff, 0xa3, 0xca, 0xbf, 0xc1,
+	0x08, 0x3a, 0x78, 0xa5, 0x37, 0xba, 0x82, 0xed, 0x16, 0x4c, 0xce, 0xb5, 0x73, 0x6b, 0x2d, 0x8f,
+	0xeb, 0xbb, 0x84, 0xa0, 0x83, 0x57, 0xf9, 0xa2, 0x08, 0x76, 0x5b, 0xa0, 0x67, 0xf1, 0x78, 0x22,
+	0x54, 0xec, 0xb7, 0x3a, 0xf6, 0xe3, 0xb6, 0xd8, 0x73, 0x56, 0xd0, 0xc1, 0xff, 0x19, 0x45, 0x4e,
+	0x79, 0x89, 0xbb, 0x9f, 0xc1, 0x46, 0x25, 0x1e, 0x72, 0x16, 0xc7, 0x28, 0xc5, 0xef, 0x2e, 0x0e,
+	0xea, 0x06, 0xec, 0x8a, 0x35, 0x1f, 0x9a, 0xef, 0xe0, 0x63, 0x19, 0x84, 0xa5, 0x95, 0xa5, 0xbc,
+	0xa6, 0x8d, 0x3b, 0x86, 0xdf, 0xe1, 0xd5, 0xf3, 0xac, 0x2d, 0xe7, 0xc9, 0xf4, 0x9d, 0x6b, 0xc8,
+	0xb2, 0x05, 0xd6, 0x34, 0x4e, 0x62, 0x51, 0x0e, 0x85, 0xde, 0xc8, 0xb1, 0x14, 0x8a, 0x33, 0x20,
+	0x89, 0x0c, 0x65, 0x1e, 0x74, 0x71, 0xcd, 0x82, 0x5c, 0xd8, 0x9c, 0xb2, 0x90, 0x4c, 0x47, 0x9c,
+	0xa8, 0xc1, 0x35, 0xf7, 0xcd, 0x03, 0x13, 0x2f, 0xd9, 0xdc, 0xbf, 0x0d, 0xd8, 0x6e, 0x4b, 0x89,
+	0x69, 0xfe, 0x01, 0x1d, 0x7e, 0x53, 0x55, 0xa6, 0x0e, 0x4d, 0x56, 0xd6, 0x7b, 0xf2, 0x40, 0x79,
+	0x35, 0xf2, 0xd4, 0x88, 0x08, 0xc1, 0xba, 0x78, 0x95, 0xe9, 0x4b, 0xd4, 0xc5, 0x6a, 0x2d, 0xc5,
+	0xca, 0x8b, 0xeb, 0x91, 0x34, 0xaf, 0x6b, 0xb1, 0xca, 0xad, 0x44, 0x66, 0x94, 0xe7, 0x31, 0x4b,
+	0x1d, 0x4b, 0x23, 0xe5, 0xd6, 0x2d, 0xe0, 0xd1, 0xca, 0xe1, 0xb8, 0x43, 0x2d, 0xff, 0x31, 0x60,
+	0x77, 0x65, 0xde, 0x0f, 0x13, 0xf4, 0x69, 0x8b, 0xa0, 0x3b, 0x0d, 0x41, 0x17, 0xc9, 0xee, 0x42,
+	0xd5, 0x6d, 0x78, 0xd0, 0xfa, 0x4e, 0xb8, 0xb7, 0x06, 0x38, 0xad, 0x88, 0xec, 0xf9, 0x07, 0xd8,
+	0xd2, 0xbd, 0x2c, 0xbf, 0xb9, 0x65, 0xe7, 0x0f, 0xe7, 0x7f, 0xda, 0x12, 0x8a, 0x5b, 0x7d, 0xd0,
+	0x97, 0x70, 0x7f, 0x12, 0xe7, 0x82, 0x8d, 0x39, 0x49, 0x2e, 0xc3, 0x09, 0x4d, 0x88, 0xea, 0x40,
+	0x3f, 0xc8, 0x6d, 0x10, 0xfa, 0x02, 0x3e, 0x21, 0x8d, 0x97, 0xcf, 0x54, 0xbf, 0x54, 0x13, 0x90,
+	0xef, 0xaf, 0x88, 0x13, 0x7a, 0x29, 0x48, 0x92, 0x29, 0x5d, 0x4c, 0xbc, 0x30, 0x7c, 0xfe, 0x87,
+	0x21, 0x7f, 0x2f, 0xfd, 0x6e, 0xa8, 0xe0, 0x1b, 0xb0, 0x3e, 0xb8, 0x18, 0xf4, 0xed, 0x8e, 0x5c,
+	0x0d, 0xcf, 0x07, 0x67, 0x76, 0xa4, 0x56, 0x17, 0x83, 0x33, 0x9b, 0xa2, 0x2e, 0xac, 0xf7, 0xfd,
+	0xe0, 0xc2, 0x7e, 0x6d, 0x21, 0x07, 0xee, 0x1f, 0xfb, 0xa3, 0xf3, 0x17, 0xfd, 0x97, 0xa3, 0x00,
+	0xf7, 0x8f, 0x4f, 0x5f, 0xfa, 0x17, 0x57, 0x83, 0x91, 0xfd, 0xc6, 0x42, 0xdb, 0x80, 0x96, 0x91,
+	0xd3, 0xab, 0xe7, 0x43, 0xfb, 0xd6, 0x42, 0x8f, 0xc1, 0x59, 0x06, 0x9e, 0x9d, 0x9f, 0x05, 0x23,
+	0x0d, 0xbf, 0xb5, 0x4e, 0x0e, 0xe1, 0xd3, 0x90, 0x25, 0x5e, 0x4a, 0x66, 0x94, 0x87, 0x8c, 0x67,
+	0x5e, 0x16, 0xa7, 0x19, 0x8b, 0x53, 0xe1, 0x8d, 0x79, 0x16, 0x7a, 0x42, 0x4e, 0xe4, 0xc9, 0x86,
+	0x9f, 0x44, 0x43, 0xf9, 0x01, 0x0d, 0x8d, 0xeb, 0x7b, 0xea, 0x27, 0xfa, 0xea, 0xdf, 0x00, 0x00,
+	0x00, 0xff, 0xff, 0x09, 0xee, 0x9c, 0xcb, 0xb0, 0x08, 0x00, 0x00,
+}
diff --git a/collector-agent/protocol/Service.pb.go b/collector-agent/protocol/Service.pb.go
new file mode 100644
index 000000000..2a818199a
--- /dev/null
+++ b/collector-agent/protocol/Service.pb.go
@@ -0,0 +1,851 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: Service.proto
+
+package v1
+
+import (
+	context "context"
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	empty "github.com/golang/protobuf/ptypes/empty"
+	grpc "google.golang.org/grpc"
+	codes "google.golang.org/grpc/codes"
+	status "google.golang.org/grpc/status"
+	math "math"
+)
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
+
+func init() {
+	proto.RegisterFile("Service.proto", fileDescriptor_88420990119a24c7)
+}
+
+var fileDescriptor_88420990119a24c7 = []byte{
+	// 463 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0xd1, 0x6e, 0xd3, 0x30,
+	0x14, 0x5d, 0x61, 0xa0, 0xcd, 0x65, 0x50, 0x5d, 0x60, 0x48, 0xdd, 0x84, 0x60, 0x4f, 0xf0, 0xe2,
+	0xd1, 0x4e, 0x08, 0x24, 0x34, 0x89, 0xae, 0xab, 0x04, 0x12, 0x93, 0xa2, 0x86, 0xa7, 0xbd, 0x79,
+	0xc9, 0x6d, 0x6a, 0x29, 0xb1, 0x3d, 0xe7, 0x26, 0x12, 0xbf, 0xc2, 0x7f, 0xf0, 0x7f, 0xc8, 0x8e,
+	0x93, 0x8e, 0x52, 0x55, 0x7b, 0x3b, 0xf7, 0x5c, 0x9f, 0x73, 0xae, 0xed, 0xcb, 0x0e, 0x62, 0xb4,
+	0xb5, 0x4c, 0x90, 0x1b, 0xab, 0x49, 0xc3, 0x83, 0x7a, 0x34, 0x3c, 0xca, 0xb4, 0xce, 0x72, 0x3c,
+	0xf5, 0xcc, 0x4d, 0xb5, 0x38, 0xc5, 0xc2, 0xd0, 0xaf, 0xe6, 0xc0, 0x90, 0xc5, 0x46, 0xa8, 0x0e,
+	0x93, 0xa0, 0x80, 0x07, 0x3f, 0x97, 0x16, 0x45, 0x7a, 0x59, 0x15, 0x26, 0x30, 0xfb, 0xd3, 0x22,
+	0x6d, 0xe0, 0xf8, 0x2b, 0xdb, 0x75, 0x32, 0xf8, 0xcc, 0xf6, 0x62, 0x54, 0xa9, 0xc7, 0x03, 0x5e,
+	0x8f, 0x78, 0xe4, 0xe0, 0x15, 0x96, 0xa5, 0xc8, 0x70, 0x78, 0xc8, 0x9b, 0x60, 0xde, 0x06, 0xf3,
+	0x99, 0x0b, 0x3e, 0xd9, 0x79, 0xd7, 0x1b, 0x23, 0x7b, 0x34, 0xc9, 0x50, 0x11, 0x8c, 0xd8, 0x60,
+	0x8e, 0xb7, 0x15, 0x96, 0xe4, 0xeb, 0xef, 0x6a, 0xa1, 0xe1, 0xa9, 0xb7, 0xea, 0xea, 0x61, 0xdf,
+	0xd7, 0x73, 0x2c, 0xab, 0x9c, 0x4e, 0x76, 0xe0, 0x3d, 0xeb, 0x47, 0x52, 0x65, 0x31, 0x96, 0xa5,
+	0xd4, 0x0a, 0xf6, 0x7d, 0xd7, 0x31, 0xc3, 0x15, 0x74, 0x21, 0x1f, 0x7a, 0xe3, 0x3f, 0x3d, 0xb6,
+	0x77, 0x85, 0x24, 0x52, 0x41, 0x02, 0x3e, 0x32, 0x08, 0x51, 0xf1, 0x6d, 0xee, 0xd8, 0x4b, 0xc7,
+	0x86, 0xb9, 0x57, 0xcc, 0x7a, 0xdc, 0x4a, 0x36, 0x31, 0x72, 0x4d, 0x76, 0x87, 0x59, 0x97, 0x7d,
+	0x61, 0x2f, 0xdb, 0x34, 0xb2, 0x52, 0x65, 0x9d, 0xf2, 0x79, 0x13, 0xf8, 0x0f, 0xb9, 0x26, 0x1e,
+	0xcf, 0xd8, 0xae, 0xfb, 0x0b, 0x38, 0x77, 0xff, 0xa9, 0x52, 0xff, 0x14, 0x9e, 0x08, 0xd3, 0x92,
+	0xa0, 0xfb, 0xbc, 0xf2, 0xef, 0x87, 0xec, 0x30, 0xb2, 0x7a, 0x21, 0x73, 0xb4, 0x53, 0x5d, 0x14,
+	0x42, 0xa5, 0x61, 0x3d, 0xe0, 0x13, 0x3b, 0xf8, 0x26, 0x54, 0x9a, 0x63, 0xe0, 0xe1, 0x99, 0x77,
+	0x9e, 0x16, 0x69, 0x6b, 0xdc, 0x11, 0xe1, 0x1a, 0xcd, 0x93, 0xc2, 0x39, 0xeb, 0x07, 0xc9, 0x2c,
+	0x59, 0x6a, 0x78, 0xd1, 0x9e, 0x72, 0xd5, 0x1c, 0x4b, 0xa3, 0x55, 0xb9, 0x65, 0x28, 0xb8, 0x66,
+	0xaf, 0xdb, 0x49, 0xc8, 0xa2, 0x28, 0x26, 0x09, 0xc9, 0x1a, 0x9b, 0x65, 0x9b, 0xea, 0x4a, 0x11,
+	0x1c, 0xb7, 0x8e, 0xff, 0xb5, 0xe6, 0x58, 0x6e, 0xbb, 0x2e, 0x44, 0xec, 0x55, 0xf0, 0xbe, 0x2b,
+	0x75, 0x2b, 0x0c, 0x47, 0x9b, 0x4c, 0x5d, 0x67, 0xab, 0x27, 0x5c, 0xb3, 0xe3, 0x0d, 0x8e, 0x3f,
+	0x64, 0xb6, 0x24, 0x6f, 0xfb, 0x66, 0x93, 0x6d, 0xd7, 0xde, 0xea, 0x7d, 0x71, 0xc6, 0xde, 0x26,
+	0xba, 0xe0, 0x4a, 0xd4, 0x68, 0x13, 0x6d, 0x0d, 0x37, 0x52, 0x19, 0x2d, 0x15, 0xf1, 0xcc, 0x9a,
+	0x84, 0x93, 0x15, 0x09, 0x5e, 0x3c, 0x09, 0xff, 0x15, 0x39, 0x75, 0xd4, 0xbb, 0x79, 0xec, 0x6d,
+	0xce, 0xfe, 0x06, 0x00, 0x00, 0xff, 0xff, 0xa8, 0xaf, 0x53, 0x3a, 0xe7, 0x03, 0x00, 0x00,
+}
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ context.Context
+var _ grpc.ClientConnInterface
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+const _ = grpc.SupportPackageIsVersion6
+
+// SpanClient is the client API for Span service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
+type SpanClient interface {
+	SendSpan(ctx context.Context, opts ...grpc.CallOption) (Span_SendSpanClient, error)
+}
+
+type spanClient struct {
+	cc grpc.ClientConnInterface
+}
+
+func NewSpanClient(cc grpc.ClientConnInterface) SpanClient {
+	return &spanClient{cc}
+}
+
+func (c *spanClient) SendSpan(ctx context.Context, opts ...grpc.CallOption) (Span_SendSpanClient, error) {
+	stream, err := c.cc.NewStream(ctx, &_Span_serviceDesc.Streams[0], "/v1.Span/SendSpan", opts...)
+	if err != nil {
+		return nil, err
+	}
+	x := &spanSendSpanClient{stream}
+	return x, nil
+}
+
+type Span_SendSpanClient interface {
+	Send(*PSpanMessage) error
+	CloseAndRecv() (*empty.Empty, error)
+	grpc.ClientStream
+}
+
+type spanSendSpanClient struct {
+	grpc.ClientStream
+}
+
+func (x *spanSendSpanClient) Send(m *PSpanMessage) error {
+	return x.ClientStream.SendMsg(m)
+}
+
+func (x *spanSendSpanClient) CloseAndRecv() (*empty.Empty, error) {
+	if err := x.ClientStream.CloseSend(); err != nil {
+		return nil, err
+	}
+	m := new(empty.Empty)
+	if err := x.ClientStream.RecvMsg(m); err != nil {
+		return nil, err
+	}
+	return m, nil
+}
+
+// SpanServer is the server API for Span service.
+type SpanServer interface {
+	SendSpan(Span_SendSpanServer) error
+}
+
+// UnimplementedSpanServer can be embedded to have forward compatible implementations.
+type UnimplementedSpanServer struct {
+}
+
+func (*UnimplementedSpanServer) SendSpan(srv Span_SendSpanServer) error {
+	return status.Errorf(codes.Unimplemented, "method SendSpan not implemented")
+}
+
+func RegisterSpanServer(s *grpc.Server, srv SpanServer) {
+	s.RegisterService(&_Span_serviceDesc, srv)
+}
+
+func _Span_SendSpan_Handler(srv interface{}, stream grpc.ServerStream) error {
+	return srv.(SpanServer).SendSpan(&spanSendSpanServer{stream})
+}
+
+type Span_SendSpanServer interface {
+	SendAndClose(*empty.Empty) error
+	Recv() (*PSpanMessage, error)
+	grpc.ServerStream
+}
+
+type spanSendSpanServer struct {
+	grpc.ServerStream
+}
+
+func (x *spanSendSpanServer) SendAndClose(m *empty.Empty) error {
+	return x.ServerStream.SendMsg(m)
+}
+
+func (x *spanSendSpanServer) Recv() (*PSpanMessage, error) {
+	m := new(PSpanMessage)
+	if err := x.ServerStream.RecvMsg(m); err != nil {
+		return nil, err
+	}
+	return m, nil
+}
+
+var _Span_serviceDesc = grpc.ServiceDesc{
+	ServiceName: "v1.Span",
+	HandlerType: (*SpanServer)(nil),
+	Methods:     []grpc.MethodDesc{},
+	Streams: []grpc.StreamDesc{
+		{
+			StreamName:    "SendSpan",
+			Handler:       _Span_SendSpan_Handler,
+			ClientStreams: true,
+		},
+	},
+	Metadata: "Service.proto",
+}
+
+// AgentClient is the client API for Agent service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
+type AgentClient interface {
+	RequestAgentInfo(ctx context.Context, in *PAgentInfo, opts ...grpc.CallOption) (*PResult, error)
+	PingSession(ctx context.Context, opts ...grpc.CallOption) (Agent_PingSessionClient, error)
+}
+
+type agentClient struct {
+	cc grpc.ClientConnInterface
+}
+
+func NewAgentClient(cc grpc.ClientConnInterface) AgentClient {
+	return &agentClient{cc}
+}
+
+func (c *agentClient) RequestAgentInfo(ctx context.Context, in *PAgentInfo, opts ...grpc.CallOption) (*PResult, error) {
+	out := new(PResult)
+	err := c.cc.Invoke(ctx, "/v1.Agent/RequestAgentInfo", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *agentClient) PingSession(ctx context.Context, opts ...grpc.CallOption) (Agent_PingSessionClient, error) {
+	stream, err := c.cc.NewStream(ctx, &_Agent_serviceDesc.Streams[0], "/v1.Agent/PingSession", opts...)
+	if err != nil {
+		return nil, err
+	}
+	x := &agentPingSessionClient{stream}
+	return x, nil
+}
+
+type Agent_PingSessionClient interface {
+	Send(*PPing) error
+	Recv() (*PPing, error)
+	grpc.ClientStream
+}
+
+type agentPingSessionClient struct {
+	grpc.ClientStream
+}
+
+func (x *agentPingSessionClient) Send(m *PPing) error {
+	return x.ClientStream.SendMsg(m)
+}
+
+func (x *agentPingSessionClient) Recv() (*PPing, error) {
+	m := new(PPing)
+	if err := x.ClientStream.RecvMsg(m); err != nil {
+		return nil, err
+	}
+	return m, nil
+}
+
+// AgentServer is the server API for Agent service.
+type AgentServer interface {
+	RequestAgentInfo(context.Context, *PAgentInfo) (*PResult, error)
+	PingSession(Agent_PingSessionServer) error
+}
+
+// UnimplementedAgentServer can be embedded to have forward compatible implementations.
+type UnimplementedAgentServer struct {
+}
+
+func (*UnimplementedAgentServer) RequestAgentInfo(ctx context.Context, req *PAgentInfo) (*PResult, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method RequestAgentInfo not implemented")
+}
+func (*UnimplementedAgentServer) PingSession(srv Agent_PingSessionServer) error {
+	return status.Errorf(codes.Unimplemented, "method PingSession not implemented")
+}
+
+func RegisterAgentServer(s *grpc.Server, srv AgentServer) {
+	s.RegisterService(&_Agent_serviceDesc, srv)
+}
+
+func _Agent_RequestAgentInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(PAgentInfo)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(AgentServer).RequestAgentInfo(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/v1.Agent/RequestAgentInfo",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(AgentServer).RequestAgentInfo(ctx, req.(*PAgentInfo))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _Agent_PingSession_Handler(srv interface{}, stream grpc.ServerStream) error {
+	return srv.(AgentServer).PingSession(&agentPingSessionServer{stream})
+}
+
+type Agent_PingSessionServer interface {
+	Send(*PPing) error
+	Recv() (*PPing, error)
+	grpc.ServerStream
+}
+
+type agentPingSessionServer struct {
+	grpc.ServerStream
+}
+
+func (x *agentPingSessionServer) Send(m *PPing) error {
+	return x.ServerStream.SendMsg(m)
+}
+
+func (x *agentPingSessionServer) Recv() (*PPing, error) {
+	m := new(PPing)
+	if err := x.ServerStream.RecvMsg(m); err != nil {
+		return nil, err
+	}
+	return m, nil
+}
+
+var _Agent_serviceDesc = grpc.ServiceDesc{
+	ServiceName: "v1.Agent",
+	HandlerType: (*AgentServer)(nil),
+	Methods: []grpc.MethodDesc{
+		{
+			MethodName: "RequestAgentInfo",
+			Handler:    _Agent_RequestAgentInfo_Handler,
+		},
+	},
+	Streams: []grpc.StreamDesc{
+		{
+			StreamName:    "PingSession",
+			Handler:       _Agent_PingSession_Handler,
+			ServerStreams: true,
+			ClientStreams: true,
+		},
+	},
+	Metadata: "Service.proto",
+}
+
+// MetadataClient is the client API for Metadata service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
+type MetadataClient interface {
+	RequestSqlMetaData(ctx context.Context, in *PSqlMetaData, opts ...grpc.CallOption) (*PResult, error)
+	RequestApiMetaData(ctx context.Context, in *PApiMetaData, opts ...grpc.CallOption) (*PResult, error)
+	RequestStringMetaData(ctx context.Context, in *PStringMetaData, opts ...grpc.CallOption) (*PResult, error)
+}
+
+type metadataClient struct {
+	cc grpc.ClientConnInterface
+}
+
+func NewMetadataClient(cc grpc.ClientConnInterface) MetadataClient {
+	return &metadataClient{cc}
+}
+
+func (c *metadataClient) RequestSqlMetaData(ctx context.Context, in *PSqlMetaData, opts ...grpc.CallOption) (*PResult, error) {
+	out := new(PResult)
+	err := c.cc.Invoke(ctx, "/v1.Metadata/RequestSqlMetaData", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *metadataClient) RequestApiMetaData(ctx context.Context, in *PApiMetaData, opts ...grpc.CallOption) (*PResult, error) {
+	out := new(PResult)
+	err := c.cc.Invoke(ctx, "/v1.Metadata/RequestApiMetaData", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *metadataClient) RequestStringMetaData(ctx context.Context, in *PStringMetaData, opts ...grpc.CallOption) (*PResult, error) {
+	out := new(PResult)
+	err := c.cc.Invoke(ctx, "/v1.Metadata/RequestStringMetaData", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+// MetadataServer is the server API for Metadata service.
+type MetadataServer interface {
+	RequestSqlMetaData(context.Context, *PSqlMetaData) (*PResult, error)
+	RequestApiMetaData(context.Context, *PApiMetaData) (*PResult, error)
+	RequestStringMetaData(context.Context, *PStringMetaData) (*PResult, error)
+}
+
+// UnimplementedMetadataServer can be embedded to have forward compatible implementations.
+type UnimplementedMetadataServer struct {
+}
+
+func (*UnimplementedMetadataServer) RequestSqlMetaData(ctx context.Context, req *PSqlMetaData) (*PResult, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method RequestSqlMetaData not implemented")
+}
+func (*UnimplementedMetadataServer) RequestApiMetaData(ctx context.Context, req *PApiMetaData) (*PResult, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method RequestApiMetaData not implemented")
+}
+func (*UnimplementedMetadataServer) RequestStringMetaData(ctx context.Context, req *PStringMetaData) (*PResult, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method RequestStringMetaData not implemented")
+}
+
+func RegisterMetadataServer(s *grpc.Server, srv MetadataServer) {
+	s.RegisterService(&_Metadata_serviceDesc, srv)
+}
+
+func _Metadata_RequestSqlMetaData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(PSqlMetaData)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(MetadataServer).RequestSqlMetaData(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/v1.Metadata/RequestSqlMetaData",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(MetadataServer).RequestSqlMetaData(ctx, req.(*PSqlMetaData))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _Metadata_RequestApiMetaData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(PApiMetaData)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(MetadataServer).RequestApiMetaData(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/v1.Metadata/RequestApiMetaData",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(MetadataServer).RequestApiMetaData(ctx, req.(*PApiMetaData))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _Metadata_RequestStringMetaData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(PStringMetaData)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(MetadataServer).RequestStringMetaData(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/v1.Metadata/RequestStringMetaData",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(MetadataServer).RequestStringMetaData(ctx, req.(*PStringMetaData))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+var _Metadata_serviceDesc = grpc.ServiceDesc{
+	ServiceName: "v1.Metadata",
+	HandlerType: (*MetadataServer)(nil),
+	Methods: []grpc.MethodDesc{
+		{
+			MethodName: "RequestSqlMetaData",
+			Handler:    _Metadata_RequestSqlMetaData_Handler,
+		},
+		{
+			MethodName: "RequestApiMetaData",
+			Handler:    _Metadata_RequestApiMetaData_Handler,
+		},
+		{
+			MethodName: "RequestStringMetaData",
+			Handler:    _Metadata_RequestStringMetaData_Handler,
+		},
+	},
+	Streams:  []grpc.StreamDesc{},
+	Metadata: "Service.proto",
+}
+
+// StatClient is the client API for Stat service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
+type StatClient interface {
+	SendAgentStat(ctx context.Context, opts ...grpc.CallOption) (Stat_SendAgentStatClient, error)
+}
+
+type statClient struct {
+	cc grpc.ClientConnInterface
+}
+
+func NewStatClient(cc grpc.ClientConnInterface) StatClient {
+	return &statClient{cc}
+}
+
+func (c *statClient) SendAgentStat(ctx context.Context, opts ...grpc.CallOption) (Stat_SendAgentStatClient, error) {
+	stream, err := c.cc.NewStream(ctx, &_Stat_serviceDesc.Streams[0], "/v1.Stat/SendAgentStat", opts...)
+	if err != nil {
+		return nil, err
+	}
+	x := &statSendAgentStatClient{stream}
+	return x, nil
+}
+
+type Stat_SendAgentStatClient interface {
+	Send(*PStatMessage) error
+	CloseAndRecv() (*empty.Empty, error)
+	grpc.ClientStream
+}
+
+type statSendAgentStatClient struct {
+	grpc.ClientStream
+}
+
+func (x *statSendAgentStatClient) Send(m *PStatMessage) error {
+	return x.ClientStream.SendMsg(m)
+}
+
+func (x *statSendAgentStatClient) CloseAndRecv() (*empty.Empty, error) {
+	if err := x.ClientStream.CloseSend(); err != nil {
+		return nil, err
+	}
+	m := new(empty.Empty)
+	if err := x.ClientStream.RecvMsg(m); err != nil {
+		return nil, err
+	}
+	return m, nil
+}
+
+// StatServer is the server API for Stat service.
+type StatServer interface {
+	SendAgentStat(Stat_SendAgentStatServer) error
+}
+
+// UnimplementedStatServer can be embedded to have forward compatible implementations.
+type UnimplementedStatServer struct {
+}
+
+func (*UnimplementedStatServer) SendAgentStat(srv Stat_SendAgentStatServer) error {
+	return status.Errorf(codes.Unimplemented, "method SendAgentStat not implemented")
+}
+
+func RegisterStatServer(s *grpc.Server, srv StatServer) {
+	s.RegisterService(&_Stat_serviceDesc, srv)
+}
+
+func _Stat_SendAgentStat_Handler(srv interface{}, stream grpc.ServerStream) error {
+	return srv.(StatServer).SendAgentStat(&statSendAgentStatServer{stream})
+}
+
+type Stat_SendAgentStatServer interface {
+	SendAndClose(*empty.Empty) error
+	Recv() (*PStatMessage, error)
+	grpc.ServerStream
+}
+
+type statSendAgentStatServer struct {
+	grpc.ServerStream
+}
+
+func (x *statSendAgentStatServer) SendAndClose(m *empty.Empty) error {
+	return x.ServerStream.SendMsg(m)
+}
+
+func (x *statSendAgentStatServer) Recv() (*PStatMessage, error) {
+	m := new(PStatMessage)
+	if err := x.ServerStream.RecvMsg(m); err != nil {
+		return nil, err
+	}
+	return m, nil
+}
+
+var _Stat_serviceDesc = grpc.ServiceDesc{
+	ServiceName: "v1.Stat",
+	HandlerType: (*StatServer)(nil),
+	Methods:     []grpc.MethodDesc{},
+	Streams: []grpc.StreamDesc{
+		{
+			StreamName:    "SendAgentStat",
+			Handler:       _Stat_SendAgentStat_Handler,
+			ClientStreams: true,
+		},
+	},
+	Metadata: "Service.proto",
+}
+
+// ProfilerCommandServiceClient is the client API for ProfilerCommandService service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
+type ProfilerCommandServiceClient interface {
+	HandleCommand(ctx context.Context, opts ...grpc.CallOption) (ProfilerCommandService_HandleCommandClient, error)
+	CommandEcho(ctx context.Context, in *PCmdEchoResponse, opts ...grpc.CallOption) (*empty.Empty, error)
+	CommandStreamActiveThreadCount(ctx context.Context, opts ...grpc.CallOption) (ProfilerCommandService_CommandStreamActiveThreadCountClient, error)
+	CommandActiveThreadDump(ctx context.Context, in *PCmdActiveThreadDumpRes, opts ...grpc.CallOption) (*empty.Empty, error)
+	CommandActiveThreadLightDump(ctx context.Context, in *PCmdActiveThreadLightDumpRes, opts ...grpc.CallOption) (*empty.Empty, error)
+}
+
+type profilerCommandServiceClient struct {
+	cc grpc.ClientConnInterface
+}
+
+func NewProfilerCommandServiceClient(cc grpc.ClientConnInterface) ProfilerCommandServiceClient {
+	return &profilerCommandServiceClient{cc}
+}
+
+func (c *profilerCommandServiceClient) HandleCommand(ctx context.Context, opts ...grpc.CallOption) (ProfilerCommandService_HandleCommandClient, error) {
+	stream, err := c.cc.NewStream(ctx, &_ProfilerCommandService_serviceDesc.Streams[0], "/v1.ProfilerCommandService/HandleCommand", opts...)
+	if err != nil {
+		return nil, err
+	}
+	x := &profilerCommandServiceHandleCommandClient{stream}
+	return x, nil
+}
+
+type ProfilerCommandService_HandleCommandClient interface {
+	Send(*PCmdMessage) error
+	Recv() (*PCmdRequest, error)
+	grpc.ClientStream
+}
+
+type profilerCommandServiceHandleCommandClient struct {
+	grpc.ClientStream
+}
+
+func (x *profilerCommandServiceHandleCommandClient) Send(m *PCmdMessage) error {
+	return x.ClientStream.SendMsg(m)
+}
+
+func (x *profilerCommandServiceHandleCommandClient) Recv() (*PCmdRequest, error) {
+	m := new(PCmdRequest)
+	if err := x.ClientStream.RecvMsg(m); err != nil {
+		return nil, err
+	}
+	return m, nil
+}
+
+func (c *profilerCommandServiceClient) CommandEcho(ctx context.Context, in *PCmdEchoResponse, opts ...grpc.CallOption) (*empty.Empty, error) {
+	out := new(empty.Empty)
+	err := c.cc.Invoke(ctx, "/v1.ProfilerCommandService/CommandEcho", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *profilerCommandServiceClient) CommandStreamActiveThreadCount(ctx context.Context, opts ...grpc.CallOption) (ProfilerCommandService_CommandStreamActiveThreadCountClient, error) {
+	stream, err := c.cc.NewStream(ctx, &_ProfilerCommandService_serviceDesc.Streams[1], "/v1.ProfilerCommandService/CommandStreamActiveThreadCount", opts...)
+	if err != nil {
+		return nil, err
+	}
+	x := &profilerCommandServiceCommandStreamActiveThreadCountClient{stream}
+	return x, nil
+}
+
+type ProfilerCommandService_CommandStreamActiveThreadCountClient interface {
+	Send(*PCmdActiveThreadCountRes) error
+	CloseAndRecv() (*empty.Empty, error)
+	grpc.ClientStream
+}
+
+type profilerCommandServiceCommandStreamActiveThreadCountClient struct {
+	grpc.ClientStream
+}
+
+func (x *profilerCommandServiceCommandStreamActiveThreadCountClient) Send(m *PCmdActiveThreadCountRes) error {
+	return x.ClientStream.SendMsg(m)
+}
+
+func (x *profilerCommandServiceCommandStreamActiveThreadCountClient) CloseAndRecv() (*empty.Empty, error) {
+	if err := x.ClientStream.CloseSend(); err != nil {
+		return nil, err
+	}
+	m := new(empty.Empty)
+	if err := x.ClientStream.RecvMsg(m); err != nil {
+		return nil, err
+	}
+	return m, nil
+}
+
+func (c *profilerCommandServiceClient) CommandActiveThreadDump(ctx context.Context, in *PCmdActiveThreadDumpRes, opts ...grpc.CallOption) (*empty.Empty, error) {
+	out := new(empty.Empty)
+	err := c.cc.Invoke(ctx, "/v1.ProfilerCommandService/CommandActiveThreadDump", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *profilerCommandServiceClient) CommandActiveThreadLightDump(ctx context.Context, in *PCmdActiveThreadLightDumpRes, opts ...grpc.CallOption) (*empty.Empty, error) {
+	out := new(empty.Empty)
+	err := c.cc.Invoke(ctx, "/v1.ProfilerCommandService/CommandActiveThreadLightDump", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+// ProfilerCommandServiceServer is the server API for ProfilerCommandService service.
+type ProfilerCommandServiceServer interface {
+	HandleCommand(ProfilerCommandService_HandleCommandServer) error
+	CommandEcho(context.Context, *PCmdEchoResponse) (*empty.Empty, error)
+	CommandStreamActiveThreadCount(ProfilerCommandService_CommandStreamActiveThreadCountServer) error
+	CommandActiveThreadDump(context.Context, *PCmdActiveThreadDumpRes) (*empty.Empty, error)
+	CommandActiveThreadLightDump(context.Context, *PCmdActiveThreadLightDumpRes) (*empty.Empty, error)
+}
+
+// UnimplementedProfilerCommandServiceServer can be embedded to have forward compatible implementations.
+type UnimplementedProfilerCommandServiceServer struct {
+}
+
+func (*UnimplementedProfilerCommandServiceServer) HandleCommand(srv ProfilerCommandService_HandleCommandServer) error {
+	return status.Errorf(codes.Unimplemented, "method HandleCommand not implemented")
+}
+func (*UnimplementedProfilerCommandServiceServer) CommandEcho(ctx context.Context, req *PCmdEchoResponse) (*empty.Empty, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method CommandEcho not implemented")
+}
+func (*UnimplementedProfilerCommandServiceServer) CommandStreamActiveThreadCount(srv ProfilerCommandService_CommandStreamActiveThreadCountServer) error {
+	return status.Errorf(codes.Unimplemented, "method CommandStreamActiveThreadCount not implemented")
+}
+func (*UnimplementedProfilerCommandServiceServer) CommandActiveThreadDump(ctx context.Context, req *PCmdActiveThreadDumpRes) (*empty.Empty, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method CommandActiveThreadDump not implemented")
+}
+func (*UnimplementedProfilerCommandServiceServer) CommandActiveThreadLightDump(ctx context.Context, req *PCmdActiveThreadLightDumpRes) (*empty.Empty, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method CommandActiveThreadLightDump not implemented")
+}
+
+func RegisterProfilerCommandServiceServer(s *grpc.Server, srv ProfilerCommandServiceServer) {
+	s.RegisterService(&_ProfilerCommandService_serviceDesc, srv)
+}
+
+func _ProfilerCommandService_HandleCommand_Handler(srv interface{}, stream grpc.ServerStream) error {
+	return srv.(ProfilerCommandServiceServer).HandleCommand(&profilerCommandServiceHandleCommandServer{stream})
+}
+
+type ProfilerCommandService_HandleCommandServer interface {
+	Send(*PCmdRequest) error
+	Recv() (*PCmdMessage, error)
+	grpc.ServerStream
+}
+
+type profilerCommandServiceHandleCommandServer struct {
+	grpc.ServerStream
+}
+
+func (x *profilerCommandServiceHandleCommandServer) Send(m *PCmdRequest) error {
+	return x.ServerStream.SendMsg(m)
+}
+
+func (x *profilerCommandServiceHandleCommandServer) Recv() (*PCmdMessage, error) {
+	m := new(PCmdMessage)
+	if err := x.ServerStream.RecvMsg(m); err != nil {
+		return nil, err
+	}
+	return m, nil
+}
+
+func _ProfilerCommandService_CommandEcho_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(PCmdEchoResponse)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(ProfilerCommandServiceServer).CommandEcho(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/v1.ProfilerCommandService/CommandEcho",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(ProfilerCommandServiceServer).CommandEcho(ctx, req.(*PCmdEchoResponse))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _ProfilerCommandService_CommandStreamActiveThreadCount_Handler(srv interface{}, stream grpc.ServerStream) error {
+	return srv.(ProfilerCommandServiceServer).CommandStreamActiveThreadCount(&profilerCommandServiceCommandStreamActiveThreadCountServer{stream})
+}
+
+type ProfilerCommandService_CommandStreamActiveThreadCountServer interface {
+	SendAndClose(*empty.Empty) error
+	Recv() (*PCmdActiveThreadCountRes, error)
+	grpc.ServerStream
+}
+
+type profilerCommandServiceCommandStreamActiveThreadCountServer struct {
+	grpc.ServerStream
+}
+
+func (x *profilerCommandServiceCommandStreamActiveThreadCountServer) SendAndClose(m *empty.Empty) error {
+	return x.ServerStream.SendMsg(m)
+}
+
+func (x *profilerCommandServiceCommandStreamActiveThreadCountServer) Recv() (*PCmdActiveThreadCountRes, error) {
+	m := new(PCmdActiveThreadCountRes)
+	if err := x.ServerStream.RecvMsg(m); err != nil {
+		return nil, err
+	}
+	return m, nil
+}
+
+func _ProfilerCommandService_CommandActiveThreadDump_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(PCmdActiveThreadDumpRes)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(ProfilerCommandServiceServer).CommandActiveThreadDump(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/v1.ProfilerCommandService/CommandActiveThreadDump",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(ProfilerCommandServiceServer).CommandActiveThreadDump(ctx, req.(*PCmdActiveThreadDumpRes))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _ProfilerCommandService_CommandActiveThreadLightDump_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(PCmdActiveThreadLightDumpRes)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(ProfilerCommandServiceServer).CommandActiveThreadLightDump(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/v1.ProfilerCommandService/CommandActiveThreadLightDump",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(ProfilerCommandServiceServer).CommandActiveThreadLightDump(ctx, req.(*PCmdActiveThreadLightDumpRes))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+var _ProfilerCommandService_serviceDesc = grpc.ServiceDesc{
+	ServiceName: "v1.ProfilerCommandService",
+	HandlerType: (*ProfilerCommandServiceServer)(nil),
+	Methods: []grpc.MethodDesc{
+		{
+			MethodName: "CommandEcho",
+			Handler:    _ProfilerCommandService_CommandEcho_Handler,
+		},
+		{
+			MethodName: "CommandActiveThreadDump",
+			Handler:    _ProfilerCommandService_CommandActiveThreadDump_Handler,
+		},
+		{
+			MethodName: "CommandActiveThreadLightDump",
+			Handler:    _ProfilerCommandService_CommandActiveThreadLightDump_Handler,
+		},
+	},
+	Streams: []grpc.StreamDesc{
+		{
+			StreamName:    "HandleCommand",
+			Handler:       _ProfilerCommandService_HandleCommand_Handler,
+			ServerStreams: true,
+			ClientStreams: true,
+		},
+		{
+			StreamName:    "CommandStreamActiveThreadCount",
+			Handler:       _ProfilerCommandService_CommandStreamActiveThreadCount_Handler,
+			ClientStreams: true,
+		},
+	},
+	Metadata: "Service.proto",
+}
diff --git a/collector-agent/protocol/Span.pb.go b/collector-agent/protocol/Span.pb.go
new file mode 100644
index 000000000..7a2d7dae4
--- /dev/null
+++ b/collector-agent/protocol/Span.pb.go
@@ -0,0 +1,1100 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: Span.proto
+
+package v1
+
+import (
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	_ "github.com/golang/protobuf/ptypes/empty"
+	math "math"
+)
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
+
+type PSpanMessage struct {
+	// Types that are valid to be assigned to Field:
+	//	*PSpanMessage_Span
+	//	*PSpanMessage_SpanChunk
+	Field                isPSpanMessage_Field `protobuf_oneof:"field"`
+	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
+	XXX_unrecognized     []byte               `json:"-"`
+	XXX_sizecache        int32                `json:"-"`
+}
+
+func (m *PSpanMessage) Reset()         { *m = PSpanMessage{} }
+func (m *PSpanMessage) String() string { return proto.CompactTextString(m) }
+func (*PSpanMessage) ProtoMessage()    {}
+func (*PSpanMessage) Descriptor() ([]byte, []int) {
+	return fileDescriptor_72a7884ce2d4c43e, []int{0}
+}
+
+func (m *PSpanMessage) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PSpanMessage.Unmarshal(m, b)
+}
+func (m *PSpanMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PSpanMessage.Marshal(b, m, deterministic)
+}
+func (m *PSpanMessage) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PSpanMessage.Merge(m, src)
+}
+func (m *PSpanMessage) XXX_Size() int {
+	return xxx_messageInfo_PSpanMessage.Size(m)
+}
+func (m *PSpanMessage) XXX_DiscardUnknown() {
+	xxx_messageInfo_PSpanMessage.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PSpanMessage proto.InternalMessageInfo
+
+type isPSpanMessage_Field interface {
+	isPSpanMessage_Field()
+}
+
+type PSpanMessage_Span struct {
+	Span *PSpan `protobuf:"bytes,1,opt,name=span,proto3,oneof"`
+}
+
+type PSpanMessage_SpanChunk struct {
+	SpanChunk *PSpanChunk `protobuf:"bytes,2,opt,name=spanChunk,proto3,oneof"`
+}
+
+func (*PSpanMessage_Span) isPSpanMessage_Field() {}
+
+func (*PSpanMessage_SpanChunk) isPSpanMessage_Field() {}
+
+func (m *PSpanMessage) GetField() isPSpanMessage_Field {
+	if m != nil {
+		return m.Field
+	}
+	return nil
+}
+
+func (m *PSpanMessage) GetSpan() *PSpan {
+	if x, ok := m.GetField().(*PSpanMessage_Span); ok {
+		return x.Span
+	}
+	return nil
+}
+
+func (m *PSpanMessage) GetSpanChunk() *PSpanChunk {
+	if x, ok := m.GetField().(*PSpanMessage_SpanChunk); ok {
+		return x.SpanChunk
+	}
+	return nil
+}
+
+// XXX_OneofWrappers is for the internal use of the proto package.
+func (*PSpanMessage) XXX_OneofWrappers() []interface{} {
+	return []interface{}{
+		(*PSpanMessage_Span)(nil),
+		(*PSpanMessage_SpanChunk)(nil),
+	}
+}
+
+type PSpan struct {
+	Version       int32           `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
+	TransactionId *PTransactionId `protobuf:"bytes,2,opt,name=transactionId,proto3" json:"transactionId,omitempty"`
+	SpanId        int64           `protobuf:"fixed64,3,opt,name=spanId,proto3" json:"spanId,omitempty"`
+	ParentSpanId  int64           `protobuf:"fixed64,4,opt,name=parentSpanId,proto3" json:"parentSpanId,omitempty"`
+	// span event's startTimestamp
+	StartTime              int64            `protobuf:"varint,5,opt,name=startTime,proto3" json:"startTime,omitempty"`
+	Elapsed                int32            `protobuf:"varint,6,opt,name=elapsed,proto3" json:"elapsed,omitempty"`
+	ApiId                  int32            `protobuf:"varint,7,opt,name=apiId,proto3" json:"apiId,omitempty"`
+	ServiceType            int32            `protobuf:"varint,8,opt,name=serviceType,proto3" json:"serviceType,omitempty"`
+	AcceptEvent            *PAcceptEvent    `protobuf:"bytes,9,opt,name=acceptEvent,proto3" json:"acceptEvent,omitempty"`
+	Annotation             []*PAnnotation   `protobuf:"bytes,10,rep,name=annotation,proto3" json:"annotation,omitempty"`
+	Flag                   int32            `protobuf:"varint,11,opt,name=flag,proto3" json:"flag,omitempty"`
+	Err                    int32            `protobuf:"zigzag32,12,opt,name=err,proto3" json:"err,omitempty"`
+	SpanEvent              []*PSpanEvent    `protobuf:"bytes,13,rep,name=spanEvent,proto3" json:"spanEvent,omitempty"`
+	ExceptionInfo          *PIntStringValue `protobuf:"bytes,14,opt,name=exceptionInfo,proto3" json:"exceptionInfo,omitempty"`
+	ApplicationServiceType int32            `protobuf:"varint,15,opt,name=applicationServiceType,proto3" json:"applicationServiceType,omitempty"`
+	LoggingTransactionInfo int32            `protobuf:"varint,16,opt,name=loggingTransactionInfo,proto3" json:"loggingTransactionInfo,omitempty"`
+	XXX_NoUnkeyedLiteral   struct{}         `json:"-"`
+	XXX_unrecognized       []byte           `json:"-"`
+	XXX_sizecache          int32            `json:"-"`
+}
+
+func (m *PSpan) Reset()         { *m = PSpan{} }
+func (m *PSpan) String() string { return proto.CompactTextString(m) }
+func (*PSpan) ProtoMessage()    {}
+func (*PSpan) Descriptor() ([]byte, []int) {
+	return fileDescriptor_72a7884ce2d4c43e, []int{1}
+}
+
+func (m *PSpan) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PSpan.Unmarshal(m, b)
+}
+func (m *PSpan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PSpan.Marshal(b, m, deterministic)
+}
+func (m *PSpan) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PSpan.Merge(m, src)
+}
+func (m *PSpan) XXX_Size() int {
+	return xxx_messageInfo_PSpan.Size(m)
+}
+func (m *PSpan) XXX_DiscardUnknown() {
+	xxx_messageInfo_PSpan.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PSpan proto.InternalMessageInfo
+
+func (m *PSpan) GetVersion() int32 {
+	if m != nil {
+		return m.Version
+	}
+	return 0
+}
+
+func (m *PSpan) GetTransactionId() *PTransactionId {
+	if m != nil {
+		return m.TransactionId
+	}
+	return nil
+}
+
+func (m *PSpan) GetSpanId() int64 {
+	if m != nil {
+		return m.SpanId
+	}
+	return 0
+}
+
+func (m *PSpan) GetParentSpanId() int64 {
+	if m != nil {
+		return m.ParentSpanId
+	}
+	return 0
+}
+
+func (m *PSpan) GetStartTime() int64 {
+	if m != nil {
+		return m.StartTime
+	}
+	return 0
+}
+
+func (m *PSpan) GetElapsed() int32 {
+	if m != nil {
+		return m.Elapsed
+	}
+	return 0
+}
+
+func (m *PSpan) GetApiId() int32 {
+	if m != nil {
+		return m.ApiId
+	}
+	return 0
+}
+
+func (m *PSpan) GetServiceType() int32 {
+	if m != nil {
+		return m.ServiceType
+	}
+	return 0
+}
+
+func (m *PSpan) GetAcceptEvent() *PAcceptEvent {
+	if m != nil {
+		return m.AcceptEvent
+	}
+	return nil
+}
+
+func (m *PSpan) GetAnnotation() []*PAnnotation {
+	if m != nil {
+		return m.Annotation
+	}
+	return nil
+}
+
+func (m *PSpan) GetFlag() int32 {
+	if m != nil {
+		return m.Flag
+	}
+	return 0
+}
+
+func (m *PSpan) GetErr() int32 {
+	if m != nil {
+		return m.Err
+	}
+	return 0
+}
+
+func (m *PSpan) GetSpanEvent() []*PSpanEvent {
+	if m != nil {
+		return m.SpanEvent
+	}
+	return nil
+}
+
+func (m *PSpan) GetExceptionInfo() *PIntStringValue {
+	if m != nil {
+		return m.ExceptionInfo
+	}
+	return nil
+}
+
+func (m *PSpan) GetApplicationServiceType() int32 {
+	if m != nil {
+		return m.ApplicationServiceType
+	}
+	return 0
+}
+
+func (m *PSpan) GetLoggingTransactionInfo() int32 {
+	if m != nil {
+		return m.LoggingTransactionInfo
+	}
+	return 0
+}
+
+type PTransactionId struct {
+	// identical to agentId if null
+	AgentId              string   `protobuf:"bytes,1,opt,name=agentId,proto3" json:"agentId,omitempty"`
+	AgentStartTime       int64    `protobuf:"varint,2,opt,name=agentStartTime,proto3" json:"agentStartTime,omitempty"`
+	Sequence             int64    `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *PTransactionId) Reset()         { *m = PTransactionId{} }
+func (m *PTransactionId) String() string { return proto.CompactTextString(m) }
+func (*PTransactionId) ProtoMessage()    {}
+func (*PTransactionId) Descriptor() ([]byte, []int) {
+	return fileDescriptor_72a7884ce2d4c43e, []int{2}
+}
+
+func (m *PTransactionId) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PTransactionId.Unmarshal(m, b)
+}
+func (m *PTransactionId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PTransactionId.Marshal(b, m, deterministic)
+}
+func (m *PTransactionId) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PTransactionId.Merge(m, src)
+}
+func (m *PTransactionId) XXX_Size() int {
+	return xxx_messageInfo_PTransactionId.Size(m)
+}
+func (m *PTransactionId) XXX_DiscardUnknown() {
+	xxx_messageInfo_PTransactionId.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PTransactionId proto.InternalMessageInfo
+
+func (m *PTransactionId) GetAgentId() string {
+	if m != nil {
+		return m.AgentId
+	}
+	return ""
+}
+
+func (m *PTransactionId) GetAgentStartTime() int64 {
+	if m != nil {
+		return m.AgentStartTime
+	}
+	return 0
+}
+
+func (m *PTransactionId) GetSequence() int64 {
+	if m != nil {
+		return m.Sequence
+	}
+	return 0
+}
+
+type PAcceptEvent struct {
+	Rpc                  string       `protobuf:"bytes,1,opt,name=rpc,proto3" json:"rpc,omitempty"`
+	EndPoint             string       `protobuf:"bytes,2,opt,name=endPoint,proto3" json:"endPoint,omitempty"`
+	RemoteAddr           string       `protobuf:"bytes,3,opt,name=remoteAddr,proto3" json:"remoteAddr,omitempty"`
+	ParentInfo           *PParentInfo `protobuf:"bytes,4,opt,name=parentInfo,proto3" json:"parentInfo,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
+	XXX_unrecognized     []byte       `json:"-"`
+	XXX_sizecache        int32        `json:"-"`
+}
+
+func (m *PAcceptEvent) Reset()         { *m = PAcceptEvent{} }
+func (m *PAcceptEvent) String() string { return proto.CompactTextString(m) }
+func (*PAcceptEvent) ProtoMessage()    {}
+func (*PAcceptEvent) Descriptor() ([]byte, []int) {
+	return fileDescriptor_72a7884ce2d4c43e, []int{3}
+}
+
+func (m *PAcceptEvent) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PAcceptEvent.Unmarshal(m, b)
+}
+func (m *PAcceptEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PAcceptEvent.Marshal(b, m, deterministic)
+}
+func (m *PAcceptEvent) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PAcceptEvent.Merge(m, src)
+}
+func (m *PAcceptEvent) XXX_Size() int {
+	return xxx_messageInfo_PAcceptEvent.Size(m)
+}
+func (m *PAcceptEvent) XXX_DiscardUnknown() {
+	xxx_messageInfo_PAcceptEvent.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PAcceptEvent proto.InternalMessageInfo
+
+func (m *PAcceptEvent) GetRpc() string {
+	if m != nil {
+		return m.Rpc
+	}
+	return ""
+}
+
+func (m *PAcceptEvent) GetEndPoint() string {
+	if m != nil {
+		return m.EndPoint
+	}
+	return ""
+}
+
+func (m *PAcceptEvent) GetRemoteAddr() string {
+	if m != nil {
+		return m.RemoteAddr
+	}
+	return ""
+}
+
+func (m *PAcceptEvent) GetParentInfo() *PParentInfo {
+	if m != nil {
+		return m.ParentInfo
+	}
+	return nil
+}
+
+type PParentInfo struct {
+	ParentApplicationName string   `protobuf:"bytes,1,opt,name=parentApplicationName,proto3" json:"parentApplicationName,omitempty"`
+	ParentApplicationType int32    `protobuf:"varint,2,opt,name=parentApplicationType,proto3" json:"parentApplicationType,omitempty"`
+	AcceptorHost          string   `protobuf:"bytes,3,opt,name=acceptorHost,proto3" json:"acceptorHost,omitempty"`
+	XXX_NoUnkeyedLiteral  struct{} `json:"-"`
+	XXX_unrecognized      []byte   `json:"-"`
+	XXX_sizecache         int32    `json:"-"`
+}
+
+func (m *PParentInfo) Reset()         { *m = PParentInfo{} }
+func (m *PParentInfo) String() string { return proto.CompactTextString(m) }
+func (*PParentInfo) ProtoMessage()    {}
+func (*PParentInfo) Descriptor() ([]byte, []int) {
+	return fileDescriptor_72a7884ce2d4c43e, []int{4}
+}
+
+func (m *PParentInfo) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PParentInfo.Unmarshal(m, b)
+}
+func (m *PParentInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PParentInfo.Marshal(b, m, deterministic)
+}
+func (m *PParentInfo) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PParentInfo.Merge(m, src)
+}
+func (m *PParentInfo) XXX_Size() int {
+	return xxx_messageInfo_PParentInfo.Size(m)
+}
+func (m *PParentInfo) XXX_DiscardUnknown() {
+	xxx_messageInfo_PParentInfo.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PParentInfo proto.InternalMessageInfo
+
+func (m *PParentInfo) GetParentApplicationName() string {
+	if m != nil {
+		return m.ParentApplicationName
+	}
+	return ""
+}
+
+func (m *PParentInfo) GetParentApplicationType() int32 {
+	if m != nil {
+		return m.ParentApplicationType
+	}
+	return 0
+}
+
+func (m *PParentInfo) GetAcceptorHost() string {
+	if m != nil {
+		return m.AcceptorHost
+	}
+	return ""
+}
+
+type PLocalAsyncId struct {
+	AsyncId              int32    `protobuf:"varint,1,opt,name=asyncId,proto3" json:"asyncId,omitempty"`
+	Sequence             int32    `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *PLocalAsyncId) Reset()         { *m = PLocalAsyncId{} }
+func (m *PLocalAsyncId) String() string { return proto.CompactTextString(m) }
+func (*PLocalAsyncId) ProtoMessage()    {}
+func (*PLocalAsyncId) Descriptor() ([]byte, []int) {
+	return fileDescriptor_72a7884ce2d4c43e, []int{5}
+}
+
+func (m *PLocalAsyncId) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PLocalAsyncId.Unmarshal(m, b)
+}
+func (m *PLocalAsyncId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PLocalAsyncId.Marshal(b, m, deterministic)
+}
+func (m *PLocalAsyncId) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PLocalAsyncId.Merge(m, src)
+}
+func (m *PLocalAsyncId) XXX_Size() int {
+	return xxx_messageInfo_PLocalAsyncId.Size(m)
+}
+func (m *PLocalAsyncId) XXX_DiscardUnknown() {
+	xxx_messageInfo_PLocalAsyncId.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PLocalAsyncId proto.InternalMessageInfo
+
+func (m *PLocalAsyncId) GetAsyncId() int32 {
+	if m != nil {
+		return m.AsyncId
+	}
+	return 0
+}
+
+func (m *PLocalAsyncId) GetSequence() int32 {
+	if m != nil {
+		return m.Sequence
+	}
+	return 0
+}
+
+type PSpanEvent struct {
+	Sequence             int32            `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"`
+	Depth                int32            `protobuf:"varint,2,opt,name=depth,proto3" json:"depth,omitempty"`
+	StartElapsed         int32            `protobuf:"varint,3,opt,name=startElapsed,proto3" json:"startElapsed,omitempty"`
+	EndElapsed           int32            `protobuf:"varint,4,opt,name=endElapsed,proto3" json:"endElapsed,omitempty"`
+	ServiceType          int32            `protobuf:"zigzag32,5,opt,name=serviceType,proto3" json:"serviceType,omitempty"`
+	Annotation           []*PAnnotation   `protobuf:"bytes,6,rep,name=annotation,proto3" json:"annotation,omitempty"`
+	ApiId                int32            `protobuf:"zigzag32,10,opt,name=apiId,proto3" json:"apiId,omitempty"`
+	ExceptionInfo        *PIntStringValue `protobuf:"bytes,11,opt,name=exceptionInfo,proto3" json:"exceptionInfo,omitempty"`
+	NextEvent            *PNextEvent      `protobuf:"bytes,12,opt,name=nextEvent,proto3" json:"nextEvent,omitempty"`
+	AsyncEvent           int32            `protobuf:"varint,13,opt,name=asyncEvent,proto3" json:"asyncEvent,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
+	XXX_unrecognized     []byte           `json:"-"`
+	XXX_sizecache        int32            `json:"-"`
+}
+
+func (m *PSpanEvent) Reset()         { *m = PSpanEvent{} }
+func (m *PSpanEvent) String() string { return proto.CompactTextString(m) }
+func (*PSpanEvent) ProtoMessage()    {}
+func (*PSpanEvent) Descriptor() ([]byte, []int) {
+	return fileDescriptor_72a7884ce2d4c43e, []int{6}
+}
+
+func (m *PSpanEvent) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PSpanEvent.Unmarshal(m, b)
+}
+func (m *PSpanEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PSpanEvent.Marshal(b, m, deterministic)
+}
+func (m *PSpanEvent) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PSpanEvent.Merge(m, src)
+}
+func (m *PSpanEvent) XXX_Size() int {
+	return xxx_messageInfo_PSpanEvent.Size(m)
+}
+func (m *PSpanEvent) XXX_DiscardUnknown() {
+	xxx_messageInfo_PSpanEvent.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PSpanEvent proto.InternalMessageInfo
+
+func (m *PSpanEvent) GetSequence() int32 {
+	if m != nil {
+		return m.Sequence
+	}
+	return 0
+}
+
+func (m *PSpanEvent) GetDepth() int32 {
+	if m != nil {
+		return m.Depth
+	}
+	return 0
+}
+
+func (m *PSpanEvent) GetStartElapsed() int32 {
+	if m != nil {
+		return m.StartElapsed
+	}
+	return 0
+}
+
+func (m *PSpanEvent) GetEndElapsed() int32 {
+	if m != nil {
+		return m.EndElapsed
+	}
+	return 0
+}
+
+func (m *PSpanEvent) GetServiceType() int32 {
+	if m != nil {
+		return m.ServiceType
+	}
+	return 0
+}
+
+func (m *PSpanEvent) GetAnnotation() []*PAnnotation {
+	if m != nil {
+		return m.Annotation
+	}
+	return nil
+}
+
+func (m *PSpanEvent) GetApiId() int32 {
+	if m != nil {
+		return m.ApiId
+	}
+	return 0
+}
+
+func (m *PSpanEvent) GetExceptionInfo() *PIntStringValue {
+	if m != nil {
+		return m.ExceptionInfo
+	}
+	return nil
+}
+
+func (m *PSpanEvent) GetNextEvent() *PNextEvent {
+	if m != nil {
+		return m.NextEvent
+	}
+	return nil
+}
+
+func (m *PSpanEvent) GetAsyncEvent() int32 {
+	if m != nil {
+		return m.AsyncEvent
+	}
+	return 0
+}
+
+type PNextEvent struct {
+	// Types that are valid to be assigned to Field:
+	//	*PNextEvent_MessageEvent
+	Field                isPNextEvent_Field `protobuf_oneof:"field"`
+	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
+	XXX_unrecognized     []byte             `json:"-"`
+	XXX_sizecache        int32              `json:"-"`
+}
+
+func (m *PNextEvent) Reset()         { *m = PNextEvent{} }
+func (m *PNextEvent) String() string { return proto.CompactTextString(m) }
+func (*PNextEvent) ProtoMessage()    {}
+func (*PNextEvent) Descriptor() ([]byte, []int) {
+	return fileDescriptor_72a7884ce2d4c43e, []int{7}
+}
+
+func (m *PNextEvent) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PNextEvent.Unmarshal(m, b)
+}
+func (m *PNextEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PNextEvent.Marshal(b, m, deterministic)
+}
+func (m *PNextEvent) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PNextEvent.Merge(m, src)
+}
+func (m *PNextEvent) XXX_Size() int {
+	return xxx_messageInfo_PNextEvent.Size(m)
+}
+func (m *PNextEvent) XXX_DiscardUnknown() {
+	xxx_messageInfo_PNextEvent.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PNextEvent proto.InternalMessageInfo
+
+type isPNextEvent_Field interface {
+	isPNextEvent_Field()
+}
+
+type PNextEvent_MessageEvent struct {
+	MessageEvent *PMessageEvent `protobuf:"bytes,1,opt,name=messageEvent,proto3,oneof"`
+}
+
+func (*PNextEvent_MessageEvent) isPNextEvent_Field() {}
+
+func (m *PNextEvent) GetField() isPNextEvent_Field {
+	if m != nil {
+		return m.Field
+	}
+	return nil
+}
+
+func (m *PNextEvent) GetMessageEvent() *PMessageEvent {
+	if x, ok := m.GetField().(*PNextEvent_MessageEvent); ok {
+		return x.MessageEvent
+	}
+	return nil
+}
+
+// XXX_OneofWrappers is for the internal use of the proto package.
+func (*PNextEvent) XXX_OneofWrappers() []interface{} {
+	return []interface{}{
+		(*PNextEvent_MessageEvent)(nil),
+	}
+}
+
+type PMessageEvent struct {
+	NextSpanId           int64    `protobuf:"fixed64,1,opt,name=nextSpanId,proto3" json:"nextSpanId,omitempty"`
+	EndPoint             string   `protobuf:"bytes,2,opt,name=endPoint,proto3" json:"endPoint,omitempty"`
+	DestinationId        string   `protobuf:"bytes,3,opt,name=destinationId,proto3" json:"destinationId,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *PMessageEvent) Reset()         { *m = PMessageEvent{} }
+func (m *PMessageEvent) String() string { return proto.CompactTextString(m) }
+func (*PMessageEvent) ProtoMessage()    {}
+func (*PMessageEvent) Descriptor() ([]byte, []int) {
+	return fileDescriptor_72a7884ce2d4c43e, []int{8}
+}
+
+func (m *PMessageEvent) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PMessageEvent.Unmarshal(m, b)
+}
+func (m *PMessageEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PMessageEvent.Marshal(b, m, deterministic)
+}
+func (m *PMessageEvent) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PMessageEvent.Merge(m, src)
+}
+func (m *PMessageEvent) XXX_Size() int {
+	return xxx_messageInfo_PMessageEvent.Size(m)
+}
+func (m *PMessageEvent) XXX_DiscardUnknown() {
+	xxx_messageInfo_PMessageEvent.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PMessageEvent proto.InternalMessageInfo
+
+func (m *PMessageEvent) GetNextSpanId() int64 {
+	if m != nil {
+		return m.NextSpanId
+	}
+	return 0
+}
+
+func (m *PMessageEvent) GetEndPoint() string {
+	if m != nil {
+		return m.EndPoint
+	}
+	return ""
+}
+
+func (m *PMessageEvent) GetDestinationId() string {
+	if m != nil {
+		return m.DestinationId
+	}
+	return ""
+}
+
+type PSpanChunk struct {
+	Version                int32           `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
+	TransactionId          *PTransactionId `protobuf:"bytes,2,opt,name=transactionId,proto3" json:"transactionId,omitempty"`
+	SpanId                 int64           `protobuf:"fixed64,3,opt,name=spanId,proto3" json:"spanId,omitempty"`
+	EndPoint               string          `protobuf:"bytes,4,opt,name=endPoint,proto3" json:"endPoint,omitempty"`
+	SpanEvent              []*PSpanEvent   `protobuf:"bytes,5,rep,name=spanEvent,proto3" json:"spanEvent,omitempty"`
+	ApplicationServiceType int32           `protobuf:"varint,6,opt,name=applicationServiceType,proto3" json:"applicationServiceType,omitempty"`
+	KeyTime                int64           `protobuf:"varint,7,opt,name=keyTime,proto3" json:"keyTime,omitempty"`
+	LocalAsyncId           *PLocalAsyncId  `protobuf:"bytes,8,opt,name=localAsyncId,proto3" json:"localAsyncId,omitempty"`
+	XXX_NoUnkeyedLiteral   struct{}        `json:"-"`
+	XXX_unrecognized       []byte          `json:"-"`
+	XXX_sizecache          int32           `json:"-"`
+}
+
+func (m *PSpanChunk) Reset()         { *m = PSpanChunk{} }
+func (m *PSpanChunk) String() string { return proto.CompactTextString(m) }
+func (*PSpanChunk) ProtoMessage()    {}
+func (*PSpanChunk) Descriptor() ([]byte, []int) {
+	return fileDescriptor_72a7884ce2d4c43e, []int{9}
+}
+
+func (m *PSpanChunk) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PSpanChunk.Unmarshal(m, b)
+}
+func (m *PSpanChunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PSpanChunk.Marshal(b, m, deterministic)
+}
+func (m *PSpanChunk) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PSpanChunk.Merge(m, src)
+}
+func (m *PSpanChunk) XXX_Size() int {
+	return xxx_messageInfo_PSpanChunk.Size(m)
+}
+func (m *PSpanChunk) XXX_DiscardUnknown() {
+	xxx_messageInfo_PSpanChunk.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PSpanChunk proto.InternalMessageInfo
+
+func (m *PSpanChunk) GetVersion() int32 {
+	if m != nil {
+		return m.Version
+	}
+	return 0
+}
+
+func (m *PSpanChunk) GetTransactionId() *PTransactionId {
+	if m != nil {
+		return m.TransactionId
+	}
+	return nil
+}
+
+func (m *PSpanChunk) GetSpanId() int64 {
+	if m != nil {
+		return m.SpanId
+	}
+	return 0
+}
+
+func (m *PSpanChunk) GetEndPoint() string {
+	if m != nil {
+		return m.EndPoint
+	}
+	return ""
+}
+
+func (m *PSpanChunk) GetSpanEvent() []*PSpanEvent {
+	if m != nil {
+		return m.SpanEvent
+	}
+	return nil
+}
+
+func (m *PSpanChunk) GetApplicationServiceType() int32 {
+	if m != nil {
+		return m.ApplicationServiceType
+	}
+	return 0
+}
+
+func (m *PSpanChunk) GetKeyTime() int64 {
+	if m != nil {
+		return m.KeyTime
+	}
+	return 0
+}
+
+func (m *PSpanChunk) GetLocalAsyncId() *PLocalAsyncId {
+	if m != nil {
+		return m.LocalAsyncId
+	}
+	return nil
+}
+
+type PResult struct {
+	Success              bool     `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
+	Message              string   `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *PResult) Reset()         { *m = PResult{} }
+func (m *PResult) String() string { return proto.CompactTextString(m) }
+func (*PResult) ProtoMessage()    {}
+func (*PResult) Descriptor() ([]byte, []int) {
+	return fileDescriptor_72a7884ce2d4c43e, []int{10}
+}
+
+func (m *PResult) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PResult.Unmarshal(m, b)
+}
+func (m *PResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PResult.Marshal(b, m, deterministic)
+}
+func (m *PResult) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PResult.Merge(m, src)
+}
+func (m *PResult) XXX_Size() int {
+	return xxx_messageInfo_PResult.Size(m)
+}
+func (m *PResult) XXX_DiscardUnknown() {
+	xxx_messageInfo_PResult.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PResult proto.InternalMessageInfo
+
+func (m *PResult) GetSuccess() bool {
+	if m != nil {
+		return m.Success
+	}
+	return false
+}
+
+func (m *PResult) GetMessage() string {
+	if m != nil {
+		return m.Message
+	}
+	return ""
+}
+
+type PSqlMetaData struct {
+	SqlId                int32    `protobuf:"varint,1,opt,name=sqlId,proto3" json:"sqlId,omitempty"`
+	Sql                  string   `protobuf:"bytes,2,opt,name=sql,proto3" json:"sql,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *PSqlMetaData) Reset()         { *m = PSqlMetaData{} }
+func (m *PSqlMetaData) String() string { return proto.CompactTextString(m) }
+func (*PSqlMetaData) ProtoMessage()    {}
+func (*PSqlMetaData) Descriptor() ([]byte, []int) {
+	return fileDescriptor_72a7884ce2d4c43e, []int{11}
+}
+
+func (m *PSqlMetaData) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PSqlMetaData.Unmarshal(m, b)
+}
+func (m *PSqlMetaData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PSqlMetaData.Marshal(b, m, deterministic)
+}
+func (m *PSqlMetaData) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PSqlMetaData.Merge(m, src)
+}
+func (m *PSqlMetaData) XXX_Size() int {
+	return xxx_messageInfo_PSqlMetaData.Size(m)
+}
+func (m *PSqlMetaData) XXX_DiscardUnknown() {
+	xxx_messageInfo_PSqlMetaData.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PSqlMetaData proto.InternalMessageInfo
+
+func (m *PSqlMetaData) GetSqlId() int32 {
+	if m != nil {
+		return m.SqlId
+	}
+	return 0
+}
+
+func (m *PSqlMetaData) GetSql() string {
+	if m != nil {
+		return m.Sql
+	}
+	return ""
+}
+
+type PApiMetaData struct {
+	ApiId                int32    `protobuf:"varint,1,opt,name=apiId,proto3" json:"apiId,omitempty"`
+	ApiInfo              string   `protobuf:"bytes,2,opt,name=apiInfo,proto3" json:"apiInfo,omitempty"`
+	Line                 int32    `protobuf:"varint,3,opt,name=line,proto3" json:"line,omitempty"`
+	Type                 int32    `protobuf:"varint,4,opt,name=type,proto3" json:"type,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *PApiMetaData) Reset()         { *m = PApiMetaData{} }
+func (m *PApiMetaData) String() string { return proto.CompactTextString(m) }
+func (*PApiMetaData) ProtoMessage()    {}
+func (*PApiMetaData) Descriptor() ([]byte, []int) {
+	return fileDescriptor_72a7884ce2d4c43e, []int{12}
+}
+
+func (m *PApiMetaData) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PApiMetaData.Unmarshal(m, b)
+}
+func (m *PApiMetaData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PApiMetaData.Marshal(b, m, deterministic)
+}
+func (m *PApiMetaData) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PApiMetaData.Merge(m, src)
+}
+func (m *PApiMetaData) XXX_Size() int {
+	return xxx_messageInfo_PApiMetaData.Size(m)
+}
+func (m *PApiMetaData) XXX_DiscardUnknown() {
+	xxx_messageInfo_PApiMetaData.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PApiMetaData proto.InternalMessageInfo
+
+func (m *PApiMetaData) GetApiId() int32 {
+	if m != nil {
+		return m.ApiId
+	}
+	return 0
+}
+
+func (m *PApiMetaData) GetApiInfo() string {
+	if m != nil {
+		return m.ApiInfo
+	}
+	return ""
+}
+
+func (m *PApiMetaData) GetLine() int32 {
+	if m != nil {
+		return m.Line
+	}
+	return 0
+}
+
+func (m *PApiMetaData) GetType() int32 {
+	if m != nil {
+		return m.Type
+	}
+	return 0
+}
+
+type PStringMetaData struct {
+	StringId             int32    `protobuf:"varint,1,opt,name=stringId,proto3" json:"stringId,omitempty"`
+	StringValue          string   `protobuf:"bytes,2,opt,name=stringValue,proto3" json:"stringValue,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *PStringMetaData) Reset()         { *m = PStringMetaData{} }
+func (m *PStringMetaData) String() string { return proto.CompactTextString(m) }
+func (*PStringMetaData) ProtoMessage()    {}
+func (*PStringMetaData) Descriptor() ([]byte, []int) {
+	return fileDescriptor_72a7884ce2d4c43e, []int{13}
+}
+
+func (m *PStringMetaData) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PStringMetaData.Unmarshal(m, b)
+}
+func (m *PStringMetaData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PStringMetaData.Marshal(b, m, deterministic)
+}
+func (m *PStringMetaData) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PStringMetaData.Merge(m, src)
+}
+func (m *PStringMetaData) XXX_Size() int {
+	return xxx_messageInfo_PStringMetaData.Size(m)
+}
+func (m *PStringMetaData) XXX_DiscardUnknown() {
+	xxx_messageInfo_PStringMetaData.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PStringMetaData proto.InternalMessageInfo
+
+func (m *PStringMetaData) GetStringId() int32 {
+	if m != nil {
+		return m.StringId
+	}
+	return 0
+}
+
+func (m *PStringMetaData) GetStringValue() string {
+	if m != nil {
+		return m.StringValue
+	}
+	return ""
+}
+
+func init() {
+	proto.RegisterType((*PSpanMessage)(nil), "v1.PSpanMessage")
+	proto.RegisterType((*PSpan)(nil), "v1.PSpan")
+	proto.RegisterType((*PTransactionId)(nil), "v1.PTransactionId")
+	proto.RegisterType((*PAcceptEvent)(nil), "v1.PAcceptEvent")
+	proto.RegisterType((*PParentInfo)(nil), "v1.PParentInfo")
+	proto.RegisterType((*PLocalAsyncId)(nil), "v1.PLocalAsyncId")
+	proto.RegisterType((*PSpanEvent)(nil), "v1.PSpanEvent")
+	proto.RegisterType((*PNextEvent)(nil), "v1.PNextEvent")
+	proto.RegisterType((*PMessageEvent)(nil), "v1.PMessageEvent")
+	proto.RegisterType((*PSpanChunk)(nil), "v1.PSpanChunk")
+	proto.RegisterType((*PResult)(nil), "v1.PResult")
+	proto.RegisterType((*PSqlMetaData)(nil), "v1.PSqlMetaData")
+	proto.RegisterType((*PApiMetaData)(nil), "v1.PApiMetaData")
+	proto.RegisterType((*PStringMetaData)(nil), "v1.PStringMetaData")
+}
+
+func init() {
+	proto.RegisterFile("Span.proto", fileDescriptor_72a7884ce2d4c43e)
+}
+
+var fileDescriptor_72a7884ce2d4c43e = []byte{
+	// 991 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x5f, 0x6f, 0xe3, 0x44,
+	0x10, 0x3f, 0xe7, 0x6f, 0x33, 0x49, 0xda, 0xdc, 0x02, 0x27, 0xab, 0x20, 0x08, 0x16, 0x42, 0x79,
+	0x38, 0xa5, 0x5c, 0x81, 0x03, 0x1e, 0x78, 0x48, 0xa1, 0x52, 0x23, 0xd1, 0x12, 0x6d, 0x2a, 0xde,
+	0xf7, 0xec, 0x8d, 0x6b, 0x9d, 0xb3, 0xde, 0xd8, 0x9b, 0xe8, 0xfa, 0x21, 0xf8, 0x08, 0x7c, 0x22,
+	0x3e, 0x0a, 0xaf, 0x7c, 0x00, 0xb4, 0xb3, 0x6b, 0x7b, 0x5d, 0x7a, 0x77, 0x3c, 0xf1, 0x94, 0x9d,
+	0xdf, 0xcc, 0xec, 0x8c, 0xe7, 0xcf, 0x6f, 0x03, 0xb0, 0x96, 0x4c, 0xcc, 0x65, 0x9e, 0xa9, 0x8c,
+	0xb4, 0x0e, 0x2f, 0x4e, 0x3f, 0x8e, 0xb3, 0x2c, 0x4e, 0xf9, 0x19, 0x22, 0xaf, 0xf6, 0x9b, 0x33,
+	0xbe, 0x95, 0xea, 0xde, 0x18, 0x9c, 0x4e, 0x16, 0x42, 0x64, 0x8a, 0xa9, 0x24, 0xb3, 0x2e, 0xc1,
+	0x1d, 0x8c, 0x56, 0xfa, 0x86, 0x6b, 0x5e, 0x14, 0x2c, 0xe6, 0xe4, 0x33, 0xe8, 0x14, 0x92, 0x09,
+	0xdf, 0x9b, 0x7a, 0xb3, 0xe1, 0xf9, 0x60, 0x7e, 0x78, 0x31, 0x47, 0xfd, 0xd5, 0x13, 0x8a, 0x0a,
+	0x32, 0x87, 0x81, 0xfe, 0xfd, 0xe9, 0x6e, 0x2f, 0x5e, 0xfb, 0x2d, 0xb4, 0x3a, 0xae, 0xac, 0x10,
+	0xbd, 0x7a, 0x42, 0x6b, 0x93, 0x8b, 0x3e, 0x74, 0x37, 0x09, 0x4f, 0xa3, 0xe0, 0xaf, 0x0e, 0x74,
+	0xd1, 0x88, 0xf8, 0xd0, 0x3f, 0xf0, 0xbc, 0x48, 0x32, 0x13, 0xa6, 0x4b, 0x4b, 0x91, 0x7c, 0x0f,
+	0x63, 0x95, 0x33, 0x51, 0xb0, 0x50, 0xa7, 0xb8, 0x8c, 0x6c, 0x00, 0x82, 0x01, 0x6e, 0x5d, 0x0d,
+	0x6d, 0x1a, 0x92, 0x67, 0xd0, 0xd3, 0x31, 0x97, 0x91, 0xdf, 0x9e, 0x7a, 0xb3, 0x09, 0xb5, 0x12,
+	0x09, 0x60, 0x24, 0x59, 0xce, 0x85, 0x5a, 0x1b, 0x6d, 0x07, 0xb5, 0x0d, 0x8c, 0x7c, 0x02, 0x83,
+	0x42, 0xb1, 0x5c, 0xdd, 0x26, 0x5b, 0xee, 0x77, 0xa7, 0xde, 0xac, 0x4d, 0x6b, 0x40, 0x67, 0xcb,
+	0x53, 0x26, 0x0b, 0x1e, 0xf9, 0x3d, 0x93, 0xad, 0x15, 0xc9, 0x87, 0xd0, 0x65, 0x32, 0x59, 0x46,
+	0x7e, 0x1f, 0x71, 0x23, 0x90, 0x29, 0x0c, 0x0b, 0x9e, 0x1f, 0x92, 0x90, 0xdf, 0xde, 0x4b, 0xee,
+	0x1f, 0xa1, 0xce, 0x85, 0xc8, 0x39, 0x0c, 0x59, 0x18, 0x72, 0xa9, 0x2e, 0x0f, 0x5c, 0x28, 0x7f,
+	0x80, 0xdf, 0x38, 0xc1, 0x6f, 0x5c, 0xd4, 0x38, 0x75, 0x8d, 0xc8, 0x19, 0x00, 0xab, 0x7a, 0xe7,
+	0xc3, 0xb4, 0x3d, 0x1b, 0x9e, 0x9f, 0x18, 0x97, 0x0a, 0xa6, 0x8e, 0x09, 0x21, 0xd0, 0xd9, 0xa4,
+	0x2c, 0xf6, 0x87, 0x18, 0x1f, 0xcf, 0x64, 0x02, 0x6d, 0x9e, 0xe7, 0xfe, 0x68, 0xea, 0xcd, 0x9e,
+	0x52, 0x7d, 0x24, 0xcf, 0x4d, 0x37, 0x4d, 0x22, 0x63, 0xbc, 0xb5, 0xee, 0xa6, 0x49, 0xa3, 0x36,
+	0x20, 0x3f, 0xc0, 0x98, 0xbf, 0xd1, 0x39, 0xe9, 0x9a, 0x8b, 0x4d, 0xe6, 0x1f, 0x63, 0xea, 0x1f,
+	0xa0, 0xc7, 0x52, 0xa8, 0xb5, 0xca, 0x13, 0x11, 0xff, 0xc6, 0xd2, 0x3d, 0xa7, 0x4d, 0x4b, 0xf2,
+	0x12, 0x9e, 0x31, 0x29, 0xd3, 0x24, 0xc4, 0xec, 0xd6, 0x4e, 0x81, 0x4e, 0x30, 0xc1, 0xb7, 0x68,
+	0xb5, 0x5f, 0x9a, 0xc5, 0x71, 0x22, 0x62, 0xb7, 0xfd, 0x3a, 0xf6, 0xc4, 0xf8, 0x3d, 0xae, 0x0d,
+	0x04, 0x1c, 0x37, 0x07, 0x46, 0xf7, 0x91, 0xc5, 0x5c, 0xa8, 0x65, 0x84, 0x53, 0x37, 0xa0, 0xa5,
+	0x48, 0xbe, 0x84, 0x63, 0x3c, 0xae, 0xab, 0x21, 0x68, 0xe1, 0x10, 0x3c, 0x40, 0xc9, 0x29, 0x1c,
+	0x15, 0x7c, 0xb7, 0xe7, 0x22, 0xe4, 0x38, 0x65, 0x6d, 0x5a, 0xc9, 0xc1, 0xef, 0x1e, 0x8c, 0xdc,
+	0xee, 0xe9, 0x5a, 0xe7, 0x32, 0xb4, 0xa1, 0xf4, 0x51, 0xbb, 0x73, 0x11, 0xad, 0xb2, 0x44, 0x28,
+	0x0c, 0x30, 0xa0, 0x95, 0x4c, 0x3e, 0x05, 0xc8, 0xf9, 0x36, 0x53, 0x7c, 0x11, 0x45, 0x39, 0x5e,
+	0x3e, 0xa0, 0x0e, 0xa2, 0xdb, 0x6f, 0x46, 0x16, 0x3f, 0xbd, 0x83, 0x65, 0x37, 0xed, 0x5f, 0x55,
+	0x30, 0x75, 0x4c, 0x82, 0x3f, 0x3c, 0x18, 0x3a, 0x3a, 0xf2, 0x0d, 0x7c, 0x64, 0xb4, 0x8b, 0xba,
+	0xce, 0x37, 0x6c, 0xcb, 0x6d, 0x82, 0x8f, 0x2b, 0x1f, 0xf5, 0xc2, 0xa6, 0xb5, 0xb0, 0xf8, 0x8f,
+	0x2b, 0xf5, 0xce, 0x99, 0xd1, 0xcd, 0xf2, 0xab, 0xac, 0x50, 0xf6, 0x73, 0x1a, 0x58, 0x70, 0x09,
+	0xe3, 0xd5, 0x2f, 0x59, 0xc8, 0xd2, 0x45, 0x71, 0x2f, 0x42, 0xdb, 0x1e, 0x73, 0x2c, 0x49, 0xc1,
+	0x8a, 0x8d, 0xb2, 0x9b, 0xb8, 0x75, 0xd9, 0xff, 0x6e, 0x01, 0xd4, 0xb3, 0xda, 0x30, 0xf5, 0x9a,
+	0xa6, 0x7a, 0x5b, 0x23, 0x2e, 0xd5, 0x9d, 0xbd, 0xc3, 0x08, 0x3a, 0x57, 0x5c, 0xf5, 0x4b, 0xbb,
+	0xe2, 0x6d, 0x54, 0x36, 0x30, 0xdd, 0x1c, 0x2e, 0xa2, 0xd2, 0xa2, 0x83, 0x16, 0x0e, 0xf2, 0x70,
+	0xe3, 0xbb, 0xb8, 0x5e, 0x8d, 0x8d, 0x6f, 0x6e, 0x6f, 0xef, 0xfd, 0xdb, 0x5b, 0x51, 0x0b, 0xe0,
+	0x65, 0x96, 0x5a, 0xfe, 0xb5, 0x7f, 0xc3, 0xff, 0xbc, 0x7f, 0xcf, 0x61, 0x20, 0xf8, 0x1b, 0xcb,
+	0x38, 0x23, 0x87, 0xb6, 0x6f, 0x4a, 0x94, 0xd6, 0x06, 0xfa, 0x8b, 0xb1, 0xfa, 0x25, 0x2f, 0xe0,
+	0x17, 0xd7, 0x48, 0x70, 0x03, 0x50, 0x3b, 0x92, 0xef, 0x60, 0xb4, 0x35, 0xcf, 0x87, 0xb1, 0x37,
+	0x6f, 0xc7, 0x53, 0xbc, 0xfe, 0xda, 0x51, 0x5c, 0x3d, 0xa1, 0x0d, 0xc3, 0xfa, 0x6d, 0xd8, 0xc1,
+	0xb8, 0x61, 0xa9, 0x13, 0xd0, 0xd9, 0x58, 0xd2, 0xf6, 0x90, 0xb4, 0x1d, 0xe4, 0x9d, 0xbb, 0xf4,
+	0x05, 0x8c, 0x23, 0x5e, 0xa8, 0x44, 0x30, 0xfb, 0x88, 0x98, 0xf9, 0x6b, 0x82, 0xc1, 0x9f, 0xe5,
+	0xe4, 0xe0, 0x33, 0xf5, 0xbf, 0xbe, 0x49, 0x6e, 0xf2, 0x9d, 0x07, 0xc9, 0x37, 0x08, 0xb9, 0xfb,
+	0x3e, 0x42, 0x7e, 0x3b, 0xab, 0xf6, 0xde, 0xc9, 0xaa, 0x3e, 0xf4, 0x5f, 0xf3, 0x7b, 0xa4, 0xba,
+	0x3e, 0x12, 0x59, 0x29, 0x92, 0x6f, 0x61, 0x94, 0x3a, 0x6b, 0x89, 0xcf, 0x57, 0xd9, 0x4b, 0x77,
+	0x5f, 0x69, 0xc3, 0x2c, 0xf8, 0x11, 0xfa, 0x2b, 0xca, 0x8b, 0x7d, 0xaa, 0xf4, 0xdd, 0xc5, 0x3e,
+	0x0c, 0x79, 0x51, 0x60, 0x25, 0x8f, 0x68, 0x29, 0x6a, 0x8d, 0x6d, 0xbf, 0xed, 0x59, 0x29, 0x06,
+	0x2f, 0xf5, 0xbf, 0x90, 0x5d, 0x7a, 0xcd, 0x15, 0xfb, 0x99, 0x29, 0xa6, 0xc7, 0xbf, 0xd8, 0xa5,
+	0x15, 0x15, 0x18, 0x41, 0x53, 0x6a, 0xb1, 0x4b, 0xad, 0xaf, 0x3e, 0x06, 0x1b, 0x4d, 0xba, 0x32,
+	0x71, 0xfd, 0xcc, 0xda, 0x78, 0xee, 0x8b, 0xac, 0xa9, 0x45, 0x26, 0xb8, 0x30, 0x36, 0xae, 0x15,
+	0xf5, 0x23, 0x99, 0x26, 0x82, 0xdb, 0xad, 0xc7, 0xb3, 0xc6, 0x94, 0xae, 0xa0, 0xd9, 0x73, 0x3c,
+	0x07, 0xbf, 0xc2, 0xc9, 0xca, 0x2c, 0x57, 0x15, 0x4a, 0x53, 0x0d, 0x22, 0x55, 0xb4, 0x4a, 0x46,
+	0x42, 0xa8, 0x57, 0xd1, 0x06, 0x75, 0xa1, 0x8b, 0xaf, 0xe0, 0xf3, 0x30, 0xdb, 0xce, 0x05, 0x3b,
+	0xf0, 0x3c, 0xcc, 0x72, 0x39, 0x97, 0x89, 0x90, 0x7a, 0x00, 0xe6, 0x71, 0x2e, 0xc3, 0xb9, 0xca,
+	0x59, 0xc8, 0x2f, 0x06, 0xba, 0xe7, 0x2b, 0xfd, 0x37, 0x6d, 0xe5, 0xbd, 0xea, 0xe1, 0xff, 0xb5,
+	0xaf, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0xad, 0xc2, 0x70, 0xff, 0xf0, 0x09, 0x00, 0x00,
+}
diff --git a/collector-agent/protocol/Stat.pb.go b/collector-agent/protocol/Stat.pb.go
new file mode 100644
index 000000000..afcc3b18f
--- /dev/null
+++ b/collector-agent/protocol/Stat.pb.go
@@ -0,0 +1,1467 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: Stat.proto
+
+package v1
+
+import (
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	_ "github.com/golang/protobuf/ptypes/empty"
+	math "math"
+)
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
+
+type PJvmGcType int32
+
+const (
+	PJvmGcType_JVM_GC_TYPE_UNKNOWN  PJvmGcType = 0
+	PJvmGcType_JVM_GC_TYPE_SERIAL   PJvmGcType = 1
+	PJvmGcType_JVM_GC_TYPE_PARALLEL PJvmGcType = 2
+	PJvmGcType_JVM_GC_TYPE_CMS      PJvmGcType = 3
+	PJvmGcType_JVM_GC_TYPE_G1       PJvmGcType = 4
+)
+
+var PJvmGcType_name = map[int32]string{
+	0: "JVM_GC_TYPE_UNKNOWN",
+	1: "JVM_GC_TYPE_SERIAL",
+	2: "JVM_GC_TYPE_PARALLEL",
+	3: "JVM_GC_TYPE_CMS",
+	4: "JVM_GC_TYPE_G1",
+}
+
+var PJvmGcType_value = map[string]int32{
+	"JVM_GC_TYPE_UNKNOWN":  0,
+	"JVM_GC_TYPE_SERIAL":   1,
+	"JVM_GC_TYPE_PARALLEL": 2,
+	"JVM_GC_TYPE_CMS":      3,
+	"JVM_GC_TYPE_G1":       4,
+}
+
+func (x PJvmGcType) String() string {
+	return proto.EnumName(PJvmGcType_name, int32(x))
+}
+
+func (PJvmGcType) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_29a37052f84a5404, []int{0}
+}
+
+type PPing struct {
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *PPing) Reset()         { *m = PPing{} }
+func (m *PPing) String() string { return proto.CompactTextString(m) }
+func (*PPing) ProtoMessage()    {}
+func (*PPing) Descriptor() ([]byte, []int) {
+	return fileDescriptor_29a37052f84a5404, []int{0}
+}
+
+func (m *PPing) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PPing.Unmarshal(m, b)
+}
+func (m *PPing) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PPing.Marshal(b, m, deterministic)
+}
+func (m *PPing) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PPing.Merge(m, src)
+}
+func (m *PPing) XXX_Size() int {
+	return xxx_messageInfo_PPing.Size(m)
+}
+func (m *PPing) XXX_DiscardUnknown() {
+	xxx_messageInfo_PPing.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PPing proto.InternalMessageInfo
+
+type PStatMessage struct {
+	// Types that are valid to be assigned to Field:
+	//	*PStatMessage_AgentStat
+	//	*PStatMessage_AgentStatBatch
+	Field                isPStatMessage_Field `protobuf_oneof:"field"`
+	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
+	XXX_unrecognized     []byte               `json:"-"`
+	XXX_sizecache        int32                `json:"-"`
+}
+
+func (m *PStatMessage) Reset()         { *m = PStatMessage{} }
+func (m *PStatMessage) String() string { return proto.CompactTextString(m) }
+func (*PStatMessage) ProtoMessage()    {}
+func (*PStatMessage) Descriptor() ([]byte, []int) {
+	return fileDescriptor_29a37052f84a5404, []int{1}
+}
+
+func (m *PStatMessage) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PStatMessage.Unmarshal(m, b)
+}
+func (m *PStatMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PStatMessage.Marshal(b, m, deterministic)
+}
+func (m *PStatMessage) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PStatMessage.Merge(m, src)
+}
+func (m *PStatMessage) XXX_Size() int {
+	return xxx_messageInfo_PStatMessage.Size(m)
+}
+func (m *PStatMessage) XXX_DiscardUnknown() {
+	xxx_messageInfo_PStatMessage.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PStatMessage proto.InternalMessageInfo
+
+type isPStatMessage_Field interface {
+	isPStatMessage_Field()
+}
+
+type PStatMessage_AgentStat struct {
+	AgentStat *PAgentStat `protobuf:"bytes,1,opt,name=agentStat,proto3,oneof"`
+}
+
+type PStatMessage_AgentStatBatch struct {
+	AgentStatBatch *PAgentStatBatch `protobuf:"bytes,2,opt,name=agentStatBatch,proto3,oneof"`
+}
+
+func (*PStatMessage_AgentStat) isPStatMessage_Field() {}
+
+func (*PStatMessage_AgentStatBatch) isPStatMessage_Field() {}
+
+func (m *PStatMessage) GetField() isPStatMessage_Field {
+	if m != nil {
+		return m.Field
+	}
+	return nil
+}
+
+func (m *PStatMessage) GetAgentStat() *PAgentStat {
+	if x, ok := m.GetField().(*PStatMessage_AgentStat); ok {
+		return x.AgentStat
+	}
+	return nil
+}
+
+func (m *PStatMessage) GetAgentStatBatch() *PAgentStatBatch {
+	if x, ok := m.GetField().(*PStatMessage_AgentStatBatch); ok {
+		return x.AgentStatBatch
+	}
+	return nil
+}
+
+// XXX_OneofWrappers is for the internal use of the proto package.
+func (*PStatMessage) XXX_OneofWrappers() []interface{} {
+	return []interface{}{
+		(*PStatMessage_AgentStat)(nil),
+		(*PStatMessage_AgentStatBatch)(nil),
+	}
+}
+
+type PAgentInfo struct {
+	Hostname             string           `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"`
+	Ip                   string           `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"`
+	Ports                string           `protobuf:"bytes,3,opt,name=ports,proto3" json:"ports,omitempty"`
+	ServiceType          int32            `protobuf:"varint,4,opt,name=serviceType,proto3" json:"serviceType,omitempty"`
+	Pid                  int32            `protobuf:"varint,5,opt,name=pid,proto3" json:"pid,omitempty"`
+	AgentVersion         string           `protobuf:"bytes,6,opt,name=agentVersion,proto3" json:"agentVersion,omitempty"`
+	VmVersion            string           `protobuf:"bytes,7,opt,name=vmVersion,proto3" json:"vmVersion,omitempty"`
+	EndTimestamp         int64            `protobuf:"varint,8,opt,name=endTimestamp,proto3" json:"endTimestamp,omitempty"`
+	EndStatus            int32            `protobuf:"varint,9,opt,name=endStatus,proto3" json:"endStatus,omitempty"`
+	ServerMetaData       *PServerMetaData `protobuf:"bytes,10,opt,name=serverMetaData,proto3" json:"serverMetaData,omitempty"`
+	JvmInfo              *PJvmInfo        `protobuf:"bytes,11,opt,name=jvmInfo,proto3" json:"jvmInfo,omitempty"`
+	Container            bool             `protobuf:"varint,12,opt,name=container,proto3" json:"container,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
+	XXX_unrecognized     []byte           `json:"-"`
+	XXX_sizecache        int32            `json:"-"`
+}
+
+func (m *PAgentInfo) Reset()         { *m = PAgentInfo{} }
+func (m *PAgentInfo) String() string { return proto.CompactTextString(m) }
+func (*PAgentInfo) ProtoMessage()    {}
+func (*PAgentInfo) Descriptor() ([]byte, []int) {
+	return fileDescriptor_29a37052f84a5404, []int{2}
+}
+
+func (m *PAgentInfo) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PAgentInfo.Unmarshal(m, b)
+}
+func (m *PAgentInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PAgentInfo.Marshal(b, m, deterministic)
+}
+func (m *PAgentInfo) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PAgentInfo.Merge(m, src)
+}
+func (m *PAgentInfo) XXX_Size() int {
+	return xxx_messageInfo_PAgentInfo.Size(m)
+}
+func (m *PAgentInfo) XXX_DiscardUnknown() {
+	xxx_messageInfo_PAgentInfo.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PAgentInfo proto.InternalMessageInfo
+
+func (m *PAgentInfo) GetHostname() string {
+	if m != nil {
+		return m.Hostname
+	}
+	return ""
+}
+
+func (m *PAgentInfo) GetIp() string {
+	if m != nil {
+		return m.Ip
+	}
+	return ""
+}
+
+func (m *PAgentInfo) GetPorts() string {
+	if m != nil {
+		return m.Ports
+	}
+	return ""
+}
+
+func (m *PAgentInfo) GetServiceType() int32 {
+	if m != nil {
+		return m.ServiceType
+	}
+	return 0
+}
+
+func (m *PAgentInfo) GetPid() int32 {
+	if m != nil {
+		return m.Pid
+	}
+	return 0
+}
+
+func (m *PAgentInfo) GetAgentVersion() string {
+	if m != nil {
+		return m.AgentVersion
+	}
+	return ""
+}
+
+func (m *PAgentInfo) GetVmVersion() string {
+	if m != nil {
+		return m.VmVersion
+	}
+	return ""
+}
+
+func (m *PAgentInfo) GetEndTimestamp() int64 {
+	if m != nil {
+		return m.EndTimestamp
+	}
+	return 0
+}
+
+func (m *PAgentInfo) GetEndStatus() int32 {
+	if m != nil {
+		return m.EndStatus
+	}
+	return 0
+}
+
+func (m *PAgentInfo) GetServerMetaData() *PServerMetaData {
+	if m != nil {
+		return m.ServerMetaData
+	}
+	return nil
+}
+
+func (m *PAgentInfo) GetJvmInfo() *PJvmInfo {
+	if m != nil {
+		return m.JvmInfo
+	}
+	return nil
+}
+
+func (m *PAgentInfo) GetContainer() bool {
+	if m != nil {
+		return m.Container
+	}
+	return false
+}
+
+type PServerMetaData struct {
+	ServerInfo           string          `protobuf:"bytes,1,opt,name=serverInfo,proto3" json:"serverInfo,omitempty"`
+	VmArg                []string        `protobuf:"bytes,2,rep,name=vmArg,proto3" json:"vmArg,omitempty"`
+	ServiceInfo          []*PServiceInfo `protobuf:"bytes,3,rep,name=serviceInfo,proto3" json:"serviceInfo,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
+	XXX_unrecognized     []byte          `json:"-"`
+	XXX_sizecache        int32           `json:"-"`
+}
+
+func (m *PServerMetaData) Reset()         { *m = PServerMetaData{} }
+func (m *PServerMetaData) String() string { return proto.CompactTextString(m) }
+func (*PServerMetaData) ProtoMessage()    {}
+func (*PServerMetaData) Descriptor() ([]byte, []int) {
+	return fileDescriptor_29a37052f84a5404, []int{3}
+}
+
+func (m *PServerMetaData) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PServerMetaData.Unmarshal(m, b)
+}
+func (m *PServerMetaData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PServerMetaData.Marshal(b, m, deterministic)
+}
+func (m *PServerMetaData) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PServerMetaData.Merge(m, src)
+}
+func (m *PServerMetaData) XXX_Size() int {
+	return xxx_messageInfo_PServerMetaData.Size(m)
+}
+func (m *PServerMetaData) XXX_DiscardUnknown() {
+	xxx_messageInfo_PServerMetaData.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PServerMetaData proto.InternalMessageInfo
+
+func (m *PServerMetaData) GetServerInfo() string {
+	if m != nil {
+		return m.ServerInfo
+	}
+	return ""
+}
+
+func (m *PServerMetaData) GetVmArg() []string {
+	if m != nil {
+		return m.VmArg
+	}
+	return nil
+}
+
+func (m *PServerMetaData) GetServiceInfo() []*PServiceInfo {
+	if m != nil {
+		return m.ServiceInfo
+	}
+	return nil
+}
+
+type PServiceInfo struct {
+	ServiceName          string   `protobuf:"bytes,1,opt,name=serviceName,proto3" json:"serviceName,omitempty"`
+	ServiceLib           []string `protobuf:"bytes,2,rep,name=serviceLib,proto3" json:"serviceLib,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *PServiceInfo) Reset()         { *m = PServiceInfo{} }
+func (m *PServiceInfo) String() string { return proto.CompactTextString(m) }
+func (*PServiceInfo) ProtoMessage()    {}
+func (*PServiceInfo) Descriptor() ([]byte, []int) {
+	return fileDescriptor_29a37052f84a5404, []int{4}
+}
+
+func (m *PServiceInfo) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PServiceInfo.Unmarshal(m, b)
+}
+func (m *PServiceInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PServiceInfo.Marshal(b, m, deterministic)
+}
+func (m *PServiceInfo) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PServiceInfo.Merge(m, src)
+}
+func (m *PServiceInfo) XXX_Size() int {
+	return xxx_messageInfo_PServiceInfo.Size(m)
+}
+func (m *PServiceInfo) XXX_DiscardUnknown() {
+	xxx_messageInfo_PServiceInfo.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PServiceInfo proto.InternalMessageInfo
+
+func (m *PServiceInfo) GetServiceName() string {
+	if m != nil {
+		return m.ServiceName
+	}
+	return ""
+}
+
+func (m *PServiceInfo) GetServiceLib() []string {
+	if m != nil {
+		return m.ServiceLib
+	}
+	return nil
+}
+
+type PJvmInfo struct {
+	Version              int32      `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
+	VmVersion            string     `protobuf:"bytes,2,opt,name=vmVersion,proto3" json:"vmVersion,omitempty"`
+	GcType               PJvmGcType `protobuf:"varint,3,opt,name=gcType,proto3,enum=v1.PJvmGcType" json:"gcType,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
+	XXX_unrecognized     []byte     `json:"-"`
+	XXX_sizecache        int32      `json:"-"`
+}
+
+func (m *PJvmInfo) Reset()         { *m = PJvmInfo{} }
+func (m *PJvmInfo) String() string { return proto.CompactTextString(m) }
+func (*PJvmInfo) ProtoMessage()    {}
+func (*PJvmInfo) Descriptor() ([]byte, []int) {
+	return fileDescriptor_29a37052f84a5404, []int{5}
+}
+
+func (m *PJvmInfo) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PJvmInfo.Unmarshal(m, b)
+}
+func (m *PJvmInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PJvmInfo.Marshal(b, m, deterministic)
+}
+func (m *PJvmInfo) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PJvmInfo.Merge(m, src)
+}
+func (m *PJvmInfo) XXX_Size() int {
+	return xxx_messageInfo_PJvmInfo.Size(m)
+}
+func (m *PJvmInfo) XXX_DiscardUnknown() {
+	xxx_messageInfo_PJvmInfo.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PJvmInfo proto.InternalMessageInfo
+
+func (m *PJvmInfo) GetVersion() int32 {
+	if m != nil {
+		return m.Version
+	}
+	return 0
+}
+
+func (m *PJvmInfo) GetVmVersion() string {
+	if m != nil {
+		return m.VmVersion
+	}
+	return ""
+}
+
+func (m *PJvmInfo) GetGcType() PJvmGcType {
+	if m != nil {
+		return m.GcType
+	}
+	return PJvmGcType_JVM_GC_TYPE_UNKNOWN
+}
+
+type PAgentStat struct {
+	Timestamp            int64            `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
+	CollectInterval      int64            `protobuf:"varint,2,opt,name=collectInterval,proto3" json:"collectInterval,omitempty"`
+	Gc                   *PJvmGc          `protobuf:"bytes,3,opt,name=gc,proto3" json:"gc,omitempty"`
+	CpuLoad              *PCpuLoad        `protobuf:"bytes,4,opt,name=cpuLoad,proto3" json:"cpuLoad,omitempty"`
+	Transaction          *PTransaction    `protobuf:"bytes,5,opt,name=transaction,proto3" json:"transaction,omitempty"`
+	ActiveTrace          *PActiveTrace    `protobuf:"bytes,6,opt,name=activeTrace,proto3" json:"activeTrace,omitempty"`
+	DataSourceList       *PDataSourceList `protobuf:"bytes,7,opt,name=dataSourceList,proto3" json:"dataSourceList,omitempty"`
+	ResponseTime         *PResponseTime   `protobuf:"bytes,8,opt,name=responseTime,proto3" json:"responseTime,omitempty"`
+	Deadlock             *PDeadlock       `protobuf:"bytes,9,opt,name=deadlock,proto3" json:"deadlock,omitempty"`
+	FileDescriptor       *PFileDescriptor `protobuf:"bytes,10,opt,name=fileDescriptor,proto3" json:"fileDescriptor,omitempty"`
+	DirectBuffer         *PDirectBuffer   `protobuf:"bytes,11,opt,name=directBuffer,proto3" json:"directBuffer,omitempty"`
+	Metadata             string           `protobuf:"bytes,12,opt,name=metadata,proto3" json:"metadata,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
+	XXX_unrecognized     []byte           `json:"-"`
+	XXX_sizecache        int32            `json:"-"`
+}
+
+func (m *PAgentStat) Reset()         { *m = PAgentStat{} }
+func (m *PAgentStat) String() string { return proto.CompactTextString(m) }
+func (*PAgentStat) ProtoMessage()    {}
+func (*PAgentStat) Descriptor() ([]byte, []int) {
+	return fileDescriptor_29a37052f84a5404, []int{6}
+}
+
+func (m *PAgentStat) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PAgentStat.Unmarshal(m, b)
+}
+func (m *PAgentStat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PAgentStat.Marshal(b, m, deterministic)
+}
+func (m *PAgentStat) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PAgentStat.Merge(m, src)
+}
+func (m *PAgentStat) XXX_Size() int {
+	return xxx_messageInfo_PAgentStat.Size(m)
+}
+func (m *PAgentStat) XXX_DiscardUnknown() {
+	xxx_messageInfo_PAgentStat.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PAgentStat proto.InternalMessageInfo
+
+func (m *PAgentStat) GetTimestamp() int64 {
+	if m != nil {
+		return m.Timestamp
+	}
+	return 0
+}
+
+func (m *PAgentStat) GetCollectInterval() int64 {
+	if m != nil {
+		return m.CollectInterval
+	}
+	return 0
+}
+
+func (m *PAgentStat) GetGc() *PJvmGc {
+	if m != nil {
+		return m.Gc
+	}
+	return nil
+}
+
+func (m *PAgentStat) GetCpuLoad() *PCpuLoad {
+	if m != nil {
+		return m.CpuLoad
+	}
+	return nil
+}
+
+func (m *PAgentStat) GetTransaction() *PTransaction {
+	if m != nil {
+		return m.Transaction
+	}
+	return nil
+}
+
+func (m *PAgentStat) GetActiveTrace() *PActiveTrace {
+	if m != nil {
+		return m.ActiveTrace
+	}
+	return nil
+}
+
+func (m *PAgentStat) GetDataSourceList() *PDataSourceList {
+	if m != nil {
+		return m.DataSourceList
+	}
+	return nil
+}
+
+func (m *PAgentStat) GetResponseTime() *PResponseTime {
+	if m != nil {
+		return m.ResponseTime
+	}
+	return nil
+}
+
+func (m *PAgentStat) GetDeadlock() *PDeadlock {
+	if m != nil {
+		return m.Deadlock
+	}
+	return nil
+}
+
+func (m *PAgentStat) GetFileDescriptor() *PFileDescriptor {
+	if m != nil {
+		return m.FileDescriptor
+	}
+	return nil
+}
+
+func (m *PAgentStat) GetDirectBuffer() *PDirectBuffer {
+	if m != nil {
+		return m.DirectBuffer
+	}
+	return nil
+}
+
+func (m *PAgentStat) GetMetadata() string {
+	if m != nil {
+		return m.Metadata
+	}
+	return ""
+}
+
+type PAgentStatBatch struct {
+	AgentStat            []*PAgentStat `protobuf:"bytes,1,rep,name=agentStat,proto3" json:"agentStat,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
+	XXX_unrecognized     []byte        `json:"-"`
+	XXX_sizecache        int32         `json:"-"`
+}
+
+func (m *PAgentStatBatch) Reset()         { *m = PAgentStatBatch{} }
+func (m *PAgentStatBatch) String() string { return proto.CompactTextString(m) }
+func (*PAgentStatBatch) ProtoMessage()    {}
+func (*PAgentStatBatch) Descriptor() ([]byte, []int) {
+	return fileDescriptor_29a37052f84a5404, []int{7}
+}
+
+func (m *PAgentStatBatch) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PAgentStatBatch.Unmarshal(m, b)
+}
+func (m *PAgentStatBatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PAgentStatBatch.Marshal(b, m, deterministic)
+}
+func (m *PAgentStatBatch) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PAgentStatBatch.Merge(m, src)
+}
+func (m *PAgentStatBatch) XXX_Size() int {
+	return xxx_messageInfo_PAgentStatBatch.Size(m)
+}
+func (m *PAgentStatBatch) XXX_DiscardUnknown() {
+	xxx_messageInfo_PAgentStatBatch.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PAgentStatBatch proto.InternalMessageInfo
+
+func (m *PAgentStatBatch) GetAgentStat() []*PAgentStat {
+	if m != nil {
+		return m.AgentStat
+	}
+	return nil
+}
+
+type PDataSource struct {
+	Id                   int32    `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
+	ServiceTypeCode      int32    `protobuf:"varint,2,opt,name=serviceTypeCode,proto3" json:"serviceTypeCode,omitempty"`
+	DatabaseName         string   `protobuf:"bytes,3,opt,name=databaseName,proto3" json:"databaseName,omitempty"`
+	Url                  string   `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty"`
+	ActiveConnectionSize int32    `protobuf:"varint,5,opt,name=activeConnectionSize,proto3" json:"activeConnectionSize,omitempty"`
+	MaxConnectionSize    int32    `protobuf:"varint,6,opt,name=maxConnectionSize,proto3" json:"maxConnectionSize,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *PDataSource) Reset()         { *m = PDataSource{} }
+func (m *PDataSource) String() string { return proto.CompactTextString(m) }
+func (*PDataSource) ProtoMessage()    {}
+func (*PDataSource) Descriptor() ([]byte, []int) {
+	return fileDescriptor_29a37052f84a5404, []int{8}
+}
+
+func (m *PDataSource) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PDataSource.Unmarshal(m, b)
+}
+func (m *PDataSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PDataSource.Marshal(b, m, deterministic)
+}
+func (m *PDataSource) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PDataSource.Merge(m, src)
+}
+func (m *PDataSource) XXX_Size() int {
+	return xxx_messageInfo_PDataSource.Size(m)
+}
+func (m *PDataSource) XXX_DiscardUnknown() {
+	xxx_messageInfo_PDataSource.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PDataSource proto.InternalMessageInfo
+
+func (m *PDataSource) GetId() int32 {
+	if m != nil {
+		return m.Id
+	}
+	return 0
+}
+
+func (m *PDataSource) GetServiceTypeCode() int32 {
+	if m != nil {
+		return m.ServiceTypeCode
+	}
+	return 0
+}
+
+func (m *PDataSource) GetDatabaseName() string {
+	if m != nil {
+		return m.DatabaseName
+	}
+	return ""
+}
+
+func (m *PDataSource) GetUrl() string {
+	if m != nil {
+		return m.Url
+	}
+	return ""
+}
+
+func (m *PDataSource) GetActiveConnectionSize() int32 {
+	if m != nil {
+		return m.ActiveConnectionSize
+	}
+	return 0
+}
+
+func (m *PDataSource) GetMaxConnectionSize() int32 {
+	if m != nil {
+		return m.MaxConnectionSize
+	}
+	return 0
+}
+
+type PDataSourceList struct {
+	DataSource           []*PDataSource `protobuf:"bytes,1,rep,name=dataSource,proto3" json:"dataSource,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
+	XXX_unrecognized     []byte         `json:"-"`
+	XXX_sizecache        int32          `json:"-"`
+}
+
+func (m *PDataSourceList) Reset()         { *m = PDataSourceList{} }
+func (m *PDataSourceList) String() string { return proto.CompactTextString(m) }
+func (*PDataSourceList) ProtoMessage()    {}
+func (*PDataSourceList) Descriptor() ([]byte, []int) {
+	return fileDescriptor_29a37052f84a5404, []int{9}
+}
+
+func (m *PDataSourceList) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PDataSourceList.Unmarshal(m, b)
+}
+func (m *PDataSourceList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PDataSourceList.Marshal(b, m, deterministic)
+}
+func (m *PDataSourceList) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PDataSourceList.Merge(m, src)
+}
+func (m *PDataSourceList) XXX_Size() int {
+	return xxx_messageInfo_PDataSourceList.Size(m)
+}
+func (m *PDataSourceList) XXX_DiscardUnknown() {
+	xxx_messageInfo_PDataSourceList.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PDataSourceList proto.InternalMessageInfo
+
+func (m *PDataSourceList) GetDataSource() []*PDataSource {
+	if m != nil {
+		return m.DataSource
+	}
+	return nil
+}
+
+type PFileDescriptor struct {
+	OpenFileDescriptorCount int64    `protobuf:"varint,1,opt,name=openFileDescriptorCount,proto3" json:"openFileDescriptorCount,omitempty"`
+	XXX_NoUnkeyedLiteral    struct{} `json:"-"`
+	XXX_unrecognized        []byte   `json:"-"`
+	XXX_sizecache           int32    `json:"-"`
+}
+
+func (m *PFileDescriptor) Reset()         { *m = PFileDescriptor{} }
+func (m *PFileDescriptor) String() string { return proto.CompactTextString(m) }
+func (*PFileDescriptor) ProtoMessage()    {}
+func (*PFileDescriptor) Descriptor() ([]byte, []int) {
+	return fileDescriptor_29a37052f84a5404, []int{10}
+}
+
+func (m *PFileDescriptor) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PFileDescriptor.Unmarshal(m, b)
+}
+func (m *PFileDescriptor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PFileDescriptor.Marshal(b, m, deterministic)
+}
+func (m *PFileDescriptor) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PFileDescriptor.Merge(m, src)
+}
+func (m *PFileDescriptor) XXX_Size() int {
+	return xxx_messageInfo_PFileDescriptor.Size(m)
+}
+func (m *PFileDescriptor) XXX_DiscardUnknown() {
+	xxx_messageInfo_PFileDescriptor.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PFileDescriptor proto.InternalMessageInfo
+
+func (m *PFileDescriptor) GetOpenFileDescriptorCount() int64 {
+	if m != nil {
+		return m.OpenFileDescriptorCount
+	}
+	return 0
+}
+
+type PJvmGc struct {
+	Type                 PJvmGcType      `protobuf:"varint,1,opt,name=type,proto3,enum=v1.PJvmGcType" json:"type,omitempty"`
+	JvmMemoryHeapUsed    int64           `protobuf:"varint,2,opt,name=jvmMemoryHeapUsed,proto3" json:"jvmMemoryHeapUsed,omitempty"`
+	JvmMemoryHeapMax     int64           `protobuf:"varint,3,opt,name=jvmMemoryHeapMax,proto3" json:"jvmMemoryHeapMax,omitempty"`
+	JvmMemoryNonHeapUsed int64           `protobuf:"varint,4,opt,name=jvmMemoryNonHeapUsed,proto3" json:"jvmMemoryNonHeapUsed,omitempty"`
+	JvmMemoryNonHeapMax  int64           `protobuf:"varint,5,opt,name=jvmMemoryNonHeapMax,proto3" json:"jvmMemoryNonHeapMax,omitempty"`
+	JvmGcOldCount        int64           `protobuf:"varint,6,opt,name=jvmGcOldCount,proto3" json:"jvmGcOldCount,omitempty"`
+	JvmGcOldTime         int64           `protobuf:"varint,7,opt,name=jvmGcOldTime,proto3" json:"jvmGcOldTime,omitempty"`
+	JvmGcDetailed        *PJvmGcDetailed `protobuf:"bytes,8,opt,name=jvmGcDetailed,proto3" json:"jvmGcDetailed,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
+	XXX_unrecognized     []byte          `json:"-"`
+	XXX_sizecache        int32           `json:"-"`
+}
+
+func (m *PJvmGc) Reset()         { *m = PJvmGc{} }
+func (m *PJvmGc) String() string { return proto.CompactTextString(m) }
+func (*PJvmGc) ProtoMessage()    {}
+func (*PJvmGc) Descriptor() ([]byte, []int) {
+	return fileDescriptor_29a37052f84a5404, []int{11}
+}
+
+func (m *PJvmGc) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PJvmGc.Unmarshal(m, b)
+}
+func (m *PJvmGc) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PJvmGc.Marshal(b, m, deterministic)
+}
+func (m *PJvmGc) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PJvmGc.Merge(m, src)
+}
+func (m *PJvmGc) XXX_Size() int {
+	return xxx_messageInfo_PJvmGc.Size(m)
+}
+func (m *PJvmGc) XXX_DiscardUnknown() {
+	xxx_messageInfo_PJvmGc.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PJvmGc proto.InternalMessageInfo
+
+func (m *PJvmGc) GetType() PJvmGcType {
+	if m != nil {
+		return m.Type
+	}
+	return PJvmGcType_JVM_GC_TYPE_UNKNOWN
+}
+
+func (m *PJvmGc) GetJvmMemoryHeapUsed() int64 {
+	if m != nil {
+		return m.JvmMemoryHeapUsed
+	}
+	return 0
+}
+
+func (m *PJvmGc) GetJvmMemoryHeapMax() int64 {
+	if m != nil {
+		return m.JvmMemoryHeapMax
+	}
+	return 0
+}
+
+func (m *PJvmGc) GetJvmMemoryNonHeapUsed() int64 {
+	if m != nil {
+		return m.JvmMemoryNonHeapUsed
+	}
+	return 0
+}
+
+func (m *PJvmGc) GetJvmMemoryNonHeapMax() int64 {
+	if m != nil {
+		return m.JvmMemoryNonHeapMax
+	}
+	return 0
+}
+
+func (m *PJvmGc) GetJvmGcOldCount() int64 {
+	if m != nil {
+		return m.JvmGcOldCount
+	}
+	return 0
+}
+
+func (m *PJvmGc) GetJvmGcOldTime() int64 {
+	if m != nil {
+		return m.JvmGcOldTime
+	}
+	return 0
+}
+
+func (m *PJvmGc) GetJvmGcDetailed() *PJvmGcDetailed {
+	if m != nil {
+		return m.JvmGcDetailed
+	}
+	return nil
+}
+
+type PJvmGcDetailed struct {
+	JvmGcNewCount            int64    `protobuf:"varint,1,opt,name=jvmGcNewCount,proto3" json:"jvmGcNewCount,omitempty"`
+	JvmGcNewTime             int64    `protobuf:"varint,2,opt,name=jvmGcNewTime,proto3" json:"jvmGcNewTime,omitempty"`
+	JvmPoolCodeCacheUsed     float64  `protobuf:"fixed64,3,opt,name=jvmPoolCodeCacheUsed,proto3" json:"jvmPoolCodeCacheUsed,omitempty"`
+	JvmPoolNewGenUsed        float64  `protobuf:"fixed64,4,opt,name=jvmPoolNewGenUsed,proto3" json:"jvmPoolNewGenUsed,omitempty"`
+	JvmPoolOldGenUsed        float64  `protobuf:"fixed64,5,opt,name=jvmPoolOldGenUsed,proto3" json:"jvmPoolOldGenUsed,omitempty"`
+	JvmPoolSurvivorSpaceUsed float64  `protobuf:"fixed64,6,opt,name=jvmPoolSurvivorSpaceUsed,proto3" json:"jvmPoolSurvivorSpaceUsed,omitempty"`
+	JvmPoolPermGenUsed       float64  `protobuf:"fixed64,7,opt,name=jvmPoolPermGenUsed,proto3" json:"jvmPoolPermGenUsed,omitempty"`
+	JvmPoolMetaspaceUsed     float64  `protobuf:"fixed64,8,opt,name=jvmPoolMetaspaceUsed,proto3" json:"jvmPoolMetaspaceUsed,omitempty"`
+	XXX_NoUnkeyedLiteral     struct{} `json:"-"`
+	XXX_unrecognized         []byte   `json:"-"`
+	XXX_sizecache            int32    `json:"-"`
+}
+
+func (m *PJvmGcDetailed) Reset()         { *m = PJvmGcDetailed{} }
+func (m *PJvmGcDetailed) String() string { return proto.CompactTextString(m) }
+func (*PJvmGcDetailed) ProtoMessage()    {}
+func (*PJvmGcDetailed) Descriptor() ([]byte, []int) {
+	return fileDescriptor_29a37052f84a5404, []int{12}
+}
+
+func (m *PJvmGcDetailed) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PJvmGcDetailed.Unmarshal(m, b)
+}
+func (m *PJvmGcDetailed) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PJvmGcDetailed.Marshal(b, m, deterministic)
+}
+func (m *PJvmGcDetailed) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PJvmGcDetailed.Merge(m, src)
+}
+func (m *PJvmGcDetailed) XXX_Size() int {
+	return xxx_messageInfo_PJvmGcDetailed.Size(m)
+}
+func (m *PJvmGcDetailed) XXX_DiscardUnknown() {
+	xxx_messageInfo_PJvmGcDetailed.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PJvmGcDetailed proto.InternalMessageInfo
+
+func (m *PJvmGcDetailed) GetJvmGcNewCount() int64 {
+	if m != nil {
+		return m.JvmGcNewCount
+	}
+	return 0
+}
+
+func (m *PJvmGcDetailed) GetJvmGcNewTime() int64 {
+	if m != nil {
+		return m.JvmGcNewTime
+	}
+	return 0
+}
+
+func (m *PJvmGcDetailed) GetJvmPoolCodeCacheUsed() float64 {
+	if m != nil {
+		return m.JvmPoolCodeCacheUsed
+	}
+	return 0
+}
+
+func (m *PJvmGcDetailed) GetJvmPoolNewGenUsed() float64 {
+	if m != nil {
+		return m.JvmPoolNewGenUsed
+	}
+	return 0
+}
+
+func (m *PJvmGcDetailed) GetJvmPoolOldGenUsed() float64 {
+	if m != nil {
+		return m.JvmPoolOldGenUsed
+	}
+	return 0
+}
+
+func (m *PJvmGcDetailed) GetJvmPoolSurvivorSpaceUsed() float64 {
+	if m != nil {
+		return m.JvmPoolSurvivorSpaceUsed
+	}
+	return 0
+}
+
+func (m *PJvmGcDetailed) GetJvmPoolPermGenUsed() float64 {
+	if m != nil {
+		return m.JvmPoolPermGenUsed
+	}
+	return 0
+}
+
+func (m *PJvmGcDetailed) GetJvmPoolMetaspaceUsed() float64 {
+	if m != nil {
+		return m.JvmPoolMetaspaceUsed
+	}
+	return 0
+}
+
+type PCpuLoad struct {
+	JvmCpuLoad           float64  `protobuf:"fixed64,1,opt,name=jvmCpuLoad,proto3" json:"jvmCpuLoad,omitempty"`
+	SystemCpuLoad        float64  `protobuf:"fixed64,2,opt,name=systemCpuLoad,proto3" json:"systemCpuLoad,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *PCpuLoad) Reset()         { *m = PCpuLoad{} }
+func (m *PCpuLoad) String() string { return proto.CompactTextString(m) }
+func (*PCpuLoad) ProtoMessage()    {}
+func (*PCpuLoad) Descriptor() ([]byte, []int) {
+	return fileDescriptor_29a37052f84a5404, []int{13}
+}
+
+func (m *PCpuLoad) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PCpuLoad.Unmarshal(m, b)
+}
+func (m *PCpuLoad) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PCpuLoad.Marshal(b, m, deterministic)
+}
+func (m *PCpuLoad) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PCpuLoad.Merge(m, src)
+}
+func (m *PCpuLoad) XXX_Size() int {
+	return xxx_messageInfo_PCpuLoad.Size(m)
+}
+func (m *PCpuLoad) XXX_DiscardUnknown() {
+	xxx_messageInfo_PCpuLoad.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PCpuLoad proto.InternalMessageInfo
+
+func (m *PCpuLoad) GetJvmCpuLoad() float64 {
+	if m != nil {
+		return m.JvmCpuLoad
+	}
+	return 0
+}
+
+func (m *PCpuLoad) GetSystemCpuLoad() float64 {
+	if m != nil {
+		return m.SystemCpuLoad
+	}
+	return 0
+}
+
+type PTransaction struct {
+	SampledNewCount            int64    `protobuf:"varint,2,opt,name=sampledNewCount,proto3" json:"sampledNewCount,omitempty"`
+	SampledContinuationCount   int64    `protobuf:"varint,3,opt,name=sampledContinuationCount,proto3" json:"sampledContinuationCount,omitempty"`
+	UnsampledNewCount          int64    `protobuf:"varint,4,opt,name=unsampledNewCount,proto3" json:"unsampledNewCount,omitempty"`
+	UnsampledContinuationCount int64    `protobuf:"varint,5,opt,name=unsampledContinuationCount,proto3" json:"unsampledContinuationCount,omitempty"`
+	SkippedNewCount            int64    `protobuf:"varint,6,opt,name=skippedNewCount,proto3" json:"skippedNewCount,omitempty"`
+	SkippedContinuationCount   int64    `protobuf:"varint,7,opt,name=skippedContinuationCount,proto3" json:"skippedContinuationCount,omitempty"`
+	XXX_NoUnkeyedLiteral       struct{} `json:"-"`
+	XXX_unrecognized           []byte   `json:"-"`
+	XXX_sizecache              int32    `json:"-"`
+}
+
+func (m *PTransaction) Reset()         { *m = PTransaction{} }
+func (m *PTransaction) String() string { return proto.CompactTextString(m) }
+func (*PTransaction) ProtoMessage()    {}
+func (*PTransaction) Descriptor() ([]byte, []int) {
+	return fileDescriptor_29a37052f84a5404, []int{14}
+}
+
+func (m *PTransaction) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PTransaction.Unmarshal(m, b)
+}
+func (m *PTransaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PTransaction.Marshal(b, m, deterministic)
+}
+func (m *PTransaction) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PTransaction.Merge(m, src)
+}
+func (m *PTransaction) XXX_Size() int {
+	return xxx_messageInfo_PTransaction.Size(m)
+}
+func (m *PTransaction) XXX_DiscardUnknown() {
+	xxx_messageInfo_PTransaction.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PTransaction proto.InternalMessageInfo
+
+func (m *PTransaction) GetSampledNewCount() int64 {
+	if m != nil {
+		return m.SampledNewCount
+	}
+	return 0
+}
+
+func (m *PTransaction) GetSampledContinuationCount() int64 {
+	if m != nil {
+		return m.SampledContinuationCount
+	}
+	return 0
+}
+
+func (m *PTransaction) GetUnsampledNewCount() int64 {
+	if m != nil {
+		return m.UnsampledNewCount
+	}
+	return 0
+}
+
+func (m *PTransaction) GetUnsampledContinuationCount() int64 {
+	if m != nil {
+		return m.UnsampledContinuationCount
+	}
+	return 0
+}
+
+func (m *PTransaction) GetSkippedNewCount() int64 {
+	if m != nil {
+		return m.SkippedNewCount
+	}
+	return 0
+}
+
+func (m *PTransaction) GetSkippedContinuationCount() int64 {
+	if m != nil {
+		return m.SkippedContinuationCount
+	}
+	return 0
+}
+
+type PActiveTraceHistogram struct {
+	Version              int32    `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
+	HistogramSchemaType  int32    `protobuf:"varint,2,opt,name=histogramSchemaType,proto3" json:"histogramSchemaType,omitempty"`
+	ActiveTraceCount     []int32  `protobuf:"varint,3,rep,packed,name=activeTraceCount,proto3" json:"activeTraceCount,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *PActiveTraceHistogram) Reset()         { *m = PActiveTraceHistogram{} }
+func (m *PActiveTraceHistogram) String() string { return proto.CompactTextString(m) }
+func (*PActiveTraceHistogram) ProtoMessage()    {}
+func (*PActiveTraceHistogram) Descriptor() ([]byte, []int) {
+	return fileDescriptor_29a37052f84a5404, []int{15}
+}
+
+func (m *PActiveTraceHistogram) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PActiveTraceHistogram.Unmarshal(m, b)
+}
+func (m *PActiveTraceHistogram) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PActiveTraceHistogram.Marshal(b, m, deterministic)
+}
+func (m *PActiveTraceHistogram) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PActiveTraceHistogram.Merge(m, src)
+}
+func (m *PActiveTraceHistogram) XXX_Size() int {
+	return xxx_messageInfo_PActiveTraceHistogram.Size(m)
+}
+func (m *PActiveTraceHistogram) XXX_DiscardUnknown() {
+	xxx_messageInfo_PActiveTraceHistogram.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PActiveTraceHistogram proto.InternalMessageInfo
+
+func (m *PActiveTraceHistogram) GetVersion() int32 {
+	if m != nil {
+		return m.Version
+	}
+	return 0
+}
+
+func (m *PActiveTraceHistogram) GetHistogramSchemaType() int32 {
+	if m != nil {
+		return m.HistogramSchemaType
+	}
+	return 0
+}
+
+func (m *PActiveTraceHistogram) GetActiveTraceCount() []int32 {
+	if m != nil {
+		return m.ActiveTraceCount
+	}
+	return nil
+}
+
+type PActiveTrace struct {
+	Histogram            *PActiveTraceHistogram `protobuf:"bytes,1,opt,name=histogram,proto3" json:"histogram,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}               `json:"-"`
+	XXX_unrecognized     []byte                 `json:"-"`
+	XXX_sizecache        int32                  `json:"-"`
+}
+
+func (m *PActiveTrace) Reset()         { *m = PActiveTrace{} }
+func (m *PActiveTrace) String() string { return proto.CompactTextString(m) }
+func (*PActiveTrace) ProtoMessage()    {}
+func (*PActiveTrace) Descriptor() ([]byte, []int) {
+	return fileDescriptor_29a37052f84a5404, []int{16}
+}
+
+func (m *PActiveTrace) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PActiveTrace.Unmarshal(m, b)
+}
+func (m *PActiveTrace) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PActiveTrace.Marshal(b, m, deterministic)
+}
+func (m *PActiveTrace) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PActiveTrace.Merge(m, src)
+}
+func (m *PActiveTrace) XXX_Size() int {
+	return xxx_messageInfo_PActiveTrace.Size(m)
+}
+func (m *PActiveTrace) XXX_DiscardUnknown() {
+	xxx_messageInfo_PActiveTrace.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PActiveTrace proto.InternalMessageInfo
+
+func (m *PActiveTrace) GetHistogram() *PActiveTraceHistogram {
+	if m != nil {
+		return m.Histogram
+	}
+	return nil
+}
+
+type PResponseTime struct {
+	Avg                  int64    `protobuf:"varint,1,opt,name=avg,proto3" json:"avg,omitempty"`
+	Max                  int64    `protobuf:"varint,2,opt,name=max,proto3" json:"max,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *PResponseTime) Reset()         { *m = PResponseTime{} }
+func (m *PResponseTime) String() string { return proto.CompactTextString(m) }
+func (*PResponseTime) ProtoMessage()    {}
+func (*PResponseTime) Descriptor() ([]byte, []int) {
+	return fileDescriptor_29a37052f84a5404, []int{17}
+}
+
+func (m *PResponseTime) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PResponseTime.Unmarshal(m, b)
+}
+func (m *PResponseTime) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PResponseTime.Marshal(b, m, deterministic)
+}
+func (m *PResponseTime) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PResponseTime.Merge(m, src)
+}
+func (m *PResponseTime) XXX_Size() int {
+	return xxx_messageInfo_PResponseTime.Size(m)
+}
+func (m *PResponseTime) XXX_DiscardUnknown() {
+	xxx_messageInfo_PResponseTime.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PResponseTime proto.InternalMessageInfo
+
+func (m *PResponseTime) GetAvg() int64 {
+	if m != nil {
+		return m.Avg
+	}
+	return 0
+}
+
+func (m *PResponseTime) GetMax() int64 {
+	if m != nil {
+		return m.Max
+	}
+	return 0
+}
+
+type PDeadlock struct {
+	Count                int32          `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
+	ThreadDump           []*PThreadDump `protobuf:"bytes,2,rep,name=threadDump,proto3" json:"threadDump,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
+	XXX_unrecognized     []byte         `json:"-"`
+	XXX_sizecache        int32          `json:"-"`
+}
+
+func (m *PDeadlock) Reset()         { *m = PDeadlock{} }
+func (m *PDeadlock) String() string { return proto.CompactTextString(m) }
+func (*PDeadlock) ProtoMessage()    {}
+func (*PDeadlock) Descriptor() ([]byte, []int) {
+	return fileDescriptor_29a37052f84a5404, []int{18}
+}
+
+func (m *PDeadlock) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PDeadlock.Unmarshal(m, b)
+}
+func (m *PDeadlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PDeadlock.Marshal(b, m, deterministic)
+}
+func (m *PDeadlock) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PDeadlock.Merge(m, src)
+}
+func (m *PDeadlock) XXX_Size() int {
+	return xxx_messageInfo_PDeadlock.Size(m)
+}
+func (m *PDeadlock) XXX_DiscardUnknown() {
+	xxx_messageInfo_PDeadlock.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PDeadlock proto.InternalMessageInfo
+
+func (m *PDeadlock) GetCount() int32 {
+	if m != nil {
+		return m.Count
+	}
+	return 0
+}
+
+func (m *PDeadlock) GetThreadDump() []*PThreadDump {
+	if m != nil {
+		return m.ThreadDump
+	}
+	return nil
+}
+
+type PDirectBuffer struct {
+	DirectCount          int64    `protobuf:"varint,1,opt,name=directCount,proto3" json:"directCount,omitempty"`
+	DirectMemoryUsed     int64    `protobuf:"varint,2,opt,name=directMemoryUsed,proto3" json:"directMemoryUsed,omitempty"`
+	MappedCount          int64    `protobuf:"varint,3,opt,name=mappedCount,proto3" json:"mappedCount,omitempty"`
+	MappedMemoryUsed     int64    `protobuf:"varint,4,opt,name=mappedMemoryUsed,proto3" json:"mappedMemoryUsed,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *PDirectBuffer) Reset()         { *m = PDirectBuffer{} }
+func (m *PDirectBuffer) String() string { return proto.CompactTextString(m) }
+func (*PDirectBuffer) ProtoMessage()    {}
+func (*PDirectBuffer) Descriptor() ([]byte, []int) {
+	return fileDescriptor_29a37052f84a5404, []int{19}
+}
+
+func (m *PDirectBuffer) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PDirectBuffer.Unmarshal(m, b)
+}
+func (m *PDirectBuffer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PDirectBuffer.Marshal(b, m, deterministic)
+}
+func (m *PDirectBuffer) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PDirectBuffer.Merge(m, src)
+}
+func (m *PDirectBuffer) XXX_Size() int {
+	return xxx_messageInfo_PDirectBuffer.Size(m)
+}
+func (m *PDirectBuffer) XXX_DiscardUnknown() {
+	xxx_messageInfo_PDirectBuffer.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PDirectBuffer proto.InternalMessageInfo
+
+func (m *PDirectBuffer) GetDirectCount() int64 {
+	if m != nil {
+		return m.DirectCount
+	}
+	return 0
+}
+
+func (m *PDirectBuffer) GetDirectMemoryUsed() int64 {
+	if m != nil {
+		return m.DirectMemoryUsed
+	}
+	return 0
+}
+
+func (m *PDirectBuffer) GetMappedCount() int64 {
+	if m != nil {
+		return m.MappedCount
+	}
+	return 0
+}
+
+func (m *PDirectBuffer) GetMappedMemoryUsed() int64 {
+	if m != nil {
+		return m.MappedMemoryUsed
+	}
+	return 0
+}
+
+func init() {
+	proto.RegisterEnum("v1.PJvmGcType", PJvmGcType_name, PJvmGcType_value)
+	proto.RegisterType((*PPing)(nil), "v1.PPing")
+	proto.RegisterType((*PStatMessage)(nil), "v1.PStatMessage")
+	proto.RegisterType((*PAgentInfo)(nil), "v1.PAgentInfo")
+	proto.RegisterType((*PServerMetaData)(nil), "v1.PServerMetaData")
+	proto.RegisterType((*PServiceInfo)(nil), "v1.PServiceInfo")
+	proto.RegisterType((*PJvmInfo)(nil), "v1.PJvmInfo")
+	proto.RegisterType((*PAgentStat)(nil), "v1.PAgentStat")
+	proto.RegisterType((*PAgentStatBatch)(nil), "v1.PAgentStatBatch")
+	proto.RegisterType((*PDataSource)(nil), "v1.PDataSource")
+	proto.RegisterType((*PDataSourceList)(nil), "v1.PDataSourceList")
+	proto.RegisterType((*PFileDescriptor)(nil), "v1.PFileDescriptor")
+	proto.RegisterType((*PJvmGc)(nil), "v1.PJvmGc")
+	proto.RegisterType((*PJvmGcDetailed)(nil), "v1.PJvmGcDetailed")
+	proto.RegisterType((*PCpuLoad)(nil), "v1.PCpuLoad")
+	proto.RegisterType((*PTransaction)(nil), "v1.PTransaction")
+	proto.RegisterType((*PActiveTraceHistogram)(nil), "v1.PActiveTraceHistogram")
+	proto.RegisterType((*PActiveTrace)(nil), "v1.PActiveTrace")
+	proto.RegisterType((*PResponseTime)(nil), "v1.PResponseTime")
+	proto.RegisterType((*PDeadlock)(nil), "v1.PDeadlock")
+	proto.RegisterType((*PDirectBuffer)(nil), "v1.PDirectBuffer")
+}
+
+func init() {
+	proto.RegisterFile("Stat.proto", fileDescriptor_29a37052f84a5404)
+}
+
+var fileDescriptor_29a37052f84a5404 = []byte{
+	// 1492 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x57, 0xdd, 0x6e, 0x1b, 0xc5,
+	0x17, 0xef, 0xae, 0x63, 0x3b, 0x3e, 0xce, 0x87, 0x3b, 0xe9, 0xff, 0xdf, 0x25, 0x54, 0x28, 0xac,
+	0x50, 0x15, 0xaa, 0xca, 0x6d, 0x53, 0x01, 0x15, 0x08, 0x50, 0xe2, 0x94, 0x24, 0x6d, 0xe2, 0x5a,
+	0xe3, 0xb4, 0x88, 0xab, 0x6a, 0xb2, 0x3b, 0x71, 0x36, 0xf5, 0x7e, 0x68, 0x77, 0xbc, 0x6d, 0xe0,
+	0x86, 0x2b, 0x24, 0xb8, 0xe1, 0x1d, 0xb8, 0xe5, 0x82, 0xd7, 0xe0, 0x2d, 0x78, 0x05, 0x1e, 0x01,
+	0x9d, 0x99, 0xfd, 0x98, 0x5d, 0x3b, 0xbd, 0xdb, 0xf9, 0xfd, 0xce, 0xcc, 0x39, 0x73, 0x3e, 0x67,
+	0x01, 0xc6, 0x82, 0x89, 0x7e, 0x14, 0x87, 0x22, 0x24, 0x66, 0xfa, 0x68, 0xf3, 0xc3, 0x49, 0x18,
+	0x4e, 0xa6, 0xfc, 0x81, 0x44, 0xce, 0x66, 0xe7, 0x0f, 0xb8, 0x1f, 0x89, 0x2b, 0x25, 0xb0, 0xd9,
+	0x3b, 0xbd, 0x88, 0x39, 0x73, 0xf7, 0x67, 0x7e, 0xa4, 0x10, 0xbb, 0x0d, 0xcd, 0xd1, 0xc8, 0x0b,
+	0x26, 0xf6, 0x2f, 0x06, 0xac, 0x8c, 0xf0, 0xac, 0x13, 0x9e, 0x24, 0x6c, 0xc2, 0x49, 0x1f, 0x3a,
+	0x6c, 0xc2, 0x03, 0x81, 0x98, 0x65, 0x6c, 0x19, 0xdb, 0xdd, 0x9d, 0xb5, 0x7e, 0xfa, 0xa8, 0x3f,
+	0xda, 0xcd, 0xd1, 0xc3, 0x1b, 0xb4, 0x14, 0x21, 0x5f, 0xc3, 0x5a, 0xb1, 0xd8, 0x63, 0xc2, 0xb9,
+	0xb0, 0x4c, 0xb9, 0x69, 0xa3, 0xba, 0x49, 0x52, 0x87, 0x37, 0x68, 0x4d, 0x78, 0xaf, 0x0d, 0xcd,
+	0x73, 0x8f, 0x4f, 0x5d, 0xfb, 0xd7, 0x06, 0x80, 0x12, 0x3f, 0x0a, 0xce, 0x43, 0xb2, 0x09, 0xcb,
+	0x17, 0x61, 0x22, 0x02, 0xe6, 0x73, 0x69, 0x45, 0x87, 0x16, 0x6b, 0xb2, 0x06, 0xa6, 0x17, 0x49,
+	0x35, 0x1d, 0x6a, 0x7a, 0x11, 0xb9, 0x05, 0xcd, 0x28, 0x8c, 0x45, 0x62, 0x35, 0x24, 0xa4, 0x16,
+	0x64, 0x0b, 0xba, 0x09, 0x8f, 0x53, 0xcf, 0xe1, 0xa7, 0x57, 0x11, 0xb7, 0x96, 0xb6, 0x8c, 0xed,
+	0x26, 0xd5, 0x21, 0xd2, 0x83, 0x46, 0xe4, 0xb9, 0x56, 0x53, 0x32, 0xf8, 0x49, 0x6c, 0x58, 0x91,
+	0xf6, 0xbd, 0xe2, 0x71, 0xe2, 0x85, 0x81, 0xd5, 0x92, 0x07, 0x56, 0x30, 0x72, 0x07, 0x3a, 0xa9,
+	0x9f, 0x0b, 0xb4, 0xa5, 0x40, 0x09, 0xe0, 0x09, 0x3c, 0x70, 0x4f, 0x3d, 0x9f, 0x27, 0x82, 0xf9,
+	0x91, 0xb5, 0xbc, 0x65, 0x6c, 0x37, 0x68, 0x05, 0xc3, 0x13, 0x78, 0xe0, 0xa2, 0x0f, 0x66, 0x89,
+	0xd5, 0x91, 0xda, 0x4b, 0x80, 0x7c, 0x05, 0x6b, 0x68, 0x24, 0x8f, 0x4f, 0xb8, 0x60, 0xfb, 0x4c,
+	0x30, 0x0b, 0x34, 0x87, 0x8e, 0x2b, 0x14, 0xad, 0x89, 0x92, 0xbb, 0xd0, 0xbe, 0x4c, 0x7d, 0xf4,
+	0xa0, 0xd5, 0x95, 0xbb, 0x56, 0xe4, 0xae, 0x67, 0x0a, 0xa3, 0x39, 0x89, 0x26, 0x38, 0x61, 0x20,
+	0x98, 0x17, 0xf0, 0xd8, 0x5a, 0xd9, 0x32, 0xb6, 0x97, 0x69, 0x09, 0xd8, 0x3f, 0xc1, 0x7a, 0x4d,
+	0x11, 0xf9, 0x08, 0x40, 0xa9, 0x92, 0x67, 0xab, 0x88, 0x68, 0x08, 0xc6, 0x20, 0xf5, 0x77, 0xe3,
+	0x89, 0x65, 0x6e, 0x35, 0x30, 0x06, 0x72, 0x41, 0x76, 0x8a, 0x18, 0xc8, 0x6d, 0x8d, 0xad, 0xc6,
+	0x76, 0x77, 0xa7, 0x57, 0x5c, 0x24, 0xc3, 0xa9, 0x2e, 0x64, 0x8f, 0x30, 0x21, 0xcb, 0xb5, 0x16,
+	0xc7, 0x61, 0x99, 0x0c, 0x3a, 0x94, 0xdb, 0xe6, 0x39, 0xfc, 0xd8, 0x3b, 0xcb, 0x0c, 0xd0, 0x10,
+	0xfb, 0x12, 0x96, 0x73, 0x0f, 0x10, 0x0b, 0xda, 0x69, 0x16, 0x3b, 0x43, 0x7a, 0x3e, 0x5f, 0x56,
+	0xe3, 0x6a, 0xd6, 0xe3, 0x7a, 0x17, 0x5a, 0x13, 0x47, 0x26, 0x12, 0x26, 0xd9, 0x5a, 0x56, 0x13,
+	0xcf, 0x52, 0xff, 0x40, 0xa2, 0x34, 0x63, 0xed, 0xbf, 0x96, 0xf2, 0x34, 0x96, 0xd5, 0x71, 0x07,
+	0x3a, 0xa2, 0xc8, 0x05, 0x43, 0xe6, 0x42, 0x09, 0x90, 0x6d, 0x58, 0x77, 0xc2, 0xe9, 0x94, 0x3b,
+	0xe2, 0x28, 0x10, 0x3c, 0x4e, 0xd9, 0x54, 0x2a, 0x6e, 0xd0, 0x3a, 0x4c, 0x36, 0xc1, 0x9c, 0x38,
+	0x52, 0x75, 0x77, 0x07, 0x4a, 0xd5, 0xd4, 0x9c, 0x38, 0x18, 0x73, 0x27, 0x9a, 0x1d, 0x87, 0xcc,
+	0x95, 0x49, 0x9e, 0xc7, 0x7c, 0xa0, 0x30, 0x9a, 0x93, 0x18, 0x0c, 0x11, 0xb3, 0x20, 0x61, 0x8e,
+	0xc0, 0x2b, 0x36, 0xa5, 0xac, 0x0a, 0xc6, 0x69, 0x89, 0x53, 0x5d, 0x08, 0xf7, 0xe0, 0x57, 0xca,
+	0x4f, 0x63, 0xe6, 0x70, 0x59, 0x0f, 0xf9, 0x9e, 0xdd, 0x12, 0xa7, 0xba, 0x10, 0x26, 0xb0, 0xcb,
+	0x04, 0x1b, 0x87, 0xb3, 0x18, 0xfd, 0x9f, 0x08, 0x59, 0x25, 0x79, 0x02, 0xef, 0x57, 0x28, 0x5a,
+	0x13, 0x25, 0x9f, 0xc1, 0x4a, 0xcc, 0x93, 0x28, 0x0c, 0x12, 0x8e, 0x05, 0x23, 0xeb, 0xa7, 0xbb,
+	0x73, 0x53, 0x6e, 0xa5, 0x1a, 0x41, 0x2b, 0x62, 0xe4, 0x53, 0x58, 0x76, 0x39, 0x73, 0xa7, 0xa1,
+	0xf3, 0x46, 0x56, 0x54, 0x77, 0x67, 0x55, 0x69, 0xcb, 0x40, 0x5a, 0xd0, 0x68, 0xde, 0xb9, 0x37,
+	0xe5, 0xfb, 0x3c, 0x71, 0x62, 0x2f, 0x12, 0x61, 0x5c, 0xa9, 0xaf, 0xef, 0x2a, 0x14, 0xad, 0x89,
+	0xa2, 0x79, 0xae, 0x17, 0x73, 0x47, 0xec, 0xcd, 0xce, 0xcf, 0x79, 0x9c, 0x15, 0x99, 0x32, 0x6f,
+	0x5f, 0x23, 0x68, 0x45, 0x0c, 0xbb, 0x99, 0xcf, 0x05, 0xc3, 0xbb, 0xca, 0x6a, 0xeb, 0xd0, 0x62,
+	0x6d, 0x7f, 0x0b, 0xeb, 0xb5, 0x36, 0x49, 0xee, 0x57, 0x7b, 0x70, 0x63, 0xbe, 0x07, 0x6b, 0x1d,
+	0xd8, 0xfe, 0xc7, 0x80, 0xae, 0xe6, 0x56, 0xd9, 0x1e, 0xdd, 0x2c, 0xbb, 0x4d, 0xcf, 0xc5, 0x2c,
+	0xd3, 0xba, 0xde, 0x20, 0x74, 0xb9, 0xcc, 0xb2, 0x26, 0xad, 0xc3, 0xd8, 0xbc, 0xd0, 0xa4, 0x33,
+	0x96, 0xa8, 0x5a, 0x53, 0xfd, 0xb4, 0x82, 0x61, 0xd3, 0x9c, 0xc5, 0x53, 0x99, 0x69, 0x1d, 0x8a,
+	0x9f, 0x64, 0x07, 0x6e, 0xa9, 0xf0, 0x0f, 0xc2, 0x20, 0xe0, 0x32, 0x6f, 0xc6, 0xde, 0x8f, 0x3c,
+	0xeb, 0xab, 0x0b, 0x39, 0x72, 0x1f, 0x6e, 0xfa, 0xec, 0x5d, 0x6d, 0x43, 0x4b, 0x6e, 0x98, 0x27,
+	0xec, 0x3d, 0x58, 0xaf, 0xe5, 0x0d, 0x79, 0x00, 0x50, 0x66, 0x4e, 0xe6, 0xa3, 0xf5, 0x5a, 0x82,
+	0x51, 0x4d, 0xc4, 0x7e, 0x0e, 0xeb, 0xb5, 0xe0, 0x92, 0x27, 0x70, 0x3b, 0x8c, 0x78, 0x50, 0x45,
+	0x07, 0xe1, 0x2c, 0x10, 0x59, 0xa9, 0x5e, 0x47, 0xdb, 0xff, 0x9a, 0xd0, 0x52, 0x15, 0x48, 0x6c,
+	0x58, 0x12, 0xd8, 0x16, 0x8c, 0x85, 0x6d, 0x41, 0x72, 0x78, 0xdb, 0xcb, 0xd4, 0x3f, 0xe1, 0x7e,
+	0x18, 0x5f, 0x1d, 0x72, 0x16, 0xbd, 0x4c, 0xb8, 0x9b, 0x55, 0xfa, 0x3c, 0x41, 0xee, 0x41, 0xaf,
+	0x02, 0x9e, 0xb0, 0x77, 0x32, 0x12, 0x0d, 0x3a, 0x87, 0xa3, 0xef, 0x0b, 0x6c, 0x18, 0x06, 0xc5,
+	0xe1, 0x4b, 0x52, 0x7e, 0x21, 0x47, 0x1e, 0xc2, 0x46, 0x1d, 0x47, 0x15, 0x4d, 0xb9, 0x65, 0x11,
+	0x45, 0x3e, 0x81, 0xd5, 0x4b, 0xbc, 0xd2, 0x8b, 0xa9, 0xab, 0xdc, 0xd3, 0x92, 0xb2, 0x55, 0x10,
+	0xb3, 0x27, 0x07, 0x64, 0xe9, 0xb6, 0xd5, 0xe8, 0xd3, 0x31, 0xf2, 0x24, 0x3b, 0x69, 0x9f, 0x0b,
+	0xe6, 0x4d, 0xb9, 0x9b, 0xd5, 0x37, 0x29, 0xdd, 0x96, 0x33, 0xb4, 0x2a, 0x68, 0xff, 0xd6, 0x80,
+	0xb5, 0xaa, 0x44, 0x61, 0xd6, 0x90, 0xbf, 0xd5, 0xa3, 0x56, 0x05, 0x0b, 0xb3, 0x86, 0xfc, 0xad,
+	0x34, 0xcb, 0xd4, 0xcc, 0xca, 0xb0, 0xcc, 0x8d, 0xa3, 0x30, 0x9c, 0x62, 0x1d, 0x0c, 0x98, 0x73,
+	0xc1, 0xa5, 0x1b, 0xd1, 0xed, 0x06, 0x5d, 0xc8, 0x65, 0x41, 0x45, 0x7c, 0xc8, 0xdf, 0x1e, 0xf0,
+	0xa0, 0xf0, 0xbb, 0x41, 0xe7, 0x09, 0x4d, 0xfa, 0xc5, 0xd4, 0xcd, 0xa5, 0x9b, 0x15, 0xe9, 0x92,
+	0x20, 0x5f, 0x82, 0x95, 0x81, 0xe3, 0x59, 0x9c, 0x7a, 0x69, 0x18, 0x8f, 0x23, 0xe6, 0x28, 0x9b,
+	0x5a, 0x72, 0xd3, 0xb5, 0x3c, 0xe9, 0x03, 0xc9, 0xb8, 0x11, 0x8f, 0xfd, 0x5c, 0x55, 0x5b, 0xee,
+	0x5a, 0xc0, 0x68, 0x77, 0xc7, 0x61, 0x9f, 0x14, 0x7a, 0x96, 0x2b, 0x77, 0xaf, 0x70, 0xf6, 0x08,
+	0x96, 0xf3, 0xf9, 0x82, 0xd3, 0xf7, 0x32, 0xf5, 0xb3, 0x95, 0x0c, 0x81, 0x41, 0x35, 0x04, 0xa3,
+	0x94, 0x5c, 0x25, 0x82, 0x17, 0x22, 0xa6, 0x14, 0xa9, 0x82, 0xf6, 0xdf, 0x26, 0xac, 0xe8, 0x63,
+	0x48, 0x76, 0x2d, 0xe6, 0x47, 0x53, 0xee, 0x16, 0xe1, 0xcd, 0x66, 0x63, 0x0d, 0x46, 0x67, 0x65,
+	0xd0, 0x20, 0x0c, 0x84, 0x17, 0xcc, 0x18, 0x1e, 0xa0, 0xb6, 0xa8, 0xba, 0xb9, 0x96, 0xc7, 0xb0,
+	0xcc, 0x82, 0xba, 0x1e, 0x55, 0x3c, 0xf3, 0x04, 0xf9, 0x06, 0x36, 0x0b, 0x70, 0x5e, 0x97, 0x2a,
+	0xa0, 0xf7, 0x48, 0xc8, 0x3b, 0xbd, 0xf1, 0xa2, 0x48, 0xd3, 0xd5, 0xca, 0xee, 0x54, 0x85, 0xe5,
+	0x9d, 0x14, 0x34, 0xaf, 0xa7, 0x9d, 0xdd, 0xe9, 0x1a, 0xde, 0xfe, 0xdd, 0x80, 0xff, 0xe9, 0xd3,
+	0xf9, 0xd0, 0x4b, 0x44, 0x38, 0x89, 0x99, 0xff, 0x9e, 0xc7, 0xcf, 0x43, 0xd8, 0xb8, 0xc8, 0xc5,
+	0xc6, 0xce, 0x05, 0xf7, 0x99, 0x7c, 0xeb, 0xa8, 0x39, 0xb1, 0x88, 0xc2, 0x2e, 0xa5, 0x0d, 0xfd,
+	0xdc, 0xdb, 0x8d, 0xed, 0x26, 0x9d, 0xc3, 0xed, 0x03, 0x58, 0xd1, 0x0d, 0x22, 0x5f, 0x40, 0xa7,
+	0x38, 0x32, 0xfb, 0xc7, 0xf8, 0xa0, 0xfe, 0xa6, 0x28, 0xac, 0xa6, 0xa5, 0xac, 0xfd, 0x18, 0x56,
+	0x2b, 0xaf, 0x00, 0x9c, 0x46, 0x2c, 0x9d, 0x64, 0x85, 0x8f, 0x9f, 0x88, 0xf8, 0xec, 0x5d, 0x96,
+	0x2b, 0xf8, 0x69, 0x53, 0xe8, 0x14, 0xef, 0x00, 0x7c, 0xa7, 0x3a, 0x45, 0xaf, 0x68, 0x52, 0xb5,
+	0xc0, 0x69, 0x22, 0x8a, 0x5f, 0x24, 0xf9, 0x82, 0xcc, 0xa7, 0x49, 0xf9, 0xe7, 0x44, 0x35, 0x11,
+	0xfb, 0x4f, 0x03, 0x56, 0x2b, 0x03, 0x1f, 0x9f, 0xa9, 0x6a, 0xe4, 0xeb, 0xad, 0x48, 0x87, 0xd0,
+	0x63, 0x6a, 0xa9, 0xfa, 0xab, 0x36, 0x04, 0xe6, 0x70, 0x3c, 0xcd, 0x67, 0x2a, 0xbc, 0x65, 0x1a,
+	0xeb, 0x10, 0x9e, 0xa6, 0x96, 0xda, 0x69, 0x2a, 0x71, 0xe7, 0xf0, 0x7b, 0x3f, 0x1b, 0x00, 0xe5,
+	0x50, 0x22, 0xb7, 0x61, 0xe3, 0xd9, 0xab, 0x93, 0xd7, 0x07, 0x83, 0xd7, 0xa7, 0x3f, 0x8c, 0x9e,
+	0xbe, 0x7e, 0x39, 0x7c, 0x3e, 0x7c, 0xf1, 0xfd, 0xb0, 0x77, 0x83, 0xfc, 0x1f, 0x88, 0x4e, 0x8c,
+	0x9f, 0xd2, 0xa3, 0xdd, 0xe3, 0x9e, 0x41, 0x2c, 0xb8, 0xa5, 0xe3, 0xa3, 0x5d, 0xba, 0x7b, 0x7c,
+	0xfc, 0xf4, 0xb8, 0x67, 0x92, 0x0d, 0x58, 0xd7, 0x99, 0xc1, 0xc9, 0xb8, 0xd7, 0x20, 0x04, 0xd6,
+	0x74, 0xf0, 0xe0, 0x51, 0x6f, 0x69, 0xef, 0x73, 0xf8, 0xd8, 0x09, 0xfd, 0x7e, 0xc0, 0x52, 0x1e,
+	0x3b, 0x61, 0x1c, 0xf5, 0x23, 0x2f, 0x88, 0x42, 0x2f, 0x10, 0xfd, 0x49, 0x1c, 0x39, 0x7d, 0x81,
+	0x21, 0xdf, 0xeb, 0xe0, 0x7b, 0x66, 0x84, 0x3f, 0xa8, 0x23, 0xe3, 0x0f, 0xb3, 0x31, 0x3a, 0x1a,
+	0x9e, 0xb5, 0xe4, 0xff, 0xea, 0xe3, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0xc0, 0x3e, 0x40, 0xa1,
+	0xf0, 0x0e, 0x00, 0x00,
+}
diff --git a/collector-agent/protocol/ThreadDump.pb.go b/collector-agent/protocol/ThreadDump.pb.go
new file mode 100644
index 000000000..e709cd088
--- /dev/null
+++ b/collector-agent/protocol/ThreadDump.pb.go
@@ -0,0 +1,561 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: ThreadDump.proto
+
+package v1
+
+import (
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	_ "github.com/golang/protobuf/ptypes/empty"
+	_ "github.com/golang/protobuf/ptypes/wrappers"
+	math "math"
+)
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
+
+type PThreadState int32
+
+const (
+	PThreadState_THREAD_STATE_NEW           PThreadState = 0
+	PThreadState_THREAD_STATE_RUNNABLE      PThreadState = 1
+	PThreadState_THREAD_STATE_BLOCKED       PThreadState = 2
+	PThreadState_THREAD_STATE_WAITING       PThreadState = 3
+	PThreadState_THREAD_STATE_TIMED_WAITING PThreadState = 4
+	PThreadState_THREAD_STATE_TERMINATED    PThreadState = 5
+	PThreadState_THREAD_STATE_UNKNOWN       PThreadState = 6
+)
+
+var PThreadState_name = map[int32]string{
+	0: "THREAD_STATE_NEW",
+	1: "THREAD_STATE_RUNNABLE",
+	2: "THREAD_STATE_BLOCKED",
+	3: "THREAD_STATE_WAITING",
+	4: "THREAD_STATE_TIMED_WAITING",
+	5: "THREAD_STATE_TERMINATED",
+	6: "THREAD_STATE_UNKNOWN",
+}
+
+var PThreadState_value = map[string]int32{
+	"THREAD_STATE_NEW":           0,
+	"THREAD_STATE_RUNNABLE":      1,
+	"THREAD_STATE_BLOCKED":       2,
+	"THREAD_STATE_WAITING":       3,
+	"THREAD_STATE_TIMED_WAITING": 4,
+	"THREAD_STATE_TERMINATED":    5,
+	"THREAD_STATE_UNKNOWN":       6,
+}
+
+func (x PThreadState) String() string {
+	return proto.EnumName(PThreadState_name, int32(x))
+}
+
+func (PThreadState) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_f8203157ab6c6959, []int{0}
+}
+
+type PThreadDumpType int32
+
+const (
+	PThreadDumpType_TARGET  PThreadDumpType = 0
+	PThreadDumpType_PENDING PThreadDumpType = 1
+)
+
+var PThreadDumpType_name = map[int32]string{
+	0: "TARGET",
+	1: "PENDING",
+}
+
+var PThreadDumpType_value = map[string]int32{
+	"TARGET":  0,
+	"PENDING": 1,
+}
+
+func (x PThreadDumpType) String() string {
+	return proto.EnumName(PThreadDumpType_name, int32(x))
+}
+
+func (PThreadDumpType) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_f8203157ab6c6959, []int{1}
+}
+
+type PMonitorInfo struct {
+	StackDepth           int32    `protobuf:"varint,1,opt,name=stackDepth,proto3" json:"stackDepth,omitempty"`
+	StackFrame           string   `protobuf:"bytes,2,opt,name=stackFrame,proto3" json:"stackFrame,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *PMonitorInfo) Reset()         { *m = PMonitorInfo{} }
+func (m *PMonitorInfo) String() string { return proto.CompactTextString(m) }
+func (*PMonitorInfo) ProtoMessage()    {}
+func (*PMonitorInfo) Descriptor() ([]byte, []int) {
+	return fileDescriptor_f8203157ab6c6959, []int{0}
+}
+
+func (m *PMonitorInfo) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PMonitorInfo.Unmarshal(m, b)
+}
+func (m *PMonitorInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PMonitorInfo.Marshal(b, m, deterministic)
+}
+func (m *PMonitorInfo) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PMonitorInfo.Merge(m, src)
+}
+func (m *PMonitorInfo) XXX_Size() int {
+	return xxx_messageInfo_PMonitorInfo.Size(m)
+}
+func (m *PMonitorInfo) XXX_DiscardUnknown() {
+	xxx_messageInfo_PMonitorInfo.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PMonitorInfo proto.InternalMessageInfo
+
+func (m *PMonitorInfo) GetStackDepth() int32 {
+	if m != nil {
+		return m.StackDepth
+	}
+	return 0
+}
+
+func (m *PMonitorInfo) GetStackFrame() string {
+	if m != nil {
+		return m.StackFrame
+	}
+	return ""
+}
+
+type PThreadDump struct {
+	ThreadName           string          `protobuf:"bytes,1,opt,name=threadName,proto3" json:"threadName,omitempty"`
+	ThreadId             int64           `protobuf:"varint,2,opt,name=threadId,proto3" json:"threadId,omitempty"`
+	BlockedTime          int64           `protobuf:"varint,3,opt,name=blockedTime,proto3" json:"blockedTime,omitempty"`
+	BlockedCount         int64           `protobuf:"varint,4,opt,name=blockedCount,proto3" json:"blockedCount,omitempty"`
+	WaitedTime           int64           `protobuf:"varint,5,opt,name=waitedTime,proto3" json:"waitedTime,omitempty"`
+	WaitedCount          int64           `protobuf:"varint,6,opt,name=waitedCount,proto3" json:"waitedCount,omitempty"`
+	LockName             string          `protobuf:"bytes,7,opt,name=lockName,proto3" json:"lockName,omitempty"`
+	LockOwnerId          int64           `protobuf:"varint,8,opt,name=lockOwnerId,proto3" json:"lockOwnerId,omitempty"`
+	LockOwnerName        string          `protobuf:"bytes,9,opt,name=lockOwnerName,proto3" json:"lockOwnerName,omitempty"`
+	InNative             bool            `protobuf:"varint,10,opt,name=inNative,proto3" json:"inNative,omitempty"`
+	Suspended            bool            `protobuf:"varint,11,opt,name=suspended,proto3" json:"suspended,omitempty"`
+	ThreadState          PThreadState    `protobuf:"varint,12,opt,name=threadState,proto3,enum=v1.PThreadState" json:"threadState,omitempty"`
+	StackTrace           []string        `protobuf:"bytes,13,rep,name=stackTrace,proto3" json:"stackTrace,omitempty"`
+	LockedMonitor        []*PMonitorInfo `protobuf:"bytes,14,rep,name=lockedMonitor,proto3" json:"lockedMonitor,omitempty"`
+	LockedSynchronizer   []string        `protobuf:"bytes,15,rep,name=lockedSynchronizer,proto3" json:"lockedSynchronizer,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
+	XXX_unrecognized     []byte          `json:"-"`
+	XXX_sizecache        int32           `json:"-"`
+}
+
+func (m *PThreadDump) Reset()         { *m = PThreadDump{} }
+func (m *PThreadDump) String() string { return proto.CompactTextString(m) }
+func (*PThreadDump) ProtoMessage()    {}
+func (*PThreadDump) Descriptor() ([]byte, []int) {
+	return fileDescriptor_f8203157ab6c6959, []int{1}
+}
+
+func (m *PThreadDump) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PThreadDump.Unmarshal(m, b)
+}
+func (m *PThreadDump) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PThreadDump.Marshal(b, m, deterministic)
+}
+func (m *PThreadDump) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PThreadDump.Merge(m, src)
+}
+func (m *PThreadDump) XXX_Size() int {
+	return xxx_messageInfo_PThreadDump.Size(m)
+}
+func (m *PThreadDump) XXX_DiscardUnknown() {
+	xxx_messageInfo_PThreadDump.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PThreadDump proto.InternalMessageInfo
+
+func (m *PThreadDump) GetThreadName() string {
+	if m != nil {
+		return m.ThreadName
+	}
+	return ""
+}
+
+func (m *PThreadDump) GetThreadId() int64 {
+	if m != nil {
+		return m.ThreadId
+	}
+	return 0
+}
+
+func (m *PThreadDump) GetBlockedTime() int64 {
+	if m != nil {
+		return m.BlockedTime
+	}
+	return 0
+}
+
+func (m *PThreadDump) GetBlockedCount() int64 {
+	if m != nil {
+		return m.BlockedCount
+	}
+	return 0
+}
+
+func (m *PThreadDump) GetWaitedTime() int64 {
+	if m != nil {
+		return m.WaitedTime
+	}
+	return 0
+}
+
+func (m *PThreadDump) GetWaitedCount() int64 {
+	if m != nil {
+		return m.WaitedCount
+	}
+	return 0
+}
+
+func (m *PThreadDump) GetLockName() string {
+	if m != nil {
+		return m.LockName
+	}
+	return ""
+}
+
+func (m *PThreadDump) GetLockOwnerId() int64 {
+	if m != nil {
+		return m.LockOwnerId
+	}
+	return 0
+}
+
+func (m *PThreadDump) GetLockOwnerName() string {
+	if m != nil {
+		return m.LockOwnerName
+	}
+	return ""
+}
+
+func (m *PThreadDump) GetInNative() bool {
+	if m != nil {
+		return m.InNative
+	}
+	return false
+}
+
+func (m *PThreadDump) GetSuspended() bool {
+	if m != nil {
+		return m.Suspended
+	}
+	return false
+}
+
+func (m *PThreadDump) GetThreadState() PThreadState {
+	if m != nil {
+		return m.ThreadState
+	}
+	return PThreadState_THREAD_STATE_NEW
+}
+
+func (m *PThreadDump) GetStackTrace() []string {
+	if m != nil {
+		return m.StackTrace
+	}
+	return nil
+}
+
+func (m *PThreadDump) GetLockedMonitor() []*PMonitorInfo {
+	if m != nil {
+		return m.LockedMonitor
+	}
+	return nil
+}
+
+func (m *PThreadDump) GetLockedSynchronizer() []string {
+	if m != nil {
+		return m.LockedSynchronizer
+	}
+	return nil
+}
+
+type PThreadLightDump struct {
+	ThreadName           string       `protobuf:"bytes,1,opt,name=threadName,proto3" json:"threadName,omitempty"`
+	ThreadId             int64        `protobuf:"varint,2,opt,name=threadId,proto3" json:"threadId,omitempty"`
+	ThreadState          PThreadState `protobuf:"varint,3,opt,name=threadState,proto3,enum=v1.PThreadState" json:"threadState,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
+	XXX_unrecognized     []byte       `json:"-"`
+	XXX_sizecache        int32        `json:"-"`
+}
+
+func (m *PThreadLightDump) Reset()         { *m = PThreadLightDump{} }
+func (m *PThreadLightDump) String() string { return proto.CompactTextString(m) }
+func (*PThreadLightDump) ProtoMessage()    {}
+func (*PThreadLightDump) Descriptor() ([]byte, []int) {
+	return fileDescriptor_f8203157ab6c6959, []int{2}
+}
+
+func (m *PThreadLightDump) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PThreadLightDump.Unmarshal(m, b)
+}
+func (m *PThreadLightDump) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PThreadLightDump.Marshal(b, m, deterministic)
+}
+func (m *PThreadLightDump) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PThreadLightDump.Merge(m, src)
+}
+func (m *PThreadLightDump) XXX_Size() int {
+	return xxx_messageInfo_PThreadLightDump.Size(m)
+}
+func (m *PThreadLightDump) XXX_DiscardUnknown() {
+	xxx_messageInfo_PThreadLightDump.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PThreadLightDump proto.InternalMessageInfo
+
+func (m *PThreadLightDump) GetThreadName() string {
+	if m != nil {
+		return m.ThreadName
+	}
+	return ""
+}
+
+func (m *PThreadLightDump) GetThreadId() int64 {
+	if m != nil {
+		return m.ThreadId
+	}
+	return 0
+}
+
+func (m *PThreadLightDump) GetThreadState() PThreadState {
+	if m != nil {
+		return m.ThreadState
+	}
+	return PThreadState_THREAD_STATE_NEW
+}
+
+type PActiveThreadDump struct {
+	StartTime            int64        `protobuf:"varint,1,opt,name=startTime,proto3" json:"startTime,omitempty"`
+	LocalTraceId         int64        `protobuf:"varint,2,opt,name=localTraceId,proto3" json:"localTraceId,omitempty"`
+	ThreadDump           *PThreadDump `protobuf:"bytes,3,opt,name=threadDump,proto3" json:"threadDump,omitempty"`
+	Sampled              bool         `protobuf:"varint,4,opt,name=sampled,proto3" json:"sampled,omitempty"`
+	TransactionId        string       `protobuf:"bytes,5,opt,name=transactionId,proto3" json:"transactionId,omitempty"`
+	EntryPoint           string       `protobuf:"bytes,6,opt,name=entryPoint,proto3" json:"entryPoint,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
+	XXX_unrecognized     []byte       `json:"-"`
+	XXX_sizecache        int32        `json:"-"`
+}
+
+func (m *PActiveThreadDump) Reset()         { *m = PActiveThreadDump{} }
+func (m *PActiveThreadDump) String() string { return proto.CompactTextString(m) }
+func (*PActiveThreadDump) ProtoMessage()    {}
+func (*PActiveThreadDump) Descriptor() ([]byte, []int) {
+	return fileDescriptor_f8203157ab6c6959, []int{3}
+}
+
+func (m *PActiveThreadDump) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PActiveThreadDump.Unmarshal(m, b)
+}
+func (m *PActiveThreadDump) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PActiveThreadDump.Marshal(b, m, deterministic)
+}
+func (m *PActiveThreadDump) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PActiveThreadDump.Merge(m, src)
+}
+func (m *PActiveThreadDump) XXX_Size() int {
+	return xxx_messageInfo_PActiveThreadDump.Size(m)
+}
+func (m *PActiveThreadDump) XXX_DiscardUnknown() {
+	xxx_messageInfo_PActiveThreadDump.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PActiveThreadDump proto.InternalMessageInfo
+
+func (m *PActiveThreadDump) GetStartTime() int64 {
+	if m != nil {
+		return m.StartTime
+	}
+	return 0
+}
+
+func (m *PActiveThreadDump) GetLocalTraceId() int64 {
+	if m != nil {
+		return m.LocalTraceId
+	}
+	return 0
+}
+
+func (m *PActiveThreadDump) GetThreadDump() *PThreadDump {
+	if m != nil {
+		return m.ThreadDump
+	}
+	return nil
+}
+
+func (m *PActiveThreadDump) GetSampled() bool {
+	if m != nil {
+		return m.Sampled
+	}
+	return false
+}
+
+func (m *PActiveThreadDump) GetTransactionId() string {
+	if m != nil {
+		return m.TransactionId
+	}
+	return ""
+}
+
+func (m *PActiveThreadDump) GetEntryPoint() string {
+	if m != nil {
+		return m.EntryPoint
+	}
+	return ""
+}
+
+type PActiveThreadLightDump struct {
+	StartTime            int64             `protobuf:"varint,1,opt,name=startTime,proto3" json:"startTime,omitempty"`
+	LocalTraceId         int64             `protobuf:"varint,2,opt,name=localTraceId,proto3" json:"localTraceId,omitempty"`
+	ThreadDump           *PThreadLightDump `protobuf:"bytes,3,opt,name=threadDump,proto3" json:"threadDump,omitempty"`
+	Sampled              bool              `protobuf:"varint,4,opt,name=sampled,proto3" json:"sampled,omitempty"`
+	TransactionId        string            `protobuf:"bytes,5,opt,name=transactionId,proto3" json:"transactionId,omitempty"`
+	EntryPoint           string            `protobuf:"bytes,6,opt,name=entryPoint,proto3" json:"entryPoint,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
+	XXX_unrecognized     []byte            `json:"-"`
+	XXX_sizecache        int32             `json:"-"`
+}
+
+func (m *PActiveThreadLightDump) Reset()         { *m = PActiveThreadLightDump{} }
+func (m *PActiveThreadLightDump) String() string { return proto.CompactTextString(m) }
+func (*PActiveThreadLightDump) ProtoMessage()    {}
+func (*PActiveThreadLightDump) Descriptor() ([]byte, []int) {
+	return fileDescriptor_f8203157ab6c6959, []int{4}
+}
+
+func (m *PActiveThreadLightDump) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PActiveThreadLightDump.Unmarshal(m, b)
+}
+func (m *PActiveThreadLightDump) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PActiveThreadLightDump.Marshal(b, m, deterministic)
+}
+func (m *PActiveThreadLightDump) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PActiveThreadLightDump.Merge(m, src)
+}
+func (m *PActiveThreadLightDump) XXX_Size() int {
+	return xxx_messageInfo_PActiveThreadLightDump.Size(m)
+}
+func (m *PActiveThreadLightDump) XXX_DiscardUnknown() {
+	xxx_messageInfo_PActiveThreadLightDump.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PActiveThreadLightDump proto.InternalMessageInfo
+
+func (m *PActiveThreadLightDump) GetStartTime() int64 {
+	if m != nil {
+		return m.StartTime
+	}
+	return 0
+}
+
+func (m *PActiveThreadLightDump) GetLocalTraceId() int64 {
+	if m != nil {
+		return m.LocalTraceId
+	}
+	return 0
+}
+
+func (m *PActiveThreadLightDump) GetThreadDump() *PThreadLightDump {
+	if m != nil {
+		return m.ThreadDump
+	}
+	return nil
+}
+
+func (m *PActiveThreadLightDump) GetSampled() bool {
+	if m != nil {
+		return m.Sampled
+	}
+	return false
+}
+
+func (m *PActiveThreadLightDump) GetTransactionId() string {
+	if m != nil {
+		return m.TransactionId
+	}
+	return ""
+}
+
+func (m *PActiveThreadLightDump) GetEntryPoint() string {
+	if m != nil {
+		return m.EntryPoint
+	}
+	return ""
+}
+
+func init() {
+	proto.RegisterEnum("v1.PThreadState", PThreadState_name, PThreadState_value)
+	proto.RegisterEnum("v1.PThreadDumpType", PThreadDumpType_name, PThreadDumpType_value)
+	proto.RegisterType((*PMonitorInfo)(nil), "v1.PMonitorInfo")
+	proto.RegisterType((*PThreadDump)(nil), "v1.PThreadDump")
+	proto.RegisterType((*PThreadLightDump)(nil), "v1.PThreadLightDump")
+	proto.RegisterType((*PActiveThreadDump)(nil), "v1.PActiveThreadDump")
+	proto.RegisterType((*PActiveThreadLightDump)(nil), "v1.PActiveThreadLightDump")
+}
+
+func init() {
+	proto.RegisterFile("ThreadDump.proto", fileDescriptor_f8203157ab6c6959)
+}
+
+var fileDescriptor_f8203157ab6c6959 = []byte{
+	// 694 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xcd, 0x4e, 0xdb, 0x4c,
+	0x14, 0xc5, 0x04, 0x42, 0x72, 0x13, 0x88, 0xbf, 0x11, 0x5f, 0xeb, 0x86, 0x0a, 0xa5, 0x51, 0x17,
+	0x11, 0x0b, 0x23, 0x68, 0xc5, 0x3e, 0x21, 0x2e, 0xb5, 0x00, 0x13, 0x0d, 0x46, 0x2c, 0xd1, 0x60,
+	0x0f, 0x89, 0x45, 0xe2, 0xb1, 0x26, 0x93, 0xa0, 0x74, 0xd9, 0xd7, 0xe9, 0x9b, 0xf4, 0x41, 0xba,
+	0xee, 0x23, 0x54, 0x33, 0x36, 0xce, 0x18, 0x58, 0x54, 0x42, 0xea, 0xce, 0xf7, 0x9c, 0xeb, 0x73,
+	0xff, 0x8e, 0x34, 0x60, 0xfa, 0x23, 0x4e, 0x49, 0xd8, 0x9f, 0x4d, 0x12, 0x3b, 0xe1, 0x4c, 0x30,
+	0xb4, 0x3a, 0x3f, 0x68, 0xee, 0x0c, 0x19, 0x1b, 0x8e, 0xe9, 0xbe, 0x42, 0x6e, 0x67, 0x77, 0xfb,
+	0x74, 0x92, 0x88, 0x45, 0x9a, 0xd0, 0xdc, 0x7d, 0x4a, 0x3e, 0x70, 0x92, 0x24, 0x94, 0x4f, 0x53,
+	0xbe, 0xed, 0x41, 0x7d, 0x70, 0xce, 0xe2, 0x48, 0x30, 0xee, 0xc6, 0x77, 0x0c, 0xed, 0x02, 0x4c,
+	0x05, 0x09, 0xee, 0xfb, 0x34, 0x11, 0x23, 0xcb, 0x68, 0x19, 0x9d, 0x75, 0xac, 0x21, 0x39, 0xff,
+	0x85, 0x93, 0x09, 0xb5, 0x56, 0x5b, 0x46, 0xa7, 0x8a, 0x35, 0xa4, 0xfd, 0x63, 0x0d, 0x6a, 0x83,
+	0x65, 0x9b, 0x32, 0x5f, 0xa8, 0xc8, 0x93, 0xf9, 0x46, 0x9a, 0xbf, 0x44, 0x50, 0x13, 0x2a, 0x69,
+	0xe4, 0x86, 0x4a, 0xad, 0x84, 0xf3, 0x18, 0xb5, 0xa0, 0x76, 0x3b, 0x66, 0xc1, 0x3d, 0x0d, 0xfd,
+	0x68, 0x42, 0xad, 0x92, 0xa2, 0x75, 0x08, 0xb5, 0xa1, 0x9e, 0x85, 0xc7, 0x6c, 0x16, 0x0b, 0x6b,
+	0x4d, 0xa5, 0x14, 0x30, 0xd9, 0xc1, 0x03, 0x89, 0x44, 0x26, 0xb2, 0xae, 0x32, 0x34, 0x44, 0x56,
+	0x49, 0xa3, 0x54, 0xa2, 0x9c, 0x56, 0xd1, 0x20, 0xd9, 0xa3, 0x14, 0x54, 0x13, 0x6c, 0xa8, 0x09,
+	0xf2, 0x58, 0xfe, 0x2d, 0xbf, 0x2f, 0x1e, 0x62, 0xca, 0xdd, 0xd0, 0xaa, 0xa4, 0x7f, 0x6b, 0x10,
+	0xfa, 0x08, 0x9b, 0x79, 0xa8, 0x24, 0xaa, 0x4a, 0xa2, 0x08, 0xca, 0x1a, 0x51, 0xec, 0x11, 0x11,
+	0xcd, 0xa9, 0x05, 0x2d, 0xa3, 0x53, 0xc1, 0x79, 0x8c, 0xde, 0x43, 0x75, 0x3a, 0x9b, 0x26, 0x34,
+	0x0e, 0x69, 0x68, 0xd5, 0x14, 0xb9, 0x04, 0xd0, 0x21, 0xd4, 0xd2, 0x8d, 0x5d, 0x0a, 0x22, 0xa8,
+	0x55, 0x6f, 0x19, 0x9d, 0xad, 0x43, 0xd3, 0x9e, 0x1f, 0xd8, 0xd9, 0x1d, 0x14, 0x8e, 0xf5, 0xa4,
+	0xfc, 0x8a, 0x3e, 0x27, 0x01, 0xb5, 0x36, 0x5b, 0xa5, 0xfc, 0x8a, 0x0a, 0x41, 0x47, 0x69, 0xcf,
+	0x34, 0xcc, 0xac, 0x61, 0x6d, 0xb5, 0x4a, 0x9d, 0x5a, 0xa6, 0xaa, 0xd9, 0x05, 0x17, 0xd3, 0x90,
+	0x0d, 0x28, 0x05, 0x2e, 0x17, 0x71, 0x30, 0xe2, 0x2c, 0x8e, 0xbe, 0x51, 0x6e, 0x35, 0x94, 0xfe,
+	0x0b, 0x4c, 0xfb, 0xbb, 0x01, 0x66, 0xd6, 0xe5, 0x59, 0x34, 0x1c, 0x89, 0x57, 0x5b, 0xe6, 0xc9,
+	0x32, 0x4a, 0x7f, 0xb1, 0x8c, 0xf6, 0x2f, 0x03, 0xfe, 0x1b, 0x74, 0x03, 0xb9, 0x6a, 0xcd, 0xb8,
+	0x72, 0xe9, 0x82, 0x70, 0xa1, 0x5c, 0x63, 0xa8, 0x32, 0x4b, 0x40, 0x1a, 0x6f, 0xcc, 0x02, 0x32,
+	0x56, 0xeb, 0xca, 0xfb, 0x28, 0x60, 0x68, 0xff, 0x71, 0x0e, 0xa9, 0xa7, 0x5a, 0xa9, 0x1d, 0x36,
+	0xb4, 0x56, 0x24, 0x8c, 0xb5, 0x14, 0x64, 0xc1, 0xc6, 0x94, 0x4c, 0x92, 0x31, 0x0d, 0x95, 0x91,
+	0x2b, 0xf8, 0x31, 0x94, 0x1e, 0x12, 0x9c, 0xc4, 0x53, 0x12, 0x88, 0x88, 0xc5, 0x6e, 0xa8, 0x6c,
+	0x5c, 0xc5, 0x45, 0x50, 0x2e, 0x8e, 0xc6, 0x82, 0x2f, 0x06, 0x2c, 0xca, 0x8c, 0x5c, 0xc5, 0x1a,
+	0xd2, 0xfe, 0x6d, 0xc0, 0x9b, 0xc2, 0xa0, 0xcb, 0x9d, 0xbf, 0x7e, 0xda, 0xcf, 0x2f, 0x4c, 0xbb,
+	0xad, 0x4d, 0x9b, 0xd7, 0xfa, 0x97, 0x23, 0xef, 0xfd, 0x34, 0xa0, 0xae, 0x5f, 0x1e, 0x6d, 0x83,
+	0xe9, 0x7f, 0xc5, 0x4e, 0xb7, 0x7f, 0x73, 0xe9, 0x77, 0x7d, 0xe7, 0xc6, 0x73, 0xae, 0xcd, 0x15,
+	0xf4, 0x0e, 0xfe, 0x2f, 0xa0, 0xf8, 0xca, 0xf3, 0xba, 0xbd, 0x33, 0xc7, 0x34, 0x90, 0x05, 0xdb,
+	0x05, 0xaa, 0x77, 0x76, 0x71, 0x7c, 0xea, 0xf4, 0xcd, 0xd5, 0x67, 0xcc, 0x75, 0xd7, 0xf5, 0x5d,
+	0xef, 0xc4, 0x2c, 0xa1, 0x5d, 0x68, 0x16, 0x18, 0xdf, 0x3d, 0x77, 0xfa, 0x39, 0xbf, 0x86, 0x76,
+	0xe0, 0x6d, 0x91, 0x77, 0xf0, 0xb9, 0xeb, 0x75, 0x7d, 0xa7, 0x6f, 0xae, 0x3f, 0x93, 0xbd, 0xf2,
+	0x4e, 0xbd, 0x8b, 0x6b, 0xcf, 0x2c, 0xef, 0xed, 0x41, 0x43, 0xb3, 0x8e, 0xbf, 0x48, 0x28, 0x02,
+	0x28, 0xfb, 0x5d, 0x7c, 0xe2, 0xf8, 0xe6, 0x0a, 0xaa, 0xc1, 0xc6, 0xc0, 0xf1, 0xfa, 0xb2, 0x84,
+	0xd1, 0x3b, 0x82, 0x0f, 0x01, 0x9b, 0xd8, 0x31, 0x99, 0x53, 0x1e, 0x30, 0x9e, 0xd8, 0x49, 0x14,
+	0x27, 0x72, 0x25, 0xf6, 0x90, 0x27, 0x81, 0x2d, 0xe4, 0xd5, 0x7a, 0x8d, 0xa5, 0xda, 0x40, 0xbe,
+	0x06, 0x03, 0xe3, 0xb6, 0xac, 0x9e, 0x85, 0x4f, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xe8, 0xdd,
+	0xd8, 0x24, 0x6b, 0x06, 0x00, 0x00,
+}
diff --git a/collector-agent/protocol/grpc/.gitignore b/collector-agent/protocol/grpc/.gitignore
new file mode 100644
index 000000000..472fecd96
--- /dev/null
+++ b/collector-agent/protocol/grpc/.gitignore
@@ -0,0 +1,1 @@
+*.go
\ No newline at end of file
diff --git a/collector-agent/Proto/grpc/Annotation.proto b/collector-agent/protocol/grpc/Annotation.proto
similarity index 99%
rename from collector-agent/Proto/grpc/Annotation.proto
rename to collector-agent/protocol/grpc/Annotation.proto
index 55167c6da..4a05de6d3 100644
--- a/collector-agent/Proto/grpc/Annotation.proto
+++ b/collector-agent/protocol/grpc/Annotation.proto
@@ -8,6 +8,8 @@ option java_package = "com.navercorp.pinpoint.grpc.trace";
 option java_outer_classname = "AnnotationProto";
 //option objc_class_prefix = "PIN";
 
+package v1;
+
 message PIntStringValue {
     int32 intValue = 1;
     google.protobuf.StringValue stringValue = 2;
diff --git a/collector-agent/Proto/grpc/Cmd.proto b/collector-agent/protocol/grpc/Cmd.proto
similarity index 100%
rename from collector-agent/Proto/grpc/Cmd.proto
rename to collector-agent/protocol/grpc/Cmd.proto
diff --git a/collector-agent/Proto/grpc/Service.proto b/collector-agent/protocol/grpc/Service.proto
similarity index 100%
rename from collector-agent/Proto/grpc/Service.proto
rename to collector-agent/protocol/grpc/Service.proto
diff --git a/collector-agent/Proto/grpc/Span.proto b/collector-agent/protocol/grpc/Span.proto
similarity index 99%
rename from collector-agent/Proto/grpc/Span.proto
rename to collector-agent/protocol/grpc/Span.proto
index 49887e70e..f9a8c8f4d 100644
--- a/collector-agent/Proto/grpc/Span.proto
+++ b/collector-agent/protocol/grpc/Span.proto
@@ -116,7 +116,7 @@ message PSpanChunk {
     repeated PSpanEvent spanEvent = 5;
 
     int32 applicationServiceType = 6;
-    // start time
+
     int64 keyTime = 7;
 
     PLocalAsyncId localAsyncId = 8;
diff --git a/collector-agent/Proto/grpc/Stat.proto b/collector-agent/protocol/grpc/Stat.proto
similarity index 100%
rename from collector-agent/Proto/grpc/Stat.proto
rename to collector-agent/protocol/grpc/Stat.proto
diff --git a/collector-agent/Proto/grpc/ThreadDump.proto b/collector-agent/protocol/grpc/ThreadDump.proto
similarity index 100%
rename from collector-agent/Proto/grpc/ThreadDump.proto
rename to collector-agent/protocol/grpc/ThreadDump.proto
diff --git a/collector-agent/readme.md b/collector-agent/readme.md
new file mode 100644
index 000000000..1becfe361
--- /dev/null
+++ b/collector-agent/readme.md
@@ -0,0 +1,29 @@
+## Run
+
+> Set 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
+
+--------------------------------------------
+PP_COLLECTOR_AGENT_SPAN_IP=dev-pinpoint
+PP_COLLECTOR_AGENT_SPAN_PORT=9993
+PP_COLLECTOR_AGENT_AGENT_IP=dev-pinpoint
+PP_COLLECTOR_AGENT_AGENT_PORT=9991
+PP_COLLECTOR_AGENT_STAT_IP=dev-pinpoint
+PP_COLLECTOR_AGENT_STAT_PORT=9992
+PP_COLLECTOR_AGENT_ISDOCKER=false
+PP_LOG_DIR=/tmp/
+PP_Log_Level=INFO
+PP_ADDRESS=0.0.0.0@9999
+
+```
diff --git a/collector-agent/requirements.txt b/collector-agent/requirements.txt
deleted file mode 100644
index 74e47ddba..000000000
--- a/collector-agent/requirements.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-google
-grpcio
-psutil
-thrift
-grpcio-tools
-gevent
-nose
\ No newline at end of file
diff --git a/collector-agent/run.py b/collector-agent/run.py
deleted file mode 100644
index 3ec823e46..000000000
--- a/collector-agent/run.py
+++ /dev/null
@@ -1,47 +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.
-# ------------------------------------------------------------------------------
-
-# !/usr/bin/env python
-# -*- coding: UTF-8 -*-
-import os
-import sys
-
-proto_class = os.getcwd()+'/Proto/grpc'
-sys.path.append(proto_class)
-
-from Common import TCLogger
-from PinpointAgent import start_pinpoint_agent,stop_pinpoint_agent
-
-class Server(object):
-    def __init__(self):
-        start_pinpoint_agent()
-
-    def run(self):
-        while True:
-            try:
-                import gevent
-                gevent.sleep(10)
-            except:
-                break
-        stop_pinpoint_agent()
-        TCLogger.warning("collector agent exit with SIGNAL")
-
-if __name__ == '__main__':
-    server = Server()
-    server.run()
diff --git a/collector-agent/server.go b/collector-agent/server.go
new file mode 100644
index 000000000..ab2533059
--- /dev/null
+++ b/collector-agent/server.go
@@ -0,0 +1,23 @@
+package main
+
+import (
+	"CollectorAgent/server"
+	"net/http"
+	_ "net/http/pprof"
+	"runtime"
+
+	log "github.com/sirupsen/logrus"
+)
+
+func main() {
+	server.InitServerConfig()
+	spanServer := server.SpanServer{}
+	go func() {
+		log.Println(http.ListenAndServe("0.0.0.0:8081", nil))
+		runtime.SetBlockProfileRate(1)
+	}()
+
+	if _, err := spanServer.Run(); err != nil {
+		log.Warn("SpanServer is exit ....")
+	}
+}
diff --git a/collector-agent/server/ServerEnv.go b/collector-agent/server/ServerEnv.go
new file mode 100644
index 000000000..28dc2d747
--- /dev/null
+++ b/collector-agent/server/ServerEnv.go
@@ -0,0 +1,106 @@
+package server
+
+import (
+	"CollectorAgent/common"
+	"fmt"
+	"os"
+	"path"
+	"strconv"
+	"strings"
+
+	log "github.com/sirupsen/logrus"
+	prefixed "github.com/x-cray/logrus-prefixed-formatter"
+	"gopkg.in/natefinch/lumberjack.v2"
+)
+
+/**
+# pinpoint collector span ip
+PP_COLLECTOR_AGENT_SPAN_IP=dev-pinpoint
+# pinpoint collector span port
+PP_COLLECTOR_AGENT_SPAN_PORT=9993
+# pinpoint collector agent IP
+PP_COLLECTOR_AGENT_AGENT_IP=dev-pinpoint
+# pinpoint collector agent port
+PP_COLLECTOR_AGENT_AGENT_PORT=9991
+# pinpoint collector stat ip
+PP_COLLECTOR_AGENT_STAT_IP=dev-pinpoint
+# pinpoint collector stat port
+PP_COLLECTOR_AGENT_STAT_PORT=9992
+# mark all agent a docker
+PP_COLLECTOR_AGENT_ISDOCKER=true
+PP_LOG_DIR=/tmp/
+PP_Log_Level=ERROR
+# binds on
+PP_ADDRESS=0.0.0.0@9999
+*/
+
+func InitServerConfig() {
+	config := common.GetConfig()
+
+	spanIp := os.Getenv("PP_COLLECTOR_AGENT_SPAN_IP")
+	spanPort := os.Getenv("PP_COLLECTOR_AGENT_SPAN_PORT")
+	config.SpanAddress = spanIp + ":" + spanPort
+	if config.SpanAddress == ":" {
+		panic("Invalid SpanAddress")
+	}
+
+	statIp := os.Getenv("PP_COLLECTOR_AGENT_STAT_IP")
+	statPort := os.Getenv("PP_COLLECTOR_AGENT_STAT_PORT")
+	config.StatAddress = statIp + ":" + statPort
+
+	if config.StatAddress == ":" {
+		panic("Invalid StatAddress")
+	}
+
+	agentIp := os.Getenv("PP_COLLECTOR_AGENT_AGENT_IP")
+	agentPort := os.Getenv("PP_COLLECTOR_AGENT_AGENT_PORT")
+	config.AgentAddress = agentIp + ":" + agentPort
+	if config.AgentAddress == ":" {
+		panic("Invalid AgentAddress")
+	}
+
+	inDocker := os.Getenv("PP_COLLECTOR_AGENT_ISDOCKER")
+	if b, err := strconv.ParseBool(inDocker); err == nil {
+		config.Container = b
+	} else {
+		config.Container = false
+	}
+
+	logLevel := os.Getenv("PP_Log_Level")
+	config.LoggerLevel = logLevel
+	logDir := os.Getenv("PP_LOG_DIR")
+	config.LoggerDir = logDir
+	address := os.Getenv("PP_ADDRESS")
+	if len(address) == 0 {
+		panic("PP_ADDRESS invalid")
+	}
+	config.Address = strings.Replace(address, "@", ":", 1)
+	config.SocketType = "tcp"
+	// initialize logger
+	if level, err := log.ParseLevel(config.LoggerLevel); err == nil {
+		log.SetLevel(level)
+	}
+
+	if _, err := os.Stat(config.LoggerDir); os.IsNotExist(err) {
+		msg := fmt.Sprintf("PP_LOG_DIR: %s not exist", config.LoggerDir)
+		panic(msg)
+	}
+
+	logFile := path.Join(config.LoggerDir, "collector.log")
+	// bind logger on the file
+	logger := &lumberjack.Logger{
+		Filename:   logFile,
+		MaxSize:    500,
+		MaxBackups: 500,
+	}
+
+	log.SetOutput(logger)
+	log.SetFormatter(&prefixed.TextFormatter{
+		DisableColors:   true,
+		TimestampFormat: "2006-01-02 15:04:05.999999999",
+		FullTimestamp:   true,
+		ForceFormatting: true,
+	})
+
+	log.Info(config)
+}
diff --git a/collector-agent/server/SpanServer.go b/collector-agent/server/SpanServer.go
new file mode 100644
index 000000000..584bcd25b
--- /dev/null
+++ b/collector-agent/server/SpanServer.go
@@ -0,0 +1,262 @@
+package server
+
+import (
+	"CollectorAgent/agent"
+	"CollectorAgent/common"
+	"encoding/binary"
+	"encoding/json"
+	"errors"
+	"fmt"
+	"net"
+	"os"
+	"os/signal"
+	"strconv"
+	"sync"
+	"syscall"
+	"time"
+
+	log "github.com/sirupsen/logrus"
+)
+
+type SpanServer struct {
+	clientCount int
+	listener    net.Listener
+	quit        chan bool
+	wg          sync.WaitGroup
+	agentRouter agent.I_PacketRouter
+}
+
+type ServerInfo struct {
+	AppId     string `json:"appid"`
+	AppName   string `json:"appname"`
+	StartTime string `json:"time"`
+}
+
+var info = ServerInfo{
+	AppId:     "no",
+	AppName:   "no",
+	StartTime: strconv.FormatInt(time.Now().Unix(), 10),
+}
+
+const CLIENT_HEADER_SIZE = 8
+
+const CLIENT_MAX_PACKET_SIZE = 4096*100 + CLIENT_HEADER_SIZE
+
+func (server *SpanServer) init() {
+	server.quit = make(chan bool)
+	manager := &agent.AgentRouter{PingId: 1,
+		AgentMap: make(map[string]*agent.GrpcAgent),
+		Quit:     server.quit,
+		WG:       &server.wg,
+	}
+
+	server.agentRouter = manager
+}
+
+func (server *SpanServer) Run() (code int, err error) {
+	server.init()
+
+	go server.startListen()
+	sig := make(chan os.Signal, 1)
+
+	signal.Notify(sig,
+		syscall.SIGHUP,
+		syscall.SIGINT,
+		syscall.SIGTERM,
+		syscall.SIGQUIT)
+
+	config := common.GetConfig()
+
+	defer func() {
+		close(server.quit)
+		if err := server.listener.Close(); err != nil {
+			log.Warnf("close listener socket met:%s", err)
+		}
+		server.wg.Wait()
+	}()
+
+	for {
+		select {
+		case sig := <-sig:
+			log.Warnf("catch signal %s", sig)
+			return 0, errors.New(fmt.Sprintf("SpanServer exit with signal %s", sig))
+		case <-time.After(config.AgentFreeOnlineSurvivalTimeSec * time.Second):
+			server.agentRouter.Clean()
+		}
+	}
+}
+
+func (server *SpanServer) parseInComePacket(size, packetType uint32, body []byte) (err error) {
+	log.Debugf("size: %d  packetType: %d body:%s ", size, packetType, string(body[:]))
+
+	data := make([]byte, size)
+	copy(data, body)
+	rawPacket := agent.RawPacket{Type: packetType, RawData: data}
+
+	err = server.agentRouter.DispatchPacket(&rawPacket)
+	if err != nil {
+		log.Warnf("dispather packet with an exception: %s", err)
+		return err
+	}
+
+	return nil
+}
+
+func (server *SpanServer) startListen() {
+	defer server.wg.Done()
+	server.wg.Add(1)
+	server.quit = make(chan bool)
+	config := common.GetConfig()
+	log.Debug("listen: ", config.SocketType, "address: ", config.Address)
+	listener, err := net.Listen(config.SocketType, config.Address)
+	if err != nil {
+		log.Errorf("bind %s:%s failed with %v", config.SocketType, config.Address, err.Error())
+		panic(err)
+	}
+	server.listener = listener
+
+	for {
+		conn, err := listener.Accept()
+		if err != nil {
+			select {
+			case <-server.quit:
+				return
+			default:
+				log.Errorf("accepter failed with %s", err.Error())
+			}
+		}
+		go server.handleClient(conn)
+	}
+
+}
+
+func ParseHeader(buffer []byte) (packetLen, packetType uint32) {
+
+	packetType = binary.BigEndian.Uint32(buffer[0:4])
+	packetLen = binary.BigEndian.Uint32(buffer[4:8])
+	return packetLen, packetType
+}
+
+func (server *SpanServer) searchPacket(buffer []byte, start int32, total int32, packetLen, packetType *int32, body *[]byte) (token, needs int32) {
+	// fetch header
+	if total < CLIENT_HEADER_SIZE {
+		return 0, CLIENT_HEADER_SIZE - total
+	}
+	bodyLen, Type := ParseHeader(buffer[start : start+total])
+	// fetch packet
+	if total < int32(bodyLen+CLIENT_HEADER_SIZE) {
+		return 0, int32(bodyLen) + CLIENT_HEADER_SIZE - total
+	}
+	*packetType = int32(Type)
+	*packetLen = int32(bodyLen)
+	*body = buffer[start+CLIENT_HEADER_SIZE : start+CLIENT_HEADER_SIZE+int32(bodyLen)]
+
+	return int32(bodyLen) + CLIENT_HEADER_SIZE, 0
+}
+
+func (server *SpanServer) handleClient(con net.Conn) {
+	defer func() {
+		if err := con.Close(); err != nil {
+			log.Warnf("close client met :%s", err)
+		}
+	}()
+
+	log.Infof("client:%s is online", con.RemoteAddr())
+	handshake, err := json.Marshal(&info)
+	if err != nil {
+		log.Warnf("generate handshake failed.reason:%s", err)
+		return
+	}
+	log.Infof("send handshake msg:%s", handshake)
+	msgSize := len(handshake)
+
+	buffer := make([]byte, 8)
+	binary.BigEndian.PutUint32(buffer[0:4], (0))
+	binary.BigEndian.PutUint32(buffer[4:8], (uint32(msgSize)))
+
+	buffer = append(buffer, handshake...)
+
+	// send handshake message
+	for offset := 0; offset < msgSize; {
+
+		size, err := con.Write(buffer[offset:])
+		if err != nil {
+			log.Warnf("client:%s channel error:%s", con.RemoteAddr(), err)
+		}
+		offset += size
+	}
+
+	// fetch data
+	clientInBuf := make([]byte, CLIENT_MAX_PACKET_SIZE)
+	inOffset := int32(0)
+	packetOffset := int32(0)
+
+	for {
+
+		size, err := con.Read(clientInBuf[inOffset:])
+
+		if err != nil {
+			log.Warnf("client:%s read error:%s", con.RemoteAddr(), err)
+			break
+		}
+
+		if size > 0 {
+			inOffset += int32(size)
+		}
+
+		if size == 0 {
+			log.Infof("Connection:%s is closed by client. Reason: size:%d in_offset:%d packet_offset:%d", con.RemoteAddr(), size, inOffset, packetOffset)
+			break
+		}
+
+	ParseAgin:
+
+		var body []byte = nil
+		var packetLen, packetType int32
+
+		token, needs := server.searchPacket(clientInBuf, packetOffset, inOffset-packetOffset, &packetLen, &packetType, &body)
+
+		if token == 0 {
+			if needs == 0 {
+				log.Panic("needs cannot be 0")
+				break
+			}
+
+			if CLIENT_MAX_PACKET_SIZE-inOffset < needs {
+				// not enough space to hold income
+				if needs > (CLIENT_MAX_PACKET_SIZE / 2) {
+					msg := fmt.Sprintf("packet overflow and overlap.Reason packet_offset：%d,in_offset:%d", packetOffset, inOffset)
+					log.Panic(msg)
+					break
+				}
+				unParsedSize := inOffset - packetOffset
+				copy(clientInBuf[0:unParsedSize], clientInBuf[packetOffset:inOffset])
+				inOffset = unParsedSize
+				packetOffset = 0
+			}
+			continue
+		}
+
+		packetOffset += token
+
+		// get a packet
+		err = server.parseInComePacket(uint32(packetLen), uint32(packetType), body)
+		if err != nil {
+			log.Warnf("parseInComePacket catches error:%s,client:%s", err, con.RemoteAddr())
+			break
+		}
+
+		if packetOffset == inOffset {
+			packetOffset = 0
+			inOffset = 0
+			log.Debug("ring buffer back to start")
+			continue
+		}
+
+		goto ParseAgin
+
+	}
+
+	log.Infof("connection:%s is shutdown", con.RemoteAddr())
+
+}
diff --git a/common/include/common.h b/common/include/common.h
index 71b832bec..d0b204fc1 100644
--- a/common/include/common.h
+++ b/common/include/common.h
@@ -134,6 +134,12 @@ NodeID pinpoint_start_trace(NodeID);
  */
 NodeID pinpoint_end_trace(NodeID);
 
+/**
+ *  check id->traceNode is root
+ * @param
+ * @return 1: is root; 0: not root node;-1: A wrong id
+ */
+int pinpoint_trace_is_root(NodeID);
 
 /**
  *  force end current trace, only called when callstack leaked
diff --git a/common/src/ConnectionPool/TransLayer.h b/common/src/ConnectionPool/TransLayer.h
index 8194b1464..3b29cc445 100644
--- a/common/src/ConnectionPool/TransLayer.h
+++ b/common/src/ConnectionPool/TransLayer.h
@@ -197,7 +197,7 @@ enum E_STATE{S_WRITING=0x1,S_READING=0x2,S_ERROR=0x4};
 
             if(ret > 0){
                 buf_ofs += (uint32_t) ret;
-                pp_trace("%d send size %d",c_fd,ret);
+                pp_trace("fd %d send size %d",c_fd,ret);
             }else if(ret == -1){
                 if(errno == EAGAIN || errno == EWOULDBLOCK || errno== EINTR){
                     this->_state |=  S_WRITING;
diff --git a/common/src/NodePool/PoolManager.cpp b/common/src/NodePool/PoolManager.cpp
index 0dc08ed67..e2b2894d2 100644
--- a/common/src/NodePool/PoolManager.cpp
+++ b/common/src/NodePool/PoolManager.cpp
@@ -79,8 +79,7 @@ TraceNode& PoolManager::getNodeById(NodeID id)
     if(this->nodeIsAlive(id) == false){
         throw std::out_of_range("id is not alive");
     }
-        
-
+    
     return this->nodeIndexVec[id/CELL_SIZE][id%CELL_SIZE];
 }
 
diff --git a/common/src/NodePool/PoolManager.h b/common/src/NodePool/PoolManager.h
index b52e31313..7dadfa4a7 100644
--- a/common/src/NodePool/PoolManager.h
+++ b/common/src/NodePool/PoolManager.h
@@ -71,8 +71,10 @@ class PoolManager
 private:
     inline bool nodeIsAlive(NodeID id)
     {
-
-        return this->_aliveNodeSet[id];
+        if(id>0 && id <this->maxId){
+            return this->_aliveNodeSet[id];
+        }
+        return false;
     }
 
     void expandOnce();
diff --git a/common/src/common.cpp b/common/src/common.cpp
index de6e91938..9e6ca2cab 100644
--- a/common/src/common.cpp
+++ b/common/src/common.cpp
@@ -196,6 +196,20 @@ int pinpoint_force_end_trace(NodeID id,int32_t timeout)
     return -1;
 }
 
+int pinpoint_trace_is_root(NodeID _id)
+{
+    try
+    {
+        TraceNode&  node = g_node_pool.getNodeById(_id);
+        return node.isRoot()?(1):(0);
+    }catch(const std::out_of_range&){
+        pp_trace("#%ld not found",_id);
+        return -1;
+    }catch(const std::exception &ex){
+        pp_trace("#%ld end trace failed. %s",_id,ex.what());
+        return -1;
+    }
+}
 
 NodeID pinpoint_end_trace(NodeID _id)
 {
@@ -219,8 +233,6 @@ uint64_t pinpoint_start_time(void)
 }
 
 
-void register_error_cb(log_msg_cb error_cb);
-
 int64_t generate_unique_id()
 {
     return SafeSharedState::instance().generateUniqueId();
diff --git a/docker/Dockerfile b/docker/Dockerfile
deleted file mode 100644
index b497ef801..000000000
--- a/docker/Dockerfile
+++ /dev/null
@@ -1,23 +0,0 @@
-FROM python:3.8
-
-ARG DIR="/CollectorAgent"
-
-WORKDIR ${DIR}
-
-ENV COLLECTOR_PATH=collector-agent
-## files
-COPY ${COLLECTOR_PATH}/CollectorAgent/ ${DIR}/CollectorAgent
-COPY ${COLLECTOR_PATH}/CollectorAgentConf/ ${DIR}/CollectorAgentConf
-COPY ${COLLECTOR_PATH}/Common/ ${DIR}/Common/
-COPY ${COLLECTOR_PATH}/conf/ ${DIR}/conf/
-COPY ${COLLECTOR_PATH}/Events/ ${DIR}/Events/
-COPY ${COLLECTOR_PATH}/PHPAgent/ ${DIR}/PHPAgent/
-COPY ${COLLECTOR_PATH}/PinpointAgent/ ${DIR}/PinpointAgent/
-COPY ${COLLECTOR_PATH}/Proto/ ${DIR}/Proto
-COPY ${COLLECTOR_PATH}/run.py/ ${DIR}/
-COPY ${COLLECTOR_PATH}/init_python_env.sh ${DIR}/
-COPY ${COLLECTOR_PATH}/requirements.txt ${DIR}
-
-RUN pip --no-cache-dir install -r requirements.txt && pip --no-cache-dir install grpcio-tools && python -m grpc_tools.protoc -I${DIR}/Proto/grpc --python_out=${DIR}/Proto/grpc --grpc_python_out=${DIR}/Proto/grpc ${DIR}/Proto/grpc/*.proto
-
-CMD ["python","run.py"]
\ No newline at end of file
diff --git a/plugins/PY/__init__.py b/plugins/PY/__init__.py
new file mode 100644
index 000000000..cc06ab726
--- /dev/null
+++ b/plugins/PY/__init__.py
@@ -0,0 +1,19 @@
+# ******************************************************************************
+#   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
index 46a65e559..29b83c789 100644
--- a/plugins/PY/pinpoint/Django/BaseDjangoRequestPlugins.py
+++ b/plugins/PY/pinpoint/Django/BaseDjangoRequestPlugins.py
@@ -29,6 +29,7 @@ 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)
diff --git a/plugins/PY/pinpoint/Flask/FlaskPlugins.py b/plugins/PY/pinpoint/Flask/FlaskPlugins.py
index 205727559..6b12e27fc 100644
--- a/plugins/PY/pinpoint/Flask/FlaskPlugins.py
+++ b/plugins/PY/pinpoint/Flask/FlaskPlugins.py
@@ -38,6 +38,9 @@ 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])
diff --git a/plugins/PY/pinpoint/__init__.py b/plugins/PY/pinpoint/__init__.py
new file mode 100644
index 000000000..cc06ab726
--- /dev/null
+++ b/plugins/PY/pinpoint/__init__.py
@@ -0,0 +1,19 @@
+# ******************************************************************************
+#   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/common/Common.py b/plugins/PY/pinpoint/common/Common.py
index ecac2f47b..050ac1a57 100644
--- a/plugins/PY/pinpoint/common/Common.py
+++ b/plugins/PY/pinpoint/common/Common.py
@@ -20,15 +20,31 @@
 # Created by eeliu at 3/5/20
 
 
-
 import pinpointPy
 
 import socket
 
+from .Defines import *
+
+
 class Candy(object):
+    E_PER_REQ=1
+    E_FUNCTION = 2
+
     def __init__(self,name):
         self.name = name
 
+    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":
+            return True
+        else:
+            return False
+
+
     def onBefore(self,*args, **kwargs):
         pinpointPy.start_trace()
 
@@ -41,29 +57,30 @@ def onException(self,e):
     def __call__(self, func):
         self.func_name=func.__name__
         def pinpointTrace(*args, **kwargs):
+            if not self.isSample((args,kwargs)):
+                return func(*args, **kwargs)
+
             ret = None
-            args, kwargs = self.onBefore(*args, **kwargs)
             try:
+                args, kwargs = self.onBefore(*args, **kwargs)
                 ret = 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 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')
diff --git a/plugins/PY/pinpoint/common/Defines.py b/plugins/PY/pinpoint/common/Defines.py
index b1faec076..856c3d028 100644
--- a/plugins/PY/pinpoint/common/Defines.py
+++ b/plugins/PY/pinpoint/common/Defines.py
@@ -73,7 +73,6 @@
 PYTHON = '1700'
 PP_METHOD_CALL= '1701'
 PP_CELERY='1702'
-PP_CELERY_WORKER='1703'
 
 PP_REMOTE_METHOD = '9900'
 
diff --git a/plugins/PY/pinpoint/common/Interceptor.py b/plugins/PY/pinpoint/common/Interceptor.py
index db131dc09..03d95d04c 100644
--- a/plugins/PY/pinpoint/common/Interceptor.py
+++ b/plugins/PY/pinpoint/common/Interceptor.py
@@ -20,18 +20,18 @@
 # Created by eeliu at 8/20/20
 
 class Interceptor:
-    def __init__(self, scope, point, handle):
+    def __init__(self, scope, point, WrapperClass):
         assert isinstance(point,str)
         self.scope_name = scope.__name__
         self.point = point
         # new a handle and bind on full_name
-        self.handle = handle(self.scope_name+'.'+self.point)
+        self.wrapper = WrapperClass(self.scope_name+'.'+self.point)
         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))
+        assert callable(self.wrapper)
+        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
diff --git a/plugins/PY/pinpoint/common/Span.py b/plugins/PY/pinpoint/common/Span.py
index 951b1846c..dbbf9f221 100644
--- a/plugins/PY/pinpoint/common/Span.py
+++ b/plugins/PY/pinpoint/common/Span.py
@@ -47,12 +47,7 @@ def generateNextSid():
     return nsid
 
 def generatePinpointHeader(host,headers):
-
-    if pinpointPy.check_tracelimit():
-        headers[PP_HEADER_PINPOINT_SAMPLED] = PP_NOT_SAMPLED
-        return
-    else:
-        headers[PP_HEADER_PINPOINT_SAMPLED] = PP_SAMPLED
+    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"
@@ -65,9 +60,9 @@ def generatePinpointHeader(host,headers):
 
 def generatePPRabbitMqHeader(func,headers):
 
-    if pinpointPy.check_tracelimit():
+    if pinpointPy.get_context_key(PP_HEADER_PINPOINT_SAMPLED) == 's0':
         headers[PP_HEADER_PINPOINT_SAMPLED] = PP_NOT_SAMPLED
-        return
+        return False
     else:
         headers[PP_HEADER_PINPOINT_SAMPLED] = PP_SAMPLED
     headers[PP_HEADER_PINPOINT_PAPPTYPE] = pinpointPy.get_context_key(PP_SERVER_TYPE)
@@ -77,4 +72,5 @@ def generatePPRabbitMqHeader(func,headers):
     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)
\ No newline at end of file
+    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/libs/DjangoRest/ViewsPlugin.py b/plugins/PY/pinpoint/libs/DjangoRest/ViewsPlugin.py
new file mode 100644
index 000000000..25fd7a14c
--- /dev/null
+++ b/plugins/PY/pinpoint/libs/DjangoRest/ViewsPlugin.py
@@ -0,0 +1,41 @@
+﻿# ------------------------------------------------------------------------------
+#  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 ViewsPlugin(Candy):
+
+    def __init__(self,name):
+        super().__init__(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)
+        ###############################################################
+        url = '{%s %r}' % (args[1].method,args[1].get_full_path())
+        pinpointPy.add_clues(PP_ARGS, url)
+        return args,kwargs
+
+    def onEnd(self,ret):
+        super().onEnd(ret)
+        return ret
+
+    def onException(self, e):
+        pinpointPy.add_clue(PP_ADD_EXCEPTION,str(e))
diff --git a/plugins/PY/pinpoint/libs/DjangoRest/__init__.py b/plugins/PY/pinpoint/libs/DjangoRest/__init__.py
new file mode 100644
index 000000000..33ae6c04d
--- /dev/null
+++ b/plugins/PY/pinpoint/libs/DjangoRest/__init__.py
@@ -0,0 +1,37 @@
+# ------------------------------------------------------------------------------
+#  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 rest_framework.views import APIView
+        from .ViewsPlugin import ViewsPlugin
+
+
+        Interceptors = [
+            Interceptor(APIView, 'dispatch', ViewsPlugin),
+        ]
+        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/MysqlConnector/CMysqlPlugin.py b/plugins/PY/pinpoint/libs/MysqlConnector/CMysqlPlugin.py
new file mode 100644
index 000000000..218e54810
--- /dev/null
+++ b/plugins/PY/pinpoint/libs/MysqlConnector/CMysqlPlugin.py
@@ -0,0 +1,58 @@
+﻿# ------------------------------------------------------------------------------
+#  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 CMysqlPlugin(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_MYSQL)
+        pinpointPy.add_clue(PP_SQL_FORMAT,  args[1])
+        ###############################################################
+        dst = self.get_dst(args[0])
+        pinpointPy.add_clue(PP_DESTINATION, dst)
+        return args,kwargs
+
+    def onEnd(self,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)
+
+    def get_dst(self,cursor):
+        return cursor._cnx.server_host +":"+ str(cursor._cnx.server_port)
\ No newline at end of file
diff --git a/plugins/PY/pinpoint/libs/MysqlConnector/MysqlPlugin.py b/plugins/PY/pinpoint/libs/MysqlConnector/MysqlPlugin.py
new file mode 100644
index 000000000..1dd5674af
--- /dev/null
+++ b/plugins/PY/pinpoint/libs/MysqlConnector/MysqlPlugin.py
@@ -0,0 +1,58 @@
+﻿# ------------------------------------------------------------------------------
+#  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 MysqlPlugin(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_MYSQL)
+        pinpointPy.add_clue(PP_SQL_FORMAT,  args[1])
+        ###############################################################
+        dst = self.get_dst(args[0])
+        pinpointPy.add_clue(PP_DESTINATION, dst)
+        return args,kwargs
+
+    def onEnd(self,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)
+
+    def get_dst(self,cursor):
+        return cursor._connection.server_host+":"+ str(cursor._connection.server_port)
diff --git a/plugins/PY/pinpoint/libs/MysqlConnector/__init__.py b/plugins/PY/pinpoint/libs/MysqlConnector/__init__.py
new file mode 100644
index 000000000..ab26c8002
--- /dev/null
+++ b/plugins/PY/pinpoint/libs/MysqlConnector/__init__.py
@@ -0,0 +1,42 @@
+# ------------------------------------------------------------------------------
+#  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 mysql.connector.cursor import MySQLCursor, MySQLCursorPrepared
+        from mysql.connector.cursor_cext import CMySQLCursor, CMySQLCursorPrepared
+        from .MysqlPlugin import MysqlPlugin
+        from .CMysqlPlugin import CMysqlPlugin
+
+
+        Interceptors = [
+            Interceptor(MySQLCursor, 'execute', MysqlPlugin),
+            Interceptor(MySQLCursorPrepared, 'execute', MysqlPlugin),
+            Interceptor(CMySQLCursor, 'execute', CMysqlPlugin),
+            Interceptor(CMySQLCursorPrepared, 'execute', CMysqlPlugin),
+        ]
+        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/__init__.py b/plugins/PY/pinpoint/libs/__init__.py
index 2cf90663b..8c391ed38 100644
--- a/plugins/PY/pinpoint/libs/__init__.py
+++ b/plugins/PY/pinpoint/libs/__init__.py
@@ -23,14 +23,16 @@ def __monkey_patch(*args,**kwargs):
             monkey_patch = getattr(module,'monkey_patch')
             if callable(monkey_patch):
                 monkey_patch()
+                print("try to install pinpoint.lib.%s module"%(key))
 
 
 
 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):
+                       sqlalchemy=True,aioHttp=False,MySQLdb=True,amqp=True,kombu=True,celeryCaller=True,celeryTask=True,DjangoRest=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)
+                       sqlalchemy=sqlalchemy,aioHttp=aioHttp,MySQLdb=MySQLdb,amqp=amqp,kombu=kombu,
+                       celeryCaller=celeryCaller,celeryTask=celeryTask,DjangoRest=DjangoRest)
 
 __all__=['monkey_patch_for_pinpoint']
diff --git a/plugins/PY/pinpoint/libs/amqp/AMQPConsumerPlugin.py b/plugins/PY/pinpoint/libs/amqp/AMQPConsumerPlugin.py
index 45cf1a7fc..684742a13 100644
--- a/plugins/PY/pinpoint/libs/amqp/AMQPConsumerPlugin.py
+++ b/plugins/PY/pinpoint/libs/amqp/AMQPConsumerPlugin.py
@@ -28,97 +28,8 @@ def __init__(self, name):
         super().__init__(name)
 
     def onBefore(self,*args, **kwargs):
-        print(args[0])
         return args, kwargs
 
-    # 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.add_clue(PP_AGENT_TYPE,PP_CELERY_WORKER)
-    #     pinpointPy.add_clue(PP_SERVER_TYPE, PP_CELERY_WORKER)
-    #     pinpointPy.add_clue(PP_INTERCEPTOR_NAME, self.getFuncUniqueName())
-    #
-    #     #############################################################
-    #     message = args[0]
-    #     headers = {} if message.headers is None else message.headers
-    #
-    #     pinpointPy.set_context_key(PP_HEADER_PINPOINT_SAMPLED, "s1")
-    #
-    #     if PP_REQ_CLIENT in headers:
-    #         pinpointPy.add_clue(PP_REQ_CLIENT, headers[PP_REQ_CLIENT])
-    #
-    #     if PP_REQ_SERVER in headers:
-    #         pinpointPy.add_clue(PP_REQ_SERVER, headers[PP_REQ_SERVER])
-    #
-    #     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_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)
-    #
-    #     # todo get the callname
-    #     # pinpointPy.add_clues(PP_HTTP_METHOD,headers["REQUEST_METHOD"])
-    #
-    #     #############################################################
-    #     return args, kwargs
-
     def onEnd(self, ret):
         ###############################################################
 
@@ -130,16 +41,14 @@ def onException(self, e):
         pinpointPy.mark_as_error(str(e), "", 0)
         raise e
 
-# AMQPConsumerPlugin is the entry for consumer-callback trace
-#
-# ch.basic_consumer(queue='xxx',callback=xxxx)
-#
 
 class AMQPConsumerPlugin(Candy):
 
     def __init__(self, name):
         super().__init__(name)
 
+
+
     def onBefore(self, *args, **kwargs):
         if 'callback' in kwargs:
             ori_callback = kwargs['callback']
@@ -147,11 +56,9 @@ def onBefore(self, *args, **kwargs):
 
             @ConsumerCallbackPlugin('amqp_consumer_callback')
             def amqp_consumer_callback(message):
-                print('Received message (delivery tag: {}): {}'.format(message.delivery_tag, message.body))
                 # print(message.headers)
                 return ori_callback(message)
 
-
             kwargs['callback'] = amqp_consumer_callback
 
         return args, kwargs
diff --git a/plugins/PY/pinpoint/libs/amqp/__init__.py b/plugins/PY/pinpoint/libs/amqp/__init__.py
index f1a1521bf..d62f00cb0 100644
--- a/plugins/PY/pinpoint/libs/amqp/__init__.py
+++ b/plugins/PY/pinpoint/libs/amqp/__init__.py
@@ -25,7 +25,7 @@ def monkey_patch():
     try:
         from amqp.channel import Channel
         from .AMQPPublicPlugin import AMQPPublicPlugin
-        from .AMQPConsumerPlugin import AMQPConsumerPlugin
+        # from .AMQPConsumerPlugin import AMQPConsumerPlugin
 
         Interceptors = [
             Interceptor(Channel, 'basic_publish_confirm', AMQPPublicPlugin),
diff --git a/plugins/PY/pinpoint/libs/celeryCaller/__init__.py b/plugins/PY/pinpoint/libs/celeryCaller/__init__.py
index 587a77ea3..79bc9d390 100644
--- a/plugins/PY/pinpoint/libs/celeryCaller/__init__.py
+++ b/plugins/PY/pinpoint/libs/celeryCaller/__init__.py
@@ -37,7 +37,6 @@ def monkey_patch():
         ]
         for interceptor in Interceptors:
             interceptor.enable()
-        print('-------------------------------------------')
     except ImportError as e:
         # do nothing
         print(e)
diff --git a/plugins/PY/pinpoint/libs/celeryTask/TaskPlugin.py b/plugins/PY/pinpoint/libs/celeryTask/TaskPlugin.py
new file mode 100644
index 000000000..c97fde716
--- /dev/null
+++ b/plugins/PY/pinpoint/libs/celeryTask/TaskPlugin.py
@@ -0,0 +1,170 @@
+#!/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/celeryWorker/WorkerPlugin.py b/plugins/PY/pinpoint/libs/celeryTask/WorkerTaskTracePlugin.py
similarity index 90%
rename from plugins/PY/pinpoint/celeryWorker/WorkerPlugin.py
rename to plugins/PY/pinpoint/libs/celeryTask/WorkerTaskTracePlugin.py
index c05e51bb8..93f1cbc9e 100644
--- a/plugins/PY/pinpoint/celeryWorker/WorkerPlugin.py
+++ b/plugins/PY/pinpoint/libs/celeryTask/WorkerTaskTracePlugin.py
@@ -22,11 +22,20 @@
 import pinpointPy
 from pinpoint.common import *
 
-class WorkerPlugin(Candy):
+# @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]
@@ -35,21 +44,14 @@ def onBefore(self, *args, **kwargs):
         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, PP_CELERY_WORKER)
-        pinpointPy.add_clue('FT', PP_CELERY_WORKER)
-        pinpointPy.set_context_key(PP_SERVER_TYPE,PP_CELERY_WORKER)
+        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])
-        # nginx add http
-        if PP_HTTP_PINPOINT_PSPANID in headers:
-            pinpointPy.add_clue(PP_PARENT_SPAN_ID, headers[PP_HTTP_PINPOINT_PSPANID])
-        elif PP_HEADER_PINPOINT_PSPANID in headers:
-            pinpointPy.add_clue(PP_PARENT_SPAN_ID, headers[PP_HEADER_PINPOINT_PSPANID])
 
         if PP_HTTP_PINPOINT_SPANID in headers:
             self.sid = headers[PP_HTTP_PINPOINT_SPANID]
@@ -111,11 +113,10 @@ def onBefore(self, *args, **kwargs):
         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):
+    def onRequestOnEnd(self, ret):
         ###############################################################
         # if ret:
             # pinpointPy.add_clues(PP_HTTP_STATUS_CODE, str(ret.status_code))
diff --git a/plugins/PY/pinpoint/libs/celeryTask/WrapperTracer.py b/plugins/PY/pinpoint/libs/celeryTask/WrapperTracer.py
new file mode 100644
index 000000000..f42b173aa
--- /dev/null
+++ b/plugins/PY/pinpoint/libs/celeryTask/WrapperTracer.py
@@ -0,0 +1,39 @@
+#!/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/celeryWorker/__init__.py b/plugins/PY/pinpoint/libs/celeryTask/__init__.py
similarity index 79%
rename from plugins/PY/pinpoint/celeryWorker/__init__.py
rename to plugins/PY/pinpoint/libs/celeryTask/__init__.py
index af74bb512..3d3134f1d 100644
--- a/plugins/PY/pinpoint/celeryWorker/__init__.py
+++ b/plugins/PY/pinpoint/libs/celeryTask/__init__.py
@@ -1,8 +1,3 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-# Created by eeliu at 1/7/21
-
-
 # ******************************************************************************
 #   Copyright  2020. NAVER Corp.
 #
@@ -19,25 +14,24 @@
 #   limitations under the License.
 # ******************************************************************************
 
-from pinpoint.common import Interceptor
-
+#!/usr/bin/env python
+# -*- coding: UTF-8 -*-
+# Created by eeliu at 2/4/21
 
-from pinpoint.libs import monkey_patch_for_pinpoint
-monkey_patch_for_pinpoint(amqp=False,kombu=False)
+from pinpoint.common import Interceptor
 
 def monkey_patch():
     try:
-        from .WorkerPlugin import WorkerPlugin
+        from .WrapperTracer import WrapperTracer
+        # from .WorkerTaskTracePlugin import  WorkerTaskTracePlugin
         from celery.app import trace
         Interceptors = [
-            Interceptor(trace, 'trace_task', WorkerPlugin),
+            # Interceptor(trace, 'trace_task', WorkerTaskTracePlugin),
+            Interceptor(trace, 'build_tracer', WrapperTracer),
         ]
         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/kombu/ProducerPlugin.py b/plugins/PY/pinpoint/libs/kombu/ProducerPlugin.py
index bcbb2ff92..655be5a5c 100644
--- a/plugins/PY/pinpoint/libs/kombu/ProducerPlugin.py
+++ b/plugins/PY/pinpoint/libs/kombu/ProducerPlugin.py
@@ -25,7 +25,7 @@
 class ProducerPlugin(Candy):
     def __init__(self, name):
         super().__init__(name)
-
+    
     def onBefore(self,*args, **kwargs):
         super().onBefore(*args, **kwargs)
         ###############################################################
@@ -38,8 +38,10 @@ def onBefore(self,*args, **kwargs):
             if kwargs['routing_key'] == 'worker.heartbeat':
                 pinpointPy.drop_trace()
             pinpointPy.add_clues(PP_RABBITMQ_ROUTINGKEY, kwargs['routing_key'])
-        target = kwargs['headers']['task']
-        generatePPRabbitMqHeader(target,kwargs['headers'])
+        
+        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))
diff --git a/plugins/PY/pinpoint/libs/requests/NextSpanPlugin.py b/plugins/PY/pinpoint/libs/requests/NextSpanPlugin.py
index f6fecbd01..a762db589 100644
--- a/plugins/PY/pinpoint/libs/requests/NextSpanPlugin.py
+++ b/plugins/PY/pinpoint/libs/requests/NextSpanPlugin.py
@@ -25,28 +25,40 @@ class NextSpanPlugin(Candy):
 
     def __init__(self,name):
         super().__init__(name)
-        self.nsid = ''
-        self.url =''
 
-    def onBefore(self,*args, **kwargs):
-        super().onBefore(*args, **kwargs)
-        self.url = args[0]
-        self.target = urlparse(self.url).netloc
+    def isSample(self,args):
+        '''
+        if not root, no trace
+        :return:
+        '''
+        url = args[0][0]
+        target = urlparse(url).netloc
+        kwargs = args[1]
         if "headers" not in kwargs:
             kwargs["headers"] = {}
-        generatePinpointHeader(self.target,kwargs['headers'])
+        if pinpointPy.get_context_key(PP_HEADER_PINPOINT_SAMPLED) =="s1":
+            generatePinpointHeader(target, kwargs['headers'])
+            return True
+        else:
+            kwargs['headers'][PP_HEADER_PINPOINT_SAMPLED] = PP_NOT_SAMPLED
+            return False
+
+    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, self.url)
+        pinpointPy.add_clues(PP_ARGS, url)
+        pinpointPy.add_clues(PP_HTTP_URL, url)
+        pinpointPy.add_clue(PP_DESTINATION, target)
         ###############################################################
         return args, kwargs
 
     def onEnd(self,ret):
         ###############################################################
-        pinpointPy.add_clue(PP_DESTINATION, self.target)
         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))
         ###############################################################
diff --git a/plugins/PY/pinpoint/libs/urllib/UrlOpenPlugin.py b/plugins/PY/pinpoint/libs/urllib/UrlOpenPlugin.py
index e7cfa9f3f..874b1f49b 100644
--- a/plugins/PY/pinpoint/libs/urllib/UrlOpenPlugin.py
+++ b/plugins/PY/pinpoint/libs/urllib/UrlOpenPlugin.py
@@ -26,26 +26,41 @@ class UrlOpenPlugin(Candy):
 
     def __init__(self, name):
         super().__init__(name)
-        self.dst = ''
-        self.url =''
+
+    def isSample(self,args):
+        '''
+        if not root, no trace
+        :return:
+        '''
+        url = args[0][0]
+        target = urlparse(url).netloc
+        kwargs = args[1]
+        if "headers" not in kwargs:
+            kwargs["headers"] = {}
+        if pinpointPy.get_context_key(PP_HEADER_PINPOINT_SAMPLED) =="s1":
+            generatePinpointHeader(target, kwargs['headers'])
+            return True
+        else:
+            kwargs['headers'][PP_HEADER_PINPOINT_SAMPLED] = PP_NOT_SAMPLED
+            return False
+
     def onBefore(self,*args, **kwargs):
+        url = args[0]
+        target = urlparse(url).netloc
         super().onBefore(*args, **kwargs)
-        self.url = args[0]
-        self.target = urlparse(self.url).netloc
-        generatePinpointHeader(self.target, kwargs['headers'])
         ###############################################################
         pinpointPy.add_clue(PP_INTERCEPTOR_NAME,self.getFuncUniqueName())
         pinpointPy.add_clue(PP_SERVER_TYPE,PP_REMOTE_METHOD)
-        pinpointPy.add_clues(PP_ARGS, self.url)
+        pinpointPy.add_clues(PP_ARGS, url)
+        pinpointPy.add_clues(PP_HTTP_URL, url)
+        pinpointPy.add_clue(PP_DESTINATION, target)
         ###############################################################
-
         return args,kwargs
 
     def onEnd(self,ret):
         ###############################################################
-        pinpointPy.add_clue(PP_DESTINATION, self.target)
+
         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))
         ###############################################################
diff --git a/setup.py b/setup.py
index e2d59b878..5f4880871 100644
--- a/setup.py
+++ b/setup.py
@@ -67,7 +67,7 @@ def run(self):
 
 
 setup(name='pinpointPy',
-      version="1.0.2",
+      version="1.0.3",
       author="eeliu", 
       author_email='eeliu2009@gmail.com',
       license='Apache License 2.0',
diff --git a/src/PY/pinpoint_py.c b/src/PY/pinpoint_py.c
index e1ab9c666..f95c83bd2 100644
--- a/src/PY/pinpoint_py.c
+++ b/src/PY/pinpoint_py.c
@@ -289,6 +289,32 @@ static PyObject *py_generate_unique_id(PyObject *self, CYTHON_UNUSED PyObject *u
     return Py_BuildValue("l", ret);
 }
 
+static PyObject *py_trace_has_root(PyObject *self, PyObject *args)
+{
+    int id = -1;
+    if(! PyArg_ParseTuple(args,"|i",&id))
+    {
+         return NULL;
+    }
+    if (id == -1){
+        id = pinpoint_get_per_thread_id();
+    }
+
+    if(id == 0){
+         return Py_BuildValue("O",Py_False);
+     }else{
+         // check the input id
+         int ret = pinpoint_trace_is_root(id);
+         if(ret == -1){
+             PyErr_SetString(PyExc_Exception, "input traceId is not exist");
+             return Py_BuildValue("O", Py_False);;
+         }
+         return Py_BuildValue("O", Py_True);
+     }
+
+}
+
+
 static PyObject *py_pinpoint_drop_trace(PyObject *self, PyObject *args)
 {
     int id = pinpoint_get_per_thread_id();
@@ -445,16 +471,17 @@ 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" },
     {"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)"},
     {"add_clue", py_pinpoint_add_clue, METH_VARARGS, "def add_clue(string key,string value,int id=-1,int loc=0)"},
     {"set_context_key", py_pinpoint_context_key, METH_VARARGS, "def set_context_key(string key,string value,int id=-1): # create a key-value pair that bases on current trace chain"},
-    {"get_context_key", py_pinpoint_get_key, METH_VARARGS, "def get_context_key(key,int id=-1)->string "},
+    {"get_context_key", py_pinpoint_get_key, METH_VARARGS, "def get_context_key(string key,int id=-1)->string "},
     {"check_tracelimit", py_check_tracelimit, METH_VARARGS, "def check_tracelimit(long timestamp=-1): #check trace whether is limit"},
     {"enable_debug", py_pinpoint_enable_utest, METH_VARARGS, "def enable_debug(callback):#enable logging output(callback )"},
     {"force_flush_trace", py_force_flush_span, METH_VARARGS, "def force_flush_trace(timeout=3,int id=-1): #force flush span during timeout"},
-    {"mark_as_error",py_pinpoint_mark_an_error,METH_VARARGS,"def mark_as_error(string msg,string file_name,uint line_no,int id=-1): #This trace found an error"},
+    {"mark_as_error",py_pinpoint_mark_an_error,METH_VARARGS,"def mark_as_error(string msg,string file_name,uint line_no,int id=-1): #Found an error in this trace"},
     {"set_agent",(PyCFunction)py_set_agent, METH_VARARGS|METH_KEYWORDS, "def set_agent(collector_host=\"unix:/tmp/collector-agent.sock or tcp:host:port\",trace_limit=-1): # set pinpint collector information"},
     { NULL, NULL, 0, NULL}
 };


Test patch:
diff --git a/collector-agent/Test/test_GTimer.py b/collector-agent/Test/test_GTimer.py
deleted file mode 100644
index b77e49824..000000000
--- a/collector-agent/Test/test_GTimer.py
+++ /dev/null
@@ -1,33 +0,0 @@
-import unittest
-from Events.GTimer import GTimer
-from gevent import time
-class TestGtimer(unittest.TestCase):
-    def test_once_timer(self):
-        self.i = 0
-        def add_1(args):
-            self.i+=1
-        gt = GTimer()
-        gt.start(add_1, 0.1,2)
-        time.sleep(0.2)
-        self.assertEqual(self.i,1)
-
-    def test_persist_timer(self):
-        self.i = 0
-
-        def add_1(args):
-            self.i += 1
-
-        gt = GTimer(only_once = False)
-        gt.start(add_1, 0.1,2)
-        gt.start(add_1, 0.1,2)
-        gt.start(add_1, 0.1,2)
-        gt.start(add_1, 0.1,2)
-        time.sleep(0.3)
-        self.assertTrue(self.i >= 3 and self.i <=4)
-        gt.stop()
-        time.sleep(0.3)
-        self.assertTrue(self.i >= 3 and self.i <= 4)
-        gt.start(add_1, 0.1,2)
-        time.sleep(0.3)
-        self.assertTrue(self.i >= 6 and self.i <= 8)
-
diff --git a/collector-agent/Test/test_grpc_protocol.py b/collector-agent/Test/test_grpc_protocol.py
deleted file mode 100644
index 110e83663..000000000
--- a/collector-agent/Test/test_grpc_protocol.py
+++ /dev/null
@@ -1,126 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-# Created by eeliu at 10/21/19
-
-
-# -*- coding: UTF-8 -*-
-import os
-import sys
-import time
-
-proto_class = os.getcwd() + '/Proto/grpc'
-sys.path.append(proto_class)
-
-from concurrent import futures
-from queue import Queue
-import grpc
-from unittest import TestCase
-from CollectorAgent.GrpcMeta import GrpcMeta
-from CollectorAgent.GrpcSpan import GrpcSpan
-from Common.Logger import logger_enable_console
-from Proto.grpc.Service_pb2_grpc import SpanServicer, add_SpanServicer_to_server, MetadataServicer, \
-    add_MetadataServicer_to_server
-from Proto.grpc.Span_pb2 import PTransactionId, PSpan, PSpanMessage, PResult
-
-
-class TestGRPCRoutine(TestCase):
-    @classmethod
-    def setUpClass(cls) -> None:
-        class SendSpanServicer(SpanServicer):
-            def __init__(self):
-                self.count = 0
-
-            def SendSpan(self, request_iterator, context):
-                for request in request_iterator:
-                    print(request)
-                    self.count += 1
-
-        class MetaServicer(MetadataServicer):
-            def __init__(self):
-                self.count = 0
-
-            def _print_and_count(self, request):
-                print(request)
-                self.count += 1
-                return PResult(success=True, message='success')
-
-            def RequestSqlMetaData(self, request, context):
-                return self._print_and_count(request)
-
-            def RequestApiMetaData(self, request, context):
-                return self._print_and_count(request)
-
-            def RequestStringMetaData(self, request, context):
-                return self._print_and_count(request)
-
-        cls.server = grpc.server(futures.ThreadPoolExecutor())
-        cls.spanStat = SendSpanServicer()
-        cls.metaStat = MetaServicer()
-        add_SpanServicer_to_server(cls.spanStat, cls.server)
-        add_MetadataServicer_to_server(cls.metaStat, cls.server)
-
-        cls.server.add_insecure_port('[::]:9993')
-        cls.server.start()
-        logger_enable_console()
-
-        cls.agent_meta = [('agentid', 'test-id'),
-                          ('applicationname', 'test-name'),
-                          ('starttime', str(int(time.time() * 1000)))]
-
-    @classmethod
-    def tearDownClass(cls) -> None:
-        cls.server.stop(None)
-
-    SEQ = 0
-
-    def _generate_span(self):
-
-        tid = PTransactionId(agentId='test-id',agentStartTime=int(time.time()),sequence=TestGRPCRoutine.SEQ)
-        span =PSpan(version = 1,
-                    transactionId=tid,
-                    startTime= int(time.time()),
-                    elapsed=10,
-                    apiId=1,
-                    serviceType=1500,
-                    applicationServiceType=1500)
-        TestGRPCRoutine.SEQ+= 1
-        msg= PSpanMessage(span=span)
-        print("generator a span")
-        return msg
-
-    def test_sendspan(self):
-
-        queue = Queue()
-        spanclient = GrpcSpan('localhost:9993', self.agent_meta, queue)
-        spanclient.start()
-        i = 100
-        while i > 0:
-            queue.put(self._generate_span())
-            i -= 1
-        time.sleep(1)
-        spanclient.stop()
-        self.assertGreaterEqual(self.spanStat.count, 100)
-
-    def test_metaData(self):
-        apis=(['aa',10,0],['ada',12,0],['aa',31,2],['aaf',11,3])
-        strings = ('aaaaaaaaaaaa','bbbbbbbbbbb','cccccccc')
-        sqls=('ssss','bbbbb','ssssssss')
-        meta_client = GrpcMeta('localhost:9993', self.agent_meta)
-        id = 0
-        for api in apis:
-            id = meta_client.updateApiMeta(*api)
-        self.assertEqual(id, 4)
-        for string in strings:
-            id = meta_client.updateStringMeta(string)
-        self.assertEqual(id, 7)
-        for sql in sqls:
-            id = meta_client.updateSqlMeta(sql)
-        self.assertEqual(id, 10)
-
-        id = meta_client.updateSqlMeta('ssss')
-        self.assertEqual(id, 8)
-
-        id = meta_client.updateStringMeta('bbbbbbbbbbb')
-        self.assertEqual(id, 6)
-        time.sleep(1)
-        self.assertGreaterEqual(self.metaStat.count, 10)
diff --git a/collector-agent/Test/test_implement.py b/collector-agent/Test/test_implement.py
deleted file mode 100644
index 52365a718..000000000
--- a/collector-agent/Test/test_implement.py
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-# Created by eeliu at 11/7/19
-
-import os
-import sys
-
-proto_class = os.getcwd() + '/Proto/grpc'
-sys.path.append(proto_class)
-
-import unittest
-from unittest import TestCase
-
-import gevent
-
-from CollectorAgentConf.CollectorAgentConf import CollectorAgentConf
-from PinpointAgent.AppManagement import AppManagement
-import os
-
-
-@unittest.skip('thrift not fully test')
-class TestImplement(TestCase):
-    def setUp(self) -> None:
-        path = os.getcwd()
-        self.grpc_config = path+'/conf/collector_grpc.conf'
-        self.thrift_config = path+'/conf/collector_thrift.conf'
-
-    def test_thrift(self):
-        os.environ['COLLECTOR_CONFIG'] = self.thrift_config
-        self.run_app_manager()
-
-    def test_grpc(self):
-        os.environ['COLLECTOR_CONFIG'] = self.grpc_config
-        self.run_app_manager()
-
-    def run_app_manager(self):
-        from Common.Config import CAConfig
-        collector_conf = CollectorAgentConf(CAConfig)
-        app_management = AppManagement(collector_conf)
-        i =10000
-        while i >0:
-            # stime =1573438683
-            # span = '{"name":"PHP Request","FT":1500,' \
-            #        '"server":"10.34.130.79:28081",' \
-            #        '"sid":"3345567788","psid":"3345567789","tid":"phpmyadmin^1560951035971^1",' \
-            #        '"S":1573438683,"E":20,' \
-            #        '"clues":["46:200"],' \
-            #        '"uri":"/index.html",' \
-            #        '"ERR":{"msg":"23456789op[xdcfvgbhnjmk"},' \
-            #        '"EC":1, "estr":"DIY",' \
-            #        '"calls":[{"name":"hello","S":1573438683,"E":8,"calls":[{"name":"hello2","1573438683":2,"E":2,"clues":["-1:null","14:2019/06/25"],"calls":[{"name":"hello3","S":1573438683,"E":4}]}]}],' \
-            #        '"client":"10.10.10.10"}'
-            span ='''{"AP":"t=10 D=10 i=10 b=10","E":1,"FT":1500,"S":1573549175197,"appid":"app-2","appname":"APP-2","calls":[{"E":1,"S":0,"calls":[{"E":0,"S":1,"clues":["-1:Array()","14:ture"],"name":"date","stp":"1501"}],"clues":["-1:Array","14:ture"],"name":"AppDate::outputDate","stp":"1501"}],"client":"10.34.130.156","clues":["46:200"],"name":"PHP Request","server":"10.34.130.134:8001","sid":"213111260","stp":"1500","tid":"app-2^1573547333369^13794","uri":"/index.php?type=get_date"}'''
-            app_management.handleFrontAgentData(None, None, span.encode())
-            i-= 1
-            # time.sleep(3)
-            # gevent.sleep(1)
-        while True:
-            gevent.sleep(1)
-# GRPC_TRACE=all;GRPC_VERBOSITY=DEBUG
\ No newline at end of file
diff --git a/collector-agent/Test/test_stat.py b/collector-agent/Test/test_stat.py
deleted file mode 100644
index 2ebae12d4..000000000
--- a/collector-agent/Test/test_stat.py
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-# Created by eeliu at 6/2/20
-import os
-import sys
-import time
-import unittest
-
-from Common.Logger import logger_enable_console
-
-proto_class = os.getcwd() + '/Proto/grpc'
-sys.path.append(proto_class)
-
-
-from CollectorAgent.GrpcStat import GrpcStat
-from Proto.grpc.Service_pb2_grpc import StatServicer, add_StatServicer_to_server
-import grpc
-from concurrent import futures
-
-class TestStat(unittest.TestCase):
-    @classmethod
-    def setUpClass(cls) -> None:
-        class AgentStatServicer(StatServicer):
-            def __init__(self):
-                self.count = 0
-
-            def SendAgentStat(self, request_iterator, context):
-                for request in request_iterator:
-                    # print(request)
-                    self.count += 1
-
-        cls.server = grpc.server(futures.ThreadPoolExecutor())
-        cls.agentStat = AgentStatServicer()
-        add_StatServicer_to_server(cls.agentStat, cls.server)
-        cls.server.add_insecure_port('[::]:9992')
-        cls.server.start()
-        logger_enable_console()
-
-    @classmethod
-    def tearDownClass(cls) -> None:
-        cls.server.stop(None)
-
-
-    def __test(self):
-        return (0,0)
-
-    def test_stat(self):
-        stat = GrpcStat('localhost:9992',
-                        [('starttime', '1591001906164'), ('agentid', '345'), ('applicationname', '234324')],
-                        self.__test, 1)
-        # stat.task_running= True
-        # print(next(stat._generator_PstatMessage()))
-        stat.start()
-        time.sleep(3)
-        stat.stop()
-        self.assertGreaterEqual(self.agentStat.count, 1)
diff --git a/collector-agent/Test/test_util.py b/collector-agent/Test/test_util.py
deleted file mode 100644
index 7d3a2b50c..000000000
--- a/collector-agent/Test/test_util.py
+++ /dev/null
@@ -1,89 +0,0 @@
-
-
-
-#!/usr/bin/env python
-
-
-# -*- coding: UTF-8 -*-
-
-
-import os
-import sys
-# !/usr/bin/env python
-from unittest import TestCase
-
-proto_class = os.getcwd() + '/Proto/grpc'
-sys.path.append(proto_class)
-from CollectorAgent.TPackets import *
-from Span_pb2 import PAcceptEvent, PSpan, PSpanEvent
-
-
-# -*- coding: UTF-8 -*-
-
-
-class TestUtil(TestCase):
-    def test_parseNetByteStream(self):
-        netFlow = struct.pack('!hii9shih',PacketType.CONTROL_HANDSHAKE,2,9,"123456789".encode(),PacketType.APPLICATION_STREAM_CLOSE,12345,0)
-        view = memoryview(netFlow)
-
-        ipacket =  Packet.parseNetByteStream(view,len(netFlow))
-
-        tp = next(ipacket)
-
-
-        self.assertEqual(tp[0], 19)
-        self.assertEqual(tp[1],PacketType.CONTROL_HANDSHAKE)
-        self.assertEqual(tp[2], 2)
-        self.assertEqual(tp[3].tobytes(),"123456789".encode())
-
-        tp = next(ipacket)
-
-
-        self.assertEqual(tp[0], 27)
-        self.assertEqual(tp[1],PacketType.APPLICATION_STREAM_CLOSE)
-        self.assertEqual(tp[2],12345)
-        self.assertEqual(tp[3],None)
-
-    def test_queue(self):
-
-        import threading
-        from  queue import Queue
-        simple_queue = Queue()
-
-        def worker():
-            times = 10000
-            while times>0 :
-                item = simple_queue.get()
-                if item is None:
-                    raise
-                times-=1
-                print("-1")
-
-        def consumer():
-            times = 10000
-            while times > 0:
-                simple_queue.put(consumer)
-                times -= 1
-                print("+1")
-
-
-        producer = threading.Thread(target=worker)
-        cons     = threading.Thread(target=consumer)
-        producer.start()
-        cons.start()
-        producer.join()
-        cons.join()
-    def test_span(self):
-        acceptEv = PAcceptEvent()
-        args ={
-            'acceptEvent':acceptEv
-        }
-        span = PSpan()
-        span.serviceType =100
-        print(span)
-
-    def test_span_ev(self):
-        spanEv = PSpanEvent()
-        spanEv.depth = 1
-        spanEv.sequence = 1
-        print(spanEv)
diff --git a/collector-agent/agent/AgentRouter_test.go b/collector-agent/agent/AgentRouter_test.go
new file mode 100644
index 000000000..7cdfccc34
--- /dev/null
+++ b/collector-agent/agent/AgentRouter_test.go
@@ -0,0 +1,32 @@
+package agent
+
+import "testing"
+
+func BenchmarkGetAgentInfo(b *testing.B) {
+	spanMap := map[string]interface{}{
+		"appid":   "sfdaefe",
+		"appname": "sfdaefe",
+		"FT":      23412,
+		"tid":     "234123424^41234^2333",
+	}
+
+	for i := 0; i < b.N; i++ {
+		GetAgentInfo(spanMap)
+	}
+}
+
+func TestGetAgentInfo(t *testing.T) {
+	spanMap := map[string]interface{}{
+		"appid":   "sfdaefe",
+		"appname": "sfdaefe",
+		"FT":      float64(23412),
+		"tid":     "234123424^41234^2333",
+	}
+
+	id, name, ft, startTime, err := GetAgentInfo(spanMap)
+
+	if id != "sfdaefe" && name != "sfdaefe" && ft != "23412" && startTime != "234123424" && err != nil {
+		t.Fail()
+	}
+
+}
diff --git a/collector-agent/agent/RequestCounter_test.go b/collector-agent/agent/RequestCounter_test.go
new file mode 100644
index 000000000..528cabe68
--- /dev/null
+++ b/collector-agent/agent/RequestCounter_test.go
@@ -0,0 +1,48 @@
+package agent
+
+import (
+	"CollectorAgent/common"
+	"testing"
+	"time"
+)
+
+func TestRequestProfiler_Interceptor(t *testing.T) {
+	profiler := RequestProfiler{}
+	config := common.GetConfig()
+	config.StatInterval = 30
+	spans := []map[string]interface{}{
+		{"E": 10.0},
+		{"E": 2568.0},
+		{"E": 100.0},
+		{"E": 520.0},
+		{"E": 0.0},
+	}
+	for _, v := range spans {
+		profiler.Interceptor(v)
+	}
+
+	time.Sleep(1 * time.Second)
+	profiler.Interceptor(spans[2])
+
+	targ := profiler.GetReqTimeProfiler()
+	if targ[0] != 1 {
+		t.Fail()
+	}
+
+	max, avg := profiler.GetMaxAvg()
+	//fmt.Print(max)
+	//fmt.Print(avg)
+	if max != 2568 || avg != 549 {
+		t.Fail()
+	}
+}
+
+func BenchmarkRequestProfiler_Interceptor(b *testing.B) {
+	spanMap := map[string]interface{}{
+		"E": float64(234),
+	}
+	req := RequestProfiler{}
+	for i := 0; i < b.N; i++ {
+		req.Interceptor(spanMap)
+	}
+}
diff --git a/collector-agent/common/utils_test.go b/collector-agent/common/utils_test.go
new file mode 100644
index 000000000..c0fdf6012
--- /dev/null
+++ b/collector-agent/common/utils_test.go
@@ -0,0 +1,34 @@
+package common
+
+import (
+	"reflect"
+	"testing"
+)
+
+func Test_ParseStringField(t *testing.T) {
+
+	ar := ParseStringField("t=991424704447256 D=3775428 i=51 b=49")
+	dst := map[string]string{
+		"t": "991424704447256",
+		"D": "3775428",
+		"i": "51",
+		"b": "49",
+	}
+
+	if !reflect.DeepEqual(ar, dst) {
+		t.Fail()
+	}
+}
+
+func Test_ParseDotFormatToTime(t *testing.T) {
+	time, err := ParseDotFormatToTime("1504248328.423")
+
+	if err != nil {
+		t.Fail()
+	}
+
+	if time != 1504248328423 {
+		t.Fail()
+	}
+
+}
diff --git a/collector-agent/server/server_test.go b/collector-agent/server/server_test.go
new file mode 100644
index 000000000..4097e60e1
--- /dev/null
+++ b/collector-agent/server/server_test.go
@@ -0,0 +1,145 @@
+package server
+
+import (
+	"CollectorAgent/common"
+	"encoding/binary"
+	"net"
+	"os"
+	"strconv"
+	"testing"
+	"time"
+
+	log "github.com/sirupsen/logrus"
+)
+
+func launchJsonServer() *SpanServer {
+	config := common.GetConfig()
+
+	config.SocketType = "tcp"
+	config.Address = "127.0.0.1:8789"
+	config.AgentAddress = "dev-pinpoint-01:9991"
+	config.StatAddress = "dev-pinpoint-01:9992"
+	config.SpanAddress = "dev-pinpoint-01:9993"
+	config.WebPorts = 80
+	config.LoggerLevel = "DEBUG"
+	config.LoggerDir = "/tmp/"
+
+	config.AgentChannelSize = 1000
+	config.SpanStreamParallelismSize = 1
+	config.AgentReTryTimeout = 10
+	config.PingInterval = 5
+	config.StatInterval = 5
+	config.SpanTimeWaitSec = 10
+	config.MetaDataTimeWaitSec = 10
+	config.GrpcConTextTimeOutSec = 5
+	config.HostName = "dev-pinpoint"
+	config.HostIp = "10.34.135.214"
+	config.Pid = 5689
+	config.StartTime = 13558755446548
+	config.ServerType = 1700
+	config.Container = false
+
+	js := SpanServer{}
+
+	return &js
+}
+
+func generateValidPacket(msg string) (buf []byte) {
+	buffer := make([]byte, 8)
+	binary.BigEndian.PutUint32(buffer[0:4], (1))
+	binary.BigEndian.PutUint32(buffer[4:8], (uint32(len(msg))))
+	buf = append(buffer, msg...)
+	return buf
+}
+
+func generateUnvaalidPacket01() (buf []byte) {
+	buf = make([]byte, 8)
+	return buf
+}
+
+func generateUnvaalidPacket02() (buf []byte) {
+	buf = make([]byte, 8)
+	binary.BigEndian.PutUint32(buf[0:4], (uint32(5220154)))
+	binary.BigEndian.PutUint32(buf[4:8], (1))
+	return buf
+}
+
+func generateUnvaalidPacket03() (buf []byte) {
+	buffer := make([]byte, 8)
+	binary.BigEndian.PutUint32(buffer[0:4], uint32(0))
+	binary.BigEndian.PutUint32(buffer[4:8], (1))
+	return buffer
+}
+
+func handleWrite(t *testing.T, conn net.Conn, done chan string) {
+	defer conn.Close()
+
+	for i := 0; i < 5; i++ {
+		//_time := time.Now().Unix()
+		//msg := `{"E":17,"FT":1500,"S":` + strconv.FormatInt(_time, 10) + `,"AppId":"c_test_app_01","Appname":"c_test_name_01","calls":[{"E":7,"S":4,"clues":["-1:I'mthe parameters"],"name":"test_func","stp":"1301"},{"E":2,"S":11,"SQL":"select 1*3;","dst":"localhost:3307","name":"mysql::excute","stp":"2101"},{"E":4,"EXP":"test this exception","S":13,"clues":["40:/support/c-cpp-php-python","46:300"],"dst":"www.pinpoint-wonderful.com","name":"httpclient","nsid":"87969596","stp":"9800"}],"client":"127.0.0.1","clues":["46:200"],"name":"C_CPP Request","server":"HTTP_HOST","sid":"53562116","stp":"1500","tid":"c_test_app^1614586481657^5801","uri":"test_url"}`
+		msg := `{"E":1,"FT":1500,"NP":"t=1617083759.535 D=0.000","S":1617083759798,"appid":"app-2","appname":"APP-2","calls":[{"E":1,"S":0,"clues":["-1:input parameters","14:return value"],"name":"app\\AppDate::outputDate","stp":"1501"}],"client":"10.34.135.145","clues":["46:200"],"name":"PHP Request: fpm-fcgi","server":"10.34.130.152:8000","sid":"726125302","stp":"1500","tid":"app-2^1617083747^5506","uri":"/index.php?type=get_date"} `
+		buffer := generateValidPacket(msg)
+		_, e := conn.Write(buffer)
+		if e != nil {
+			t.Error("Error to send message because of ", e.Error())
+			break
+		}
+		time.Sleep(1 * time.Second)
+	}
+
+	conn.Write(generateUnvaalidPacket03())
+	conn.Write(generateUnvaalidPacket02())
+
+	done <- "done"
+}
+
+func handleRead(t *testing.T, conn net.Conn, done chan string) {
+	buf := make([]byte, 128)
+	reqLen, err := conn.Read(buf)
+	if err != nil {
+		t.Error("Error to read message because of ", err)
+		return
+	}
+	done <- strconv.Itoa(reqLen)
+}
+
+func TestJsonServer(t *testing.T) {
+	js := launchJsonServer()
+	go js.Run()
+	time.Sleep(2 * time.Second)
+	conn, err := net.Dial("tcp", "127.0.0.1:8789")
+	if err != nil {
+		t.Error(err)
+	}
+	done := make(chan string)
+
+	go handleWrite(t, conn, done)
+	go handleRead(t, conn, done)
+
+	<-done
+	<-done
+	<-done
+	//time.Sleep(5 * time.Second)
+}
+
+func TestMain(m *testing.M) {
+	log.SetLevel(log.DebugLevel)
+	log.SetOutput(os.Stdout)
+	code := m.Run()
+
+	os.Exit(code)
+}
+
+func TestLoadConfig(t *testing.T) {
+	os.Setenv("PP_COLLECTOR_AGENT_SPAN_IP", "dev-pinpoint")
+	os.Setenv("PP_COLLECTOR_AGENT_SPAN_PORT", "9993")
+	os.Setenv("PP_COLLECTOR_AGENT_AGENT_IP", "dev-pinpoint")
+	os.Setenv("PP_COLLECTOR_AGENT_AGENT_PORT", "9991")
+	os.Setenv("PP_COLLECTOR_AGENT_STAT_IP", "dev-pinpoint")
+	os.Setenv("PP_COLLECTOR_AGENT_STAT_PORT", "9992")
+	os.Setenv("PP_COLLECTOR_AGENT_ISDOCKER", "true")
+	os.Setenv("PP_LOG_DIR", "/tmp/")
+	os.Setenv("PP_Log_Level", "ERROR")
+	os.Setenv("PP_ADDRESS", "0.0.0.0@9999")
+	InitServerConfig()
+}
diff --git a/common/test/test_common.cc b/common/test/test_common.cc
index dc0857ab8..270b8bc64 100644
--- a/common/test/test_common.cc
+++ b/common/test/test_common.cc
@@ -90,11 +90,12 @@ TEST(common,start_end_trace)
 {
     NodeID id = pinpoint_start_trace(0);
     mark_current_trace_status(id,E_OFFLINE);
-
+    EXPECT_EQ(pinpoint_trace_is_root(id),1);
     id = pinpoint_start_trace(id);
-
+    EXPECT_EQ(pinpoint_trace_is_root(id),0);
     mark_current_trace_status(id,E_OFFLINE);
-
+    EXPECT_EQ(pinpoint_trace_is_root(-1023),-1);
+    EXPECT_EQ(pinpoint_trace_is_root(1023),-1);
     id = pinpoint_start_trace(id);
 
     mark_current_trace_status(id,E_TRACE_PASS);
diff --git a/src/CPP/test_pinpoint.c b/src/CPP/test_pinpoint.c
index 9088ecf63..8963195be 100644
--- a/src/CPP/test_pinpoint.c
+++ b/src/CPP/test_pinpoint.c
@@ -27,7 +27,7 @@ int32_t id = 0;
 const char* app_id ="c_test_app";
 const char* app_name ="c_test_name";
 PPAgentT global_agent_info ={
-    "tcp:dev-collector:9999",1000,-1,1300,1,NULL,NULL,NULL
+    "tcp:127.0.0.1:9999",1000,-1,1700,0,NULL,NULL,NULL
 };
 
 char* get_sid()
@@ -48,8 +48,9 @@ char* get_tid()
 
 void random_sleep()
 {
-    int32_t delay = rand()%10;
-    usleep(delay* 1000);
+    // int32_t delay = rand()%10;
+    // usleep(delay* 1000);
+    // sleep(3);
 }
 
 void test_httpclient()
@@ -115,18 +116,26 @@ void test_req()
     pinpoint_add_clue(id,PP_SPAN_ID,sid,E_CURRENT_LOC);
     pinpoint_add_clues(id,PP_HTTP_STATUS_CODE, "200",E_CURRENT_LOC);
     id = pinpoint_end_trace(id);
+    check_tracelimit(-1);
     free(tid);
     free(sid);
 }
 
 int main(int argc, char const *argv[])
 {
+    char appid[] = "appid-c";
+    char appname[] = "appid-c";
+    app_id =   getenv("APPID");
+    app_name = getenv("APPNAME");
+    if(app_id == NULL || app_name == NULL){
+        app_id = appid;
+        app_name = appname;
+    }
     srand(time(NULL));
     int i=0;
-    for(;i<3;i++)
+    for(;i<100000;i++)
     {
         test_req();
-        sleep(1);
     }
     return 0;
 }
diff --git a/src/CPP/test_pinpoint.cpp b/src/CPP/test_pinpoint.cpp
index 2f7656df1..3e4366cdc 100644
--- a/src/CPP/test_pinpoint.cpp
+++ b/src/CPP/test_pinpoint.cpp
@@ -108,6 +108,7 @@ void test_req()
     pinpoint_add_clue(id,PP_TRANSCATION_ID,get_tid().c_str(),E_CURRENT_LOC);
     pinpoint_add_clue(id,PP_SPAN_ID,get_sid().c_str(),E_CURRENT_LOC);
     pinpoint_add_clues(id,PP_HTTP_STATUS_CODE, "200",E_CURRENT_LOC);
+    catch_error(id,"msg",__FILE__,100);
     id = pinpoint_end_trace(id);
 }
 
diff --git a/src/PY/test/TestPinpoint.py b/src/PY/test/TestPinpoint.py
index f962b9251..2afca9f4c 100644
--- a/src/PY/test/TestPinpoint.py
+++ b/src/PY/test/TestPinpoint.py
@@ -15,10 +15,16 @@ def setUp(self):
         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))
+
         pinpointPy.add_clue("key","value")
         pinpointPy.add_clue("key","value3")
         pinpointPy.set_context_key('sid','12345')
@@ -33,6 +39,7 @@ def test_trace_life(self):
         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'))
diff --git a/src/PY/test/TestUnderThreadMode.py b/src/PY/test/TestUnderThreadMode.py
index 77beea2df..d9c7ed222 100644
--- a/src/PY/test/TestUnderThreadMode.py
+++ b/src/PY/test/TestUnderThreadMode.py
@@ -14,11 +14,13 @@ def tearDown(self):
         pinpointPy.force_flush_trace(4)
 
     def _test_api_flow(self):
-        self.assertTrue(pinpointPy.set_agent(collector_host='unix:/tmp/unexist.sock'))
+        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")
@@ -30,9 +32,10 @@ def _test_api_flow(self):
             pinpointPy.drop_trace()
             value = pinpointPy.get_context_key('sid')
             self.assertFalse(value)
+            self.assertFalse(pinpointPy.trace_has_root())
 
 
-    def test_thead_safe(self):
+    def test_thread_safe(self):
         thread1 = Thread(target=self._test_api_flow)
         thread2 = Thread(target=self._test_api_flow)
         thread3 = Thread(target=self._test_api_flow)