You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2018/05/18 08:34:27 UTC

[GitHub] chidaodezhongsheng closed pull request #1220: support shardingjdbc database storage feature

chidaodezhongsheng closed pull request #1220: support shardingjdbc database storage feature 
URL: https://github.com/apache/incubator-skywalking/pull/1220
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/.github/ISSUE_TEMPLATE b/.github/ISSUE_TEMPLATE
index 8b9aea856..b330eb2d7 100644
--- a/.github/ISSUE_TEMPLATE
+++ b/.github/ISSUE_TEMPLATE
@@ -1,24 +1,24 @@
-Please answer these questions before submitting your issue.
-
-- Why do you submit this issue?
-- [ ] Question or discussion
-- [ ] Bug
-- [ ] Requirement
-- [ ] Feature or performance improvement
-
-___
-### Question
-- What do you want to know?
-
-___
-### Bug
-- Which version of SkyWalking, OS and JRE?
-
-- Which company or project?
-
-- What happen?
-If possible, provide a way for reproducing the error. e.g. demo application, component version.
-
-___
-### Requirement or improvement
+Please answer these questions before submitting your issue.
+
+- Why do you submit this issue?
+- [ ] Question or discussion
+- [ ] Bug
+- [ ] Requirement
+- [ ] Feature or performance improvement
+
+___
+### Question
+- What do you want to know?
+
+___
+### Bug
+- Which version of SkyWalking, OS and JRE?
+
+- Which company or project?
+
+- What happen?
+If possible, provide a way for reproducing the error. e.g. demo application, component version.
+
+___
+### Requirement or improvement
 - Please describe about your requirements or improvement suggestions.
\ No newline at end of file
diff --git a/.github/PULL_REQUEST_TEMPLATE b/.github/PULL_REQUEST_TEMPLATE
index 33068d40d..e5f2f8cff 100644
--- a/.github/PULL_REQUEST_TEMPLATE
+++ b/.github/PULL_REQUEST_TEMPLATE
@@ -1,18 +1,18 @@
-Please answer these questions before submitting pull request
-
-- Why submit this pull request?
-- [ ] Bug fix
-- [ ] New feature provided
-- [ ] Improve performance
-
-- Related issues
-
-___
-### Bug fix
-- Bug description.
-
-- How to fix?
-
-___
-### New feature or improvement
-- Describe the details and related test reports.
+Please answer these questions before submitting pull request
+
+- Why submit this pull request?
+- [ ] Bug fix
+- [ ] New feature provided
+- [ ] Improve performance
+
+- Related issues
+
+___
+### Bug fix
+- Bug description.
+
+- How to fix?
+
+___
+### New feature or improvement
+- Describe the details and related test reports.
diff --git a/.gitignore b/.gitignore
index 8d6d2d3fd..f5300b5f6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,13 +1,13 @@
-/build/
-target/
-.idea/
-*.iml
-.classpath
-.project
-.settings/
-.DS_Store
-*~
-packages/
-**/dependency-reduced-pom.xml
-/skywalking-agent/
-/dist/
+/build/
+target/
+.idea/
+*.iml
+.classpath
+.project
+.settings/
+.DS_Store
+*~
+packages/
+**/dependency-reduced-pom.xml
+/skywalking-agent/
+/dist/
diff --git a/.gitmodules b/.gitmodules
index 050e4c265..21bf720e8 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,6 +1,6 @@
-[submodule "skywalking-ui"]
-	path = skywalking-ui
-	url = https://github.com/apache/incubator-skywalking-ui
-[submodule "apm-protocol/apm-network/src/main/proto"]
-	path = apm-protocol/apm-network/src/main/proto
-	url = https://github.com/apache/incubator-skywalking-data-collect-protocol.git
+[submodule "skywalking-ui"]
+	path = skywalking-ui
+	url = https://github.com/apache/incubator-skywalking-ui
+[submodule "apm-protocol/apm-network/src/main/proto"]
+	path = apm-protocol/apm-network/src/main/proto
+	url = https://github.com/apache/incubator-skywalking-data-collect-protocol.git
diff --git a/.travis.yml b/.travis.yml
index 217dc70c2..05c427224 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,15 +1,15 @@
-sudo: required
-
-language: java
-before_install:
-  - mkdir ci-dependencies
-  - cd ci-dependencies
-  - curl -O https://openskywalking.github.io/skywalking-ci-assist/jars/ojdbc14-10.2.0.4.0.jar
-  - curl -O https://openskywalking.github.io/skywalking-ci-assist/jars/resin-4.0.41.jar
-  - cd ..
-
-install:
-  - jdk_switcher use oraclejdk8
-  - mvn clean install -Ptravis-ci-submodule --quiet jacoco:report coveralls:report
-  - mvn clean javadoc:javadoc -Dmaven.test.skip=true --quiet
-
+sudo: required
+
+language: java
+before_install:
+  - mkdir ci-dependencies
+  - cd ci-dependencies
+  - curl -O https://openskywalking.github.io/skywalking-ci-assist/jars/ojdbc14-10.2.0.4.0.jar
+  - curl -O https://openskywalking.github.io/skywalking-ci-assist/jars/resin-4.0.41.jar
+  - cd ..
+
+install:
+  - jdk_switcher use oraclejdk8
+  - mvn clean install -Ptravis-ci-submodule --quiet jacoco:report coveralls:report
+  - mvn clean javadoc:javadoc -Dmaven.test.skip=true --quiet
+
diff --git a/CHANGES.md b/CHANGES.md
index afaaa976d..21b26a04d 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,102 +1,102 @@
- Changes by Version
- ==================
- Release Notes.
-  
- 5.0.0-beta
- ------------------
- 
-#### UI -> Collector GraphQL query protocol
-  - Replace all tps to throughtput/cpm(calls per min)
-  - Add `getThermodynamic` service
-  - Update version to beta
- 
-#### Agent Changes
-  - Support TLS.
-  - Support namespace.
-  - Support direct link.
-  - Support token.
-  - Add across thread toolkit.
-  - Add new plugin extend machenism to override agent core implementations.
-  - Fix an agent start up sequence bug.
-  - Fix wrong gc count.
-  - Remove system env override.
-  - Add Spring AOP aspect patch to avoid aop conflicts.
- 
-#### Collector Changes
-  - Trace query based on timeline.
-  - Delete JVM aggregation in second.
-  - Support TLS.
-  - Support namespace.
-  - Support token auth.
-  - Group and aggregate requests based on reponse time and timeline, support Thermodynamic chart query
-  - Support component librariy setting through yml file for better extendibility.
-  - Optimize performance.
-  - Support short column name in ES or other storage implementor.
-  - Add a new cache module implementor, based on **Caffeine**.
-  - Support system property override settings.
-  - Refactor settings initialization.
-  - Provide collector instrumentation agent.
-  - Support .NET core component libraries.
-  - Fix `divide zero` in query.
-  - Fix `Data don't remove as expected` in ES implementor.
-  - Add some checks in collector modulization core.
-  - Add some test cases.
- 
-#### UI Changes
-  - New trace query UI.
-  - New Application UI, merge server tab(removed) into applciation as sub page.
-  - New Topology UI.
-  - New response time / throughput TopN list.
-  - Add Thermodynamic chart in overview page.
-  - Change all tps to cpm(calls per minutes).
-  - Fix wrong osName in server view.
-  - Fix wrong startTime in trace view.
-  - Fix some icons internet requirements.
- 
-#### Documents
-   - Add TLS document.
-   - Add namespace document.
-   - Add direct link document.
-   - Add token document.
-   - Add across thread toolkit document.
-   - Add a FAQ about, `Agent or collector version upgrade`.
-   - Sync all English document to Chinese.
- 
-  [Issues and Pull requests](https://github.com/apache/incubator-skywalking/milestone/24)
- 
- 5.0.0-alpha
- ------------------
- 
-#### Agent -> Collector protocol
- - Remove C++ keywords
- - Move **Ref** into Span from Segment
- - Add span type, when register an operation
-
-#### UI -> Collector GraphQL query protocol
- - First version protocol
- 
-#### Agent Changes
- - Support gRPC 1.x plugin
- - Support kafka 0.11 and 1.x plugin
- - Support ServiceComb 0.x plugin
- - Support optional plugin mechanism.
- - Support Spring 3.x and 4.x bean annotation optional plugin
- - Support Apache httpcomponent AsyncClient 4.x plugin 
- - Provide automatic agent daily tests, and release reports [here](https://github.com/SkywalkingTest/agent-integration-test-report).
- - Refactor Postgresql, Oracle, MySQL plugin for compatible.
- - Fix jetty client 9 plugin error
- - Fix async APIs of okhttp plugin error
- - Fix log config didn't work
- - Fix a class loader error in okhttp plugin
- 
-#### Collector Changes
- - Support metrics analysis and aggregation for application, application instance and service in minute, hour, day and month.
- - Support new GraphQL query protocol
- - Support alarm
- - Provide a prototype instrument for collector.
- - Support node speculate in cluster and application topology. (Provider Node -> Consumer Node) -> (Provider Node -> MQ Server -> Consumer Node)
- 
-#### UI Changes
- - New 5.0.0 UI!!!
- 
- [Issues and Pull requests](https://github.com/apache/incubator-skywalking/milestone/17)
+ Changes by Version
+ ==================
+ Release Notes.
+  
+ 5.0.0-beta
+ ------------------
+ 
+#### UI -> Collector GraphQL query protocol
+  - Replace all tps to throughtput/cpm(calls per min)
+  - Add `getThermodynamic` service
+  - Update version to beta
+ 
+#### Agent Changes
+  - Support TLS.
+  - Support namespace.
+  - Support direct link.
+  - Support token.
+  - Add across thread toolkit.
+  - Add new plugin extend machenism to override agent core implementations.
+  - Fix an agent start up sequence bug.
+  - Fix wrong gc count.
+  - Remove system env override.
+  - Add Spring AOP aspect patch to avoid aop conflicts.
+ 
+#### Collector Changes
+  - Trace query based on timeline.
+  - Delete JVM aggregation in second.
+  - Support TLS.
+  - Support namespace.
+  - Support token auth.
+  - Group and aggregate requests based on reponse time and timeline, support Thermodynamic chart query
+  - Support component librariy setting through yml file for better extendibility.
+  - Optimize performance.
+  - Support short column name in ES or other storage implementor.
+  - Add a new cache module implementor, based on **Caffeine**.
+  - Support system property override settings.
+  - Refactor settings initialization.
+  - Provide collector instrumentation agent.
+  - Support .NET core component libraries.
+  - Fix `divide zero` in query.
+  - Fix `Data don't remove as expected` in ES implementor.
+  - Add some checks in collector modulization core.
+  - Add some test cases.
+ 
+#### UI Changes
+  - New trace query UI.
+  - New Application UI, merge server tab(removed) into applciation as sub page.
+  - New Topology UI.
+  - New response time / throughput TopN list.
+  - Add Thermodynamic chart in overview page.
+  - Change all tps to cpm(calls per minutes).
+  - Fix wrong osName in server view.
+  - Fix wrong startTime in trace view.
+  - Fix some icons internet requirements.
+ 
+#### Documents
+   - Add TLS document.
+   - Add namespace document.
+   - Add direct link document.
+   - Add token document.
+   - Add across thread toolkit document.
+   - Add a FAQ about, `Agent or collector version upgrade`.
+   - Sync all English document to Chinese.
+ 
+  [Issues and Pull requests](https://github.com/apache/incubator-skywalking/milestone/24)
+ 
+ 5.0.0-alpha
+ ------------------
+ 
+#### Agent -> Collector protocol
+ - Remove C++ keywords
+ - Move **Ref** into Span from Segment
+ - Add span type, when register an operation
+
+#### UI -> Collector GraphQL query protocol
+ - First version protocol
+ 
+#### Agent Changes
+ - Support gRPC 1.x plugin
+ - Support kafka 0.11 and 1.x plugin
+ - Support ServiceComb 0.x plugin
+ - Support optional plugin mechanism.
+ - Support Spring 3.x and 4.x bean annotation optional plugin
+ - Support Apache httpcomponent AsyncClient 4.x plugin 
+ - Provide automatic agent daily tests, and release reports [here](https://github.com/SkywalkingTest/agent-integration-test-report).
+ - Refactor Postgresql, Oracle, MySQL plugin for compatible.
+ - Fix jetty client 9 plugin error
+ - Fix async APIs of okhttp plugin error
+ - Fix log config didn't work
+ - Fix a class loader error in okhttp plugin
+ 
+#### Collector Changes
+ - Support metrics analysis and aggregation for application, application instance and service in minute, hour, day and month.
+ - Support new GraphQL query protocol
+ - Support alarm
+ - Provide a prototype instrument for collector.
+ - Support node speculate in cluster and application topology. (Provider Node -> Consumer Node) -> (Provider Node -> MQ Server -> Consumer Node)
+ 
+#### UI Changes
+ - New 5.0.0 UI!!!
+ 
+ [Issues and Pull requests](https://github.com/apache/incubator-skywalking/milestone/17)
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
index 220f9b4cc..b70215e03 100644
--- a/CODE_OF_CONDUCT.md
+++ b/CODE_OF_CONDUCT.md
@@ -1,80 +1,80 @@
-*The following is copied for your convenience from <https://www.apache.org/foundation/policies/conduct.html>. If there's a discrepancy between the two, let us know or submit a PR to fix it.*
-
-# CODE OF CONDUCT
-
-## INTRODUCTION
-This code of conduct applies to all spaces managed by the Apache Software Foundation, including IRC, all public and private mailing lists, issue trackers, wikis, blogs, Twitter, and any other communication channel used by our communities. A code of conduct which is specific to in-person events (ie., conferences) is codified in the published ASF anti-harassment policy.
-
-We expect this code of conduct to be honored by everyone who participates in the Apache community formally or informally, or claims any affiliation with the Foundation, in any Foundation-related activities and especially when representing the ASF, in any role.
-
-This code is __not exhaustive or complete__. It serves to distill our common understanding of a collaborative, shared environment and goals. We expect it to be followed in spirit as much as in the letter, so that it can enrich all of us and the technical communities in which we participate.
-
-## SPECIFIC GUIDELINES
-We strive to:
-
-1. **Be open.** We invite anyone to participate in our community. We preferably use public methods of communication for project-related messages, unless discussing something sensitive. This applies to messages for help or project-related support, too; not only is a public support request much more likely to result in an answer to a question, it also makes sure that any inadvertent mistakes made by people answering will be more easily detected and corrected.
-
-2. **Be empathetic, welcoming, friendly, and patient.** We work together to resolve conflict, assume good intentions, and do our best to act in an empathetic fashion. We may all experience some frustration from time to time, but we do not allow frustration to turn into a personal attack. A community where people feel uncomfortable or threatened is not a productive one. We should be respectful when dealing with other community members as well as with people outside our community.
-
-3. **Be collaborative.** Our work will be used by other people, and in turn we will depend on the work of others. When we make something for the benefit of the project, we are willing to explain to others how it works, so that they can build on the work to make it even better. Any decision we make will affect users and colleagues, and we take those consequences seriously when making decisions.
-
-4. **Be inquisitive.** Nobody knows everything! Asking questions early avoids many problems later, so questions are encouraged, though they may be directed to the appropriate forum. Those who are asked should be responsive and helpful, within the context of our shared goal of improving Apache project code.
-
-5. **Be careful in the words that we choose.** Whether we are participating as professionals or volunteers, we value professionalism in all interactions, and take responsibility for our own speech. Be kind to others. Do not insult or put down other participants. Harassment and other exclusionary behavior are not acceptable. This includes, but is not limited to:
-    * Violent threats or language directed against another person.
-    * Sexist, racist, or otherwise discriminatory jokes and language.
-    * Posting sexually explicit or violent material.
-    * Posting (or threatening to post) other people's personally identifying information ("doxing").
-    * Sharing private content, such as emails sent privately or non-publicly, or unlogged forums such as IRC channel history.
-    * Personal insults, especially those using racist or sexist terms.
-    * Unwelcome sexual attention.
-    * Excessive or unnecessary profanity.
-    * Repeated harassment of others. In general, if someone asks you to stop, then stop.
-    * Advocating for, or encouraging, any of the above behavior.
-
-6. **Be concise.** Keep in mind that what you write once will be read by hundreds of persons. Writing a short email means people can understand the conversation as efficiently as possible. Short emails should always strive to be empathetic, welcoming, friendly and patient. When a long explanation is necessary, consider adding a summary.
-
-    Try to bring new ideas to a conversation so that each mail adds something unique to the thread, keeping in mind that the rest of the thread still contains the other messages with arguments that have already been made.  
-
-    Try to stay on topic, especially in discussions that are already fairly large.  
-
-7. **Step down considerately.** Members of every project come and go. When somebody leaves or disengages from the project they should tell people they are leaving and take the proper steps to ensure that others can pick up where they left off. In doing so, they should remain respectful of those who continue to participate in the project and should not misrepresent the project's goals or achievements. Likewise, community members should respect any individual's choice to leave the project.
-
-## DIVERSITY STATEMENT
-Apache welcomes and encourages participation by everyone. We are committed to being a community that everyone feels good about joining. Although we may not be able to satisfy everyone, we will always work to treat everyone well.
-
-No matter how you identify yourself or how others perceive you: we welcome you. Though no list can hope to be comprehensive, we explicitly honour diversity in: age, culture, ethnicity, genotype, gender identity or expression, language, national origin, neurotype, phenotype, political beliefs, profession, race, religion, sexual orientation, socioeconomic status, subculture and technical ability.
-
-Though we welcome people fluent in all languages, Apache development is conducted in English.
-
-Standards for behaviour in the Apache community are detailed in the Code of Conduct above. We expect participants in our community to meet these standards in all their interactions and to help others to do so as well.
-
-## REPORTING GUIDELINES
-While this code of conduct should be adhered to by participants, we recognize that sometimes people may have a bad day, or be unaware of some of the guidelines in this code of conduct. When that happens, you may reply to them and point out this code of conduct. Such messages may be in public or in private, whatever is most appropriate. However, regardless of whether the message is public or not, it should still adhere to the relevant parts of this code of conduct; in particular, it should not be abusive or disrespectful.
-
-If you believe someone is violating this code of conduct, you may reply to them and point out this code of conduct. Such messages may be in public or in private, whatever is most appropriate. Assume good faith; it is more likely that participants are unaware of their bad behaviour than that they intentionally try to degrade the quality of the discussion. Should there be difficulties in dealing with the situation, you may report your compliance issues in confidence to either:
-
-* President of the Apache Software Foundation: Sam Ruby (rubys at intertwingly dot net)
-
-Or one of our volunteers:
-
-* [Mark Thomas](http://home.apache.org/~markt/coc.html)
-* [Joan Touzet](http://home.apache.org/~wohali/)
-* [Sharan Foga](http://home.apache.org/~sharan/coc.html)
-
-If the violation is in documentation or code, for example inappropriate pronoun usage or word choice within official documentation, we ask that people report these privately to the project in question at <pr...@project.apache.org>, and, if they have sufficient ability within the project, to resolve or remove the concerning material, being mindful of the perspective of the person originally reporting the issue.
-
-## ENDNOTES
-This Code defines **empathy** as "a vicarious participation in the emotions, ideas, or opinions of others; the ability to imagine oneself in the condition or predicament of another." **Empathetic** is the adjectival form of empathy.
-
-This statement thanks the following, on which it draws for content and inspiration:
-
-* [CouchDB Project Code of conduct](http://couchdb.apache.org/conduct.html)
-* [Fedora Project Code of Conduct](http://fedoraproject.org/code-of-conduct)
-* [Speak Up! Code of Conduct](http://speakup.io/coc.html)
-* [Django Code of Conduct](https://www.djangoproject.com/conduct/)
-* [Debian Code of Conduct](http://www.debian.org/vote/2014/vote_002)
-* [Twitter Open Source Code of Conduct](https://github.com/twitter/code-of-conduct/blob/master/code-of-conduct.md)
-* [Mozilla Code of Conduct/Draft](https://wiki.mozilla.org/Code_of_Conduct/Draft#Conflicts_of_Interest)
-* [Python Diversity Appendix](https://www.python.org/community/diversity/)
-* [Python Mentors Home Page](http://pythonmentors.com)
+*The following is copied for your convenience from <https://www.apache.org/foundation/policies/conduct.html>. If there's a discrepancy between the two, let us know or submit a PR to fix it.*
+
+# CODE OF CONDUCT
+
+## INTRODUCTION
+This code of conduct applies to all spaces managed by the Apache Software Foundation, including IRC, all public and private mailing lists, issue trackers, wikis, blogs, Twitter, and any other communication channel used by our communities. A code of conduct which is specific to in-person events (ie., conferences) is codified in the published ASF anti-harassment policy.
+
+We expect this code of conduct to be honored by everyone who participates in the Apache community formally or informally, or claims any affiliation with the Foundation, in any Foundation-related activities and especially when representing the ASF, in any role.
+
+This code is __not exhaustive or complete__. It serves to distill our common understanding of a collaborative, shared environment and goals. We expect it to be followed in spirit as much as in the letter, so that it can enrich all of us and the technical communities in which we participate.
+
+## SPECIFIC GUIDELINES
+We strive to:
+
+1. **Be open.** We invite anyone to participate in our community. We preferably use public methods of communication for project-related messages, unless discussing something sensitive. This applies to messages for help or project-related support, too; not only is a public support request much more likely to result in an answer to a question, it also makes sure that any inadvertent mistakes made by people answering will be more easily detected and corrected.
+
+2. **Be empathetic, welcoming, friendly, and patient.** We work together to resolve conflict, assume good intentions, and do our best to act in an empathetic fashion. We may all experience some frustration from time to time, but we do not allow frustration to turn into a personal attack. A community where people feel uncomfortable or threatened is not a productive one. We should be respectful when dealing with other community members as well as with people outside our community.
+
+3. **Be collaborative.** Our work will be used by other people, and in turn we will depend on the work of others. When we make something for the benefit of the project, we are willing to explain to others how it works, so that they can build on the work to make it even better. Any decision we make will affect users and colleagues, and we take those consequences seriously when making decisions.
+
+4. **Be inquisitive.** Nobody knows everything! Asking questions early avoids many problems later, so questions are encouraged, though they may be directed to the appropriate forum. Those who are asked should be responsive and helpful, within the context of our shared goal of improving Apache project code.
+
+5. **Be careful in the words that we choose.** Whether we are participating as professionals or volunteers, we value professionalism in all interactions, and take responsibility for our own speech. Be kind to others. Do not insult or put down other participants. Harassment and other exclusionary behavior are not acceptable. This includes, but is not limited to:
+    * Violent threats or language directed against another person.
+    * Sexist, racist, or otherwise discriminatory jokes and language.
+    * Posting sexually explicit or violent material.
+    * Posting (or threatening to post) other people's personally identifying information ("doxing").
+    * Sharing private content, such as emails sent privately or non-publicly, or unlogged forums such as IRC channel history.
+    * Personal insults, especially those using racist or sexist terms.
+    * Unwelcome sexual attention.
+    * Excessive or unnecessary profanity.
+    * Repeated harassment of others. In general, if someone asks you to stop, then stop.
+    * Advocating for, or encouraging, any of the above behavior.
+
+6. **Be concise.** Keep in mind that what you write once will be read by hundreds of persons. Writing a short email means people can understand the conversation as efficiently as possible. Short emails should always strive to be empathetic, welcoming, friendly and patient. When a long explanation is necessary, consider adding a summary.
+
+    Try to bring new ideas to a conversation so that each mail adds something unique to the thread, keeping in mind that the rest of the thread still contains the other messages with arguments that have already been made.  
+
+    Try to stay on topic, especially in discussions that are already fairly large.  
+
+7. **Step down considerately.** Members of every project come and go. When somebody leaves or disengages from the project they should tell people they are leaving and take the proper steps to ensure that others can pick up where they left off. In doing so, they should remain respectful of those who continue to participate in the project and should not misrepresent the project's goals or achievements. Likewise, community members should respect any individual's choice to leave the project.
+
+## DIVERSITY STATEMENT
+Apache welcomes and encourages participation by everyone. We are committed to being a community that everyone feels good about joining. Although we may not be able to satisfy everyone, we will always work to treat everyone well.
+
+No matter how you identify yourself or how others perceive you: we welcome you. Though no list can hope to be comprehensive, we explicitly honour diversity in: age, culture, ethnicity, genotype, gender identity or expression, language, national origin, neurotype, phenotype, political beliefs, profession, race, religion, sexual orientation, socioeconomic status, subculture and technical ability.
+
+Though we welcome people fluent in all languages, Apache development is conducted in English.
+
+Standards for behaviour in the Apache community are detailed in the Code of Conduct above. We expect participants in our community to meet these standards in all their interactions and to help others to do so as well.
+
+## REPORTING GUIDELINES
+While this code of conduct should be adhered to by participants, we recognize that sometimes people may have a bad day, or be unaware of some of the guidelines in this code of conduct. When that happens, you may reply to them and point out this code of conduct. Such messages may be in public or in private, whatever is most appropriate. However, regardless of whether the message is public or not, it should still adhere to the relevant parts of this code of conduct; in particular, it should not be abusive or disrespectful.
+
+If you believe someone is violating this code of conduct, you may reply to them and point out this code of conduct. Such messages may be in public or in private, whatever is most appropriate. Assume good faith; it is more likely that participants are unaware of their bad behaviour than that they intentionally try to degrade the quality of the discussion. Should there be difficulties in dealing with the situation, you may report your compliance issues in confidence to either:
+
+* President of the Apache Software Foundation: Sam Ruby (rubys at intertwingly dot net)
+
+Or one of our volunteers:
+
+* [Mark Thomas](http://home.apache.org/~markt/coc.html)
+* [Joan Touzet](http://home.apache.org/~wohali/)
+* [Sharan Foga](http://home.apache.org/~sharan/coc.html)
+
+If the violation is in documentation or code, for example inappropriate pronoun usage or word choice within official documentation, we ask that people report these privately to the project in question at <pr...@project.apache.org>, and, if they have sufficient ability within the project, to resolve or remove the concerning material, being mindful of the perspective of the person originally reporting the issue.
+
+## ENDNOTES
+This Code defines **empathy** as "a vicarious participation in the emotions, ideas, or opinions of others; the ability to imagine oneself in the condition or predicament of another." **Empathetic** is the adjectival form of empathy.
+
+This statement thanks the following, on which it draws for content and inspiration:
+
+* [CouchDB Project Code of conduct](http://couchdb.apache.org/conduct.html)
+* [Fedora Project Code of Conduct](http://fedoraproject.org/code-of-conduct)
+* [Speak Up! Code of Conduct](http://speakup.io/coc.html)
+* [Django Code of Conduct](https://www.djangoproject.com/conduct/)
+* [Debian Code of Conduct](http://www.debian.org/vote/2014/vote_002)
+* [Twitter Open Source Code of Conduct](https://github.com/twitter/code-of-conduct/blob/master/code-of-conduct.md)
+* [Mozilla Code of Conduct/Draft](https://wiki.mozilla.org/Code_of_Conduct/Draft#Conflicts_of_Interest)
+* [Python Diversity Appendix](https://www.python.org/community/diversity/)
+* [Python Mentors Home Page](http://pythonmentors.com)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 63e806145..0c45ed93a 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,43 +1,43 @@
-# Contributing to Apache SkyWalking
-
-Firstly, thanks for your interest in contributing! I hope that this will be a
-pleasant first experience for you, and that you will return to continue
-contributing.
-
-## Code of Conduct
-
-This project and everyone participating in it is governed by the Apache
-software Foundation's
-[Code of Conduct](http://www.apache.org/foundation/policies/conduct.html). By
-participating, you are expected to adhere to this code. If you are aware of
-unacceptable behavior, please visit the
-[Reporting Guidelines page](http://www.apache.org/foundation/policies/conduct.html#reporting-guidelines)
-and follow the instructions there.
-
-## How to contribute?
-
-Most of the contributions that we receive are code contributions, but you can
-also contribute to the documentation or simply report solid bugs
-for us to fix.
-
-## How to report a bug?
-
-* **Ensure the bug was not already reported** by searching on GitHub under [Issues](https://github.com/apache/incubator-skywalking/issues).
-
-* If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/apache/incubator-skywalking/issues/new). Be sure to include a **title and clear description**, as much relevant information as possible, and a **code sample** or an **executable test case** demonstrating the expected behavior that is not occurring.
-
-
-## How to add a new feature or change an existing one
-
-_Before making any significant changes, please [open an issue](https://github.com/apache/incubator-skywalking/issues)._ Discussing your proposed changes ahead of time will make the contribution process smooth for everyone.
-
-Once we've discussed your changes and you've got your code ready, make sure that tests are passing and open your pull request. Your PR is most likely to be accepted if it:
-
-* Update the README.md with details of changes to the interface.
-* Includes tests for new functionality.
-* References the original issue in description, e.g. "Resolves #123".
-* Has a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
-
-## Do you have questions about the source code?
-
-Ask any question about how to use SkyWalking in the [Gitter](https://gitter.im/OpenSkywalking/Lobby).
+# Contributing to Apache SkyWalking
+
+Firstly, thanks for your interest in contributing! I hope that this will be a
+pleasant first experience for you, and that you will return to continue
+contributing.
+
+## Code of Conduct
+
+This project and everyone participating in it is governed by the Apache
+software Foundation's
+[Code of Conduct](http://www.apache.org/foundation/policies/conduct.html). By
+participating, you are expected to adhere to this code. If you are aware of
+unacceptable behavior, please visit the
+[Reporting Guidelines page](http://www.apache.org/foundation/policies/conduct.html#reporting-guidelines)
+and follow the instructions there.
+
+## How to contribute?
+
+Most of the contributions that we receive are code contributions, but you can
+also contribute to the documentation or simply report solid bugs
+for us to fix.
+
+## How to report a bug?
+
+* **Ensure the bug was not already reported** by searching on GitHub under [Issues](https://github.com/apache/incubator-skywalking/issues).
+
+* If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/apache/incubator-skywalking/issues/new). Be sure to include a **title and clear description**, as much relevant information as possible, and a **code sample** or an **executable test case** demonstrating the expected behavior that is not occurring.
+
+
+## How to add a new feature or change an existing one
+
+_Before making any significant changes, please [open an issue](https://github.com/apache/incubator-skywalking/issues)._ Discussing your proposed changes ahead of time will make the contribution process smooth for everyone.
+
+Once we've discussed your changes and you've got your code ready, make sure that tests are passing and open your pull request. Your PR is most likely to be accepted if it:
+
+* Update the README.md with details of changes to the interface.
+* Includes tests for new functionality.
+* References the original issue in description, e.g. "Resolves #123".
+* Has a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
+
+## Do you have questions about the source code?
+
+Ask any question about how to use SkyWalking in the [Gitter](https://gitter.im/OpenSkywalking/Lobby).
diff --git a/DISCLAIMER b/DISCLAIMER
index bca452c0b..fee05d7f9 100644
--- a/DISCLAIMER
+++ b/DISCLAIMER
@@ -1,5 +1,5 @@
-Apache SkyWalking (incubating) is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by Incubator. 
-Incubation is required of all newly accepted projects until a further review indicates 
-that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. 
-While incubation status is not necessarily a reflection of the completeness or stability of the code, 
-it does indicate that the project has yet to be fully endorsed by the ASF.
+Apache SkyWalking (incubating) is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by Incubator. 
+Incubation is required of all newly accepted projects until a further review indicates 
+that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. 
+While incubation status is not necessarily a reflection of the completeness or stability of the code, 
+it does indicate that the project has yet to be fully endorsed by the ASF.
diff --git a/HEADER b/HEADER
index 1745cfe66..2509576c0 100644
--- a/HEADER
+++ b/HEADER
@@ -1,14 +1,14 @@
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You 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.
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
diff --git a/LICENSE b/LICENSE
index 8dada3eda..c0ee81299 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,201 +1,201 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "{}"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright {yyyy} {name of copyright owner}
-
-   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.
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "{}"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright {yyyy} {name of copyright owner}
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/NOTICE b/NOTICE
index 750c8d51d..146cfba16 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,5 +1,5 @@
-Apache SkyWalking
-Copyright 2017-2018 The Apache Software Foundation
-
-This product includes software developed at
+Apache SkyWalking
+Copyright 2017-2018 The Apache Software Foundation
+
+This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).
\ No newline at end of file
diff --git a/README.md b/README.md
index 676cc6b34..169e96bf9 100644
--- a/README.md
+++ b/README.md
@@ -1,82 +1,82 @@
-Apache SkyWalking | [中文](README_ZH.md)
-==========
-
-<img src="https://skywalkingtest.github.io/page-resources/3.0/skywalking.png" alt="Sky Walking logo" height="90px" align="right" />
-
-**SkyWalking**: APM (application performance monitor) tool for distributed systems, especially designed for 
-microservices, cloud native and container-based (Docker, Kubernetes, Mesos) architectures.
-
-[![GitHub stars](https://img.shields.io/github/stars/apache/incubator-skywalking.svg?style=for-the-badge&label=Stars&logo=github)](https://github.com/apache/incubator-skywalking)
-[![Twitter Follow](https://img.shields.io/twitter/follow/asfskywalking.svg?style=for-the-badge&label=Follow&logo=twitter)](https://twitter.com/AsfSkyWalking)
-
-
-[![Maven Central](https://img.shields.io/maven-central/v/org.apache.skywalking/apache-skywalking-apm-incubating.svg)](http://skywalking.apache.org/downloads/)
-[![Build Status](https://travis-ci.org/apache/incubator-skywalking.svg?branch=master)](https://travis-ci.org/apache/incubator-skywalking)
-[![Join the chat at https://gitter.im/sky-walking/Lobby](https://badges.gitter.im/openskywalking/Lobby.svg)](https://gitter.im/openskywalking/Lobby)
-[![OpenTracing-1.x Badge](https://img.shields.io/badge/OpenTracing--1.x-enabled-blue.svg)](http://opentracing.io)
-
-# Abstract
-**SkyWalking** started as a distributed tracing system in 2015. From 5.x, it evolved to the fully functional [Application Performance Management](https://en.wikipedia.org/wiki/Application_performance_management) 
-system. It is used for tracing, monitoring, diagnose distributed systems, especially based on microservices, cloud native and container,
-including:
-- Distributed tracing and context propagation
-- Application, instance, service metrics analysis
-- Root cause analysis
-- Application topology map analysis
-- Application and service dependency analysis
-- Slow service detected
-- Performance optimization
-
-# Core features
-- Multiple languages instrumentation agent or libraries 
-  - Native Java auto instrumentation agent. Trace and monitor your cluster without changing any source codes
-  - Community instrumentation agent or libraries
-    * [.NET Core](https://github.com/OpenSkywalking/skywalking-netcore) 
-    * [Node.js](https://github.com/OpenSkywalking/skywalking-nodejs)
-- Multiple storage backends: ElasticSearch, H2
-- [OpenTracing](http://opentracing.io/) compatible
-  - Native Java auto instrumentation agent could work with OpenTracing APIs in the same context
-- Lightweight and powerful backend aggregation and analysis capabilities
-- Modern and cool Web UI
-- Log integration
-- Alarm for slow or unstable(low SLA) application, instance and service 
-
-# Document
-- [Documents in English](docs/README.md)
-- [Documents in Chinese](docs/README_ZH.md)
-
-# 5.x Architecture
-<img src="https://skywalkingtest.github.io/page-resources/5.0/architecture.png"/>
-
-# Code of conduct
-This project adheres to the Contributor Covenant [code of conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to wusheng@apache.org.
-
-# Live Demo
-- Host in Beijing. [goto](http://49.4.12.44:8080/)
-- Host in HK. [goto](http://159.138.0.181:8080/)
-
-# Screenshot
-<img src="https://skywalkingtest.github.io/page-resources/5.0.0-beta/Dashboard.png"/>
-
-
-- [See all screenshots](/docs/Screenshots.md)
-
-# Test reports
-- Automatic integration test reports
-  - [Java Agent test report](https://github.com/SkywalkingTest/agent-integration-test-report)
-- Performance test reports
-  - [Java Agent test report](https://skywalkingtest.github.io/Agent-Benchmarks/)
-
-# Contact Us
-* Submit an issue
-* Mail list: dev@skywalking.apache.org
-* [Gitter](https://gitter.im/openskywalking/Lobby)
-* QQ Group: 392443393
-
-# Users
-<img src="https://skywalkingtest.github.io/page-resources/users/users-2018-04-18.png"/>
-
-[Submit new user case to us.](https://github.com/apache/incubator-skywalking/issues/443)
-
-# License
-[Apache 2.0 License.](/LICENSE)
+Apache SkyWalking | [中文](README_ZH.md)
+==========
+
+<img src="https://skywalkingtest.github.io/page-resources/3.0/skywalking.png" alt="Sky Walking logo" height="90px" align="right" />
+
+**SkyWalking**: APM (application performance monitor) tool for distributed systems, especially designed for 
+microservices, cloud native and container-based (Docker, Kubernetes, Mesos) architectures.
+
+[![GitHub stars](https://img.shields.io/github/stars/apache/incubator-skywalking.svg?style=for-the-badge&label=Stars&logo=github)](https://github.com/apache/incubator-skywalking)
+[![Twitter Follow](https://img.shields.io/twitter/follow/asfskywalking.svg?style=for-the-badge&label=Follow&logo=twitter)](https://twitter.com/AsfSkyWalking)
+
+
+[![Maven Central](https://img.shields.io/maven-central/v/org.apache.skywalking/apache-skywalking-apm-incubating.svg)](http://skywalking.apache.org/downloads/)
+[![Build Status](https://travis-ci.org/apache/incubator-skywalking.svg?branch=master)](https://travis-ci.org/apache/incubator-skywalking)
+[![Join the chat at https://gitter.im/sky-walking/Lobby](https://badges.gitter.im/openskywalking/Lobby.svg)](https://gitter.im/openskywalking/Lobby)
+[![OpenTracing-1.x Badge](https://img.shields.io/badge/OpenTracing--1.x-enabled-blue.svg)](http://opentracing.io)
+
+# Abstract
+**SkyWalking** started as a distributed tracing system in 2015. From 5.x, it evolved to the fully functional [Application Performance Management](https://en.wikipedia.org/wiki/Application_performance_management) 
+system. It is used for tracing, monitoring, diagnose distributed systems, especially based on microservices, cloud native and container,
+including:
+- Distributed tracing and context propagation
+- Application, instance, service metrics analysis
+- Root cause analysis
+- Application topology map analysis
+- Application and service dependency analysis
+- Slow service detected
+- Performance optimization
+
+# Core features
+- Multiple languages instrumentation agent or libraries 
+  - Native Java auto instrumentation agent. Trace and monitor your cluster without changing any source codes
+  - Community instrumentation agent or libraries
+    * [.NET Core](https://github.com/OpenSkywalking/skywalking-netcore) 
+    * [Node.js](https://github.com/OpenSkywalking/skywalking-nodejs)
+- Multiple storage backends: ElasticSearch, H2
+- [OpenTracing](http://opentracing.io/) compatible
+  - Native Java auto instrumentation agent could work with OpenTracing APIs in the same context
+- Lightweight and powerful backend aggregation and analysis capabilities
+- Modern and cool Web UI
+- Log integration
+- Alarm for slow or unstable(low SLA) application, instance and service 
+
+# Document
+- [Documents in English](docs/README.md)
+- [Documents in Chinese](docs/README_ZH.md)
+
+# 5.x Architecture
+<img src="https://skywalkingtest.github.io/page-resources/5.0/architecture.png"/>
+
+# Code of conduct
+This project adheres to the Contributor Covenant [code of conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to wusheng@apache.org.
+
+# Live Demo
+- Host in Beijing. [goto](http://49.4.12.44:8080/)
+- Host in HK. [goto](http://159.138.0.181:8080/)
+
+# Screenshot
+<img src="https://skywalkingtest.github.io/page-resources/5.0.0-beta/Dashboard.png"/>
+
+
+- [See all screenshots](/docs/Screenshots.md)
+
+# Test reports
+- Automatic integration test reports
+  - [Java Agent test report](https://github.com/SkywalkingTest/agent-integration-test-report)
+- Performance test reports
+  - [Java Agent test report](https://skywalkingtest.github.io/Agent-Benchmarks/)
+
+# Contact Us
+* Submit an issue
+* Mail list: dev@skywalking.apache.org
+* [Gitter](https://gitter.im/openskywalking/Lobby)
+* QQ Group: 392443393
+
+# Users
+<img src="https://skywalkingtest.github.io/page-resources/users/users-2018-04-18.png"/>
+
+[Submit new user case to us.](https://github.com/apache/incubator-skywalking/issues/443)
+
+# License
+[Apache 2.0 License.](/LICENSE)
diff --git a/README_ZH.md b/README_ZH.md
index 0d144b40a..7032ab8b3 100644
--- a/README_ZH.md
+++ b/README_ZH.md
@@ -1,81 +1,81 @@
-Apache SkyWalking | [English](README.md)
-==========
-
-<img src="https://skywalkingtest.github.io/page-resources/3.0/skywalking.png" alt="Sky Walking logo" height="90px" align="right" />
-
-**SkyWalking**: 针对分布式系统的APM(应用性能监控)系统,特别针对微服务、cloud native和容器化(Docker, Kubernetes, Mesos)架构
-
-[![GitHub stars](https://img.shields.io/github/stars/apache/incubator-skywalking.svg?style=for-the-badge&label=Stars&logo=github)](https://github.com/apache/incubator-skywalking)
-[![Twitter Follow](https://img.shields.io/twitter/follow/asfskywalking.svg?style=for-the-badge&label=Follow&logo=twitter)](https://twitter.com/AsfSkyWalking)
-
-
-[![Maven Central](https://img.shields.io/maven-central/v/org.apache.skywalking/apache-skywalking-apm-incubating.svg)](http://skywalking.apache.org/downloads/)
-[![Build Status](https://travis-ci.org/apache/incubator-skywalking.svg?branch=master)](https://travis-ci.org/apache/incubator-skywalking)
-[![Join the chat at https://gitter.im/openskywalking/Lobby](https://badges.gitter.im/openskywalking/Lobby.svg)](https://gitter.im/openskywalking/Lobby)
-[![OpenTracing-1.x Badge](https://img.shields.io/badge/OpenTracing--1.x-enabled-blue.svg)](http://opentracing.io)
-
-# Abstract
-**SkyWalking** 创建与2015年,提供分布式追踪功能。从5.x开始,项目进化为一个完成功能的[Application Performance Management](https://en.wikipedia.org/wiki/Application_performance_management)系统。
-他被用于追踪、监控和诊断分布式系统,特别是使用微服务架构,云原生或容积技术。提供以下主要功能:
-- 分布式追踪和上下文传输
-- 应用、实例、服务性能指标分析
-- 根源分析
-- 应用拓扑分析
-- 应用和服务依赖分析
-- 慢服务检测
-- 性能优化
-
-# Core features
-- 多语言探针或类库
-  - Java自动探针,追踪和监控程序时,不需要修改源码。
-  - 社区提供的其他多语言探针
-    * [.NET Core](https://github.com/OpenSkywalking/skywalking-netcore) 
-    * [Node.js](https://github.com/OpenSkywalking/skywalking-nodejs)
-- 多种后端存储: ElasticSearch, H2
-- 支持[OpenTracing](http://opentracing.io/)
-  - Java自动探针支持和OpenTracing API协同工作
-- 轻量级、完善功能的后端聚合和分析
-- 现代化Web UI
-- 日志集成
-- 应用、实例和服务的告警
-
-# Document
-- [英文文档](docs/README.md)
-- [中文文档](docs/README_ZH.md)
-
-# 5.x Architecture
-<img src="https://skywalkingtest.github.io/page-resources/5.0/architecture.png"/>
-
-# code of conduct
-This project adheres to the Contributor Covenant [code of conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to wusheng@apache.org.
-
-
-# Live Demo
-- 北京服务器. [前往](http://49.4.12.44:8080/)
-- 香港服务器. [前往](http://159.138.0.181:8080/)
-
-# Screenshot
-<img src="https://skywalkingtest.github.io/page-resources/5.0.0-beta/Dashboard.png"/>
-
-
-- [查看所有系统截图](/docs/Screenshots.md)
-
-# Test reports
-- 自动化集成测试报告
-  - [Java探针测试报告](https://github.com/SkywalkingTest/agent-integration-test-report)
-- 性能测试报告
-  - [Java探针测试报告](https://skywalkingtest.github.io/Agent-Benchmarks/)
-
-# Users
-<img src="https://skywalkingtest.github.io/page-resources/users/users-2018-04-18.png"/>
-
-[报告新的用户案例](https://github.com/apache/incubator-skywalking/issues/443)
-
-# Contact Us
-* 直接提交Issue
-- 订阅邮件列表: dev@skywalking.apache.org
-* [Gitter](https://gitter.im/openskywalking/Lobby)
-* QQ群: 392443393
-
-# License
-[Apache 2.0 License.](/LICENSE)
+Apache SkyWalking | [English](README.md)
+==========
+
+<img src="https://skywalkingtest.github.io/page-resources/3.0/skywalking.png" alt="Sky Walking logo" height="90px" align="right" />
+
+**SkyWalking**: 针对分布式系统的APM(应用性能监控)系统,特别针对微服务、cloud native和容器化(Docker, Kubernetes, Mesos)架构
+
+[![GitHub stars](https://img.shields.io/github/stars/apache/incubator-skywalking.svg?style=for-the-badge&label=Stars&logo=github)](https://github.com/apache/incubator-skywalking)
+[![Twitter Follow](https://img.shields.io/twitter/follow/asfskywalking.svg?style=for-the-badge&label=Follow&logo=twitter)](https://twitter.com/AsfSkyWalking)
+
+
+[![Maven Central](https://img.shields.io/maven-central/v/org.apache.skywalking/apache-skywalking-apm-incubating.svg)](http://skywalking.apache.org/downloads/)
+[![Build Status](https://travis-ci.org/apache/incubator-skywalking.svg?branch=master)](https://travis-ci.org/apache/incubator-skywalking)
+[![Join the chat at https://gitter.im/openskywalking/Lobby](https://badges.gitter.im/openskywalking/Lobby.svg)](https://gitter.im/openskywalking/Lobby)
+[![OpenTracing-1.x Badge](https://img.shields.io/badge/OpenTracing--1.x-enabled-blue.svg)](http://opentracing.io)
+
+# Abstract
+**SkyWalking** 创建与2015年,提供分布式追踪功能。从5.x开始,项目进化为一个完成功能的[Application Performance Management](https://en.wikipedia.org/wiki/Application_performance_management)系统。
+他被用于追踪、监控和诊断分布式系统,特别是使用微服务架构,云原生或容积技术。提供以下主要功能:
+- 分布式追踪和上下文传输
+- 应用、实例、服务性能指标分析
+- 根源分析
+- 应用拓扑分析
+- 应用和服务依赖分析
+- 慢服务检测
+- 性能优化
+
+# Core features
+- 多语言探针或类库
+  - Java自动探针,追踪和监控程序时,不需要修改源码。
+  - 社区提供的其他多语言探针
+    * [.NET Core](https://github.com/OpenSkywalking/skywalking-netcore) 
+    * [Node.js](https://github.com/OpenSkywalking/skywalking-nodejs)
+- 多种后端存储: ElasticSearch, H2
+- 支持[OpenTracing](http://opentracing.io/)
+  - Java自动探针支持和OpenTracing API协同工作
+- 轻量级、完善功能的后端聚合和分析
+- 现代化Web UI
+- 日志集成
+- 应用、实例和服务的告警
+
+# Document
+- [英文文档](docs/README.md)
+- [中文文档](docs/README_ZH.md)
+
+# 5.x Architecture
+<img src="https://skywalkingtest.github.io/page-resources/5.0/architecture.png"/>
+
+# code of conduct
+This project adheres to the Contributor Covenant [code of conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to wusheng@apache.org.
+
+
+# Live Demo
+- 北京服务器. [前往](http://49.4.12.44:8080/)
+- 香港服务器. [前往](http://159.138.0.181:8080/)
+
+# Screenshot
+<img src="https://skywalkingtest.github.io/page-resources/5.0.0-beta/Dashboard.png"/>
+
+
+- [查看所有系统截图](/docs/Screenshots.md)
+
+# Test reports
+- 自动化集成测试报告
+  - [Java探针测试报告](https://github.com/SkywalkingTest/agent-integration-test-report)
+- 性能测试报告
+  - [Java探针测试报告](https://skywalkingtest.github.io/Agent-Benchmarks/)
+
+# Users
+<img src="https://skywalkingtest.github.io/page-resources/users/users-2018-04-18.png"/>
+
+[报告新的用户案例](https://github.com/apache/incubator-skywalking/issues/443)
+
+# Contact Us
+* 直接提交Issue
+- 订阅邮件列表: dev@skywalking.apache.org
+* [Gitter](https://gitter.im/openskywalking/Lobby)
+* QQ群: 392443393
+
+# License
+[Apache 2.0 License.](/LICENSE)
diff --git a/apm-application-toolkit/apm-toolkit-log4j-1.x/pom.xml b/apm-application-toolkit/apm-toolkit-log4j-1.x/pom.xml
index 9197f5753..a5855a79d 100644
--- a/apm-application-toolkit/apm-toolkit-log4j-1.x/pom.xml
+++ b/apm-application-toolkit/apm-toolkit-log4j-1.x/pom.xml
@@ -1,60 +1,60 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You 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.
-  ~
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>apm-application-toolkit</artifactId>
-        <groupId>org.apache.skywalking</groupId>
-        <version>5.0.0-beta2-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>apm-toolkit-log4j-1.x</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
-            <version>1.2.17</version>
-            <scope>provided</scope>
-        </dependency>
-    </dependencies>
-
-
-    <build>
-        <plugins>
-            <plugin>
-                <!-- 源码插件 -->
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-source-plugin</artifactId>
-                <!-- 发布时自动将源码同时发布的配置 -->
-                <executions>
-                    <execution>
-                        <id>attach-sources</id>
-                        <phase>none</phase>
-                        <goals>
-                            <goal>jar</goal>
-                        </goals>
-                    </execution>
-                </executions>
-                <version>2.4</version>
-            </plugin>
-        </plugins>
-    </build>
-</project>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You 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.
+  ~
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>apm-application-toolkit</artifactId>
+        <groupId>org.apache.skywalking</groupId>
+        <version>5.0.0-beta2-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>apm-toolkit-log4j-1.x</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
+            <version>1.2.17</version>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+
+
+    <build>
+        <plugins>
+            <plugin>
+                <!-- 源码插件 -->
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-source-plugin</artifactId>
+                <!-- 发布时自动将源码同时发布的配置 -->
+                <executions>
+                    <execution>
+                        <id>attach-sources</id>
+                        <phase>none</phase>
+                        <goals>
+                            <goal>jar</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <version>2.4</version>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/apm-application-toolkit/apm-toolkit-log4j-1.x/src/main/java/org/apache/skywalking/apm/toolkit/log/log4j/v1/x/TraceIdPatternConverter.java b/apm-application-toolkit/apm-toolkit-log4j-1.x/src/main/java/org/apache/skywalking/apm/toolkit/log/log4j/v1/x/TraceIdPatternConverter.java
index 984bead8c..a46af8f21 100644
--- a/apm-application-toolkit/apm-toolkit-log4j-1.x/src/main/java/org/apache/skywalking/apm/toolkit/log/log4j/v1/x/TraceIdPatternConverter.java
+++ b/apm-application-toolkit/apm-toolkit-log4j-1.x/src/main/java/org/apache/skywalking/apm/toolkit/log/log4j/v1/x/TraceIdPatternConverter.java
@@ -1,37 +1,37 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-
-package org.apache.skywalking.apm.toolkit.log.log4j.v1.x;
-
-import org.apache.log4j.helpers.PatternConverter;
-import org.apache.log4j.spi.LoggingEvent;
-
-/**
- * Default implementation outputs "TID: N/A".
- * But, if in sky-walking agent active mode, output will become the real ids.
- * <p>
- * Created by wusheng on 2016/12/7.
- */
-
-public class TraceIdPatternConverter extends PatternConverter {
-    @Override
-    protected String convert(LoggingEvent loggingEvent) {
-        return "TID: N/A";
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+package org.apache.skywalking.apm.toolkit.log.log4j.v1.x;
+
+import org.apache.log4j.helpers.PatternConverter;
+import org.apache.log4j.spi.LoggingEvent;
+
+/**
+ * Default implementation outputs "TID: N/A".
+ * But, if in sky-walking agent active mode, output will become the real ids.
+ * <p>
+ * Created by wusheng on 2016/12/7.
+ */
+
+public class TraceIdPatternConverter extends PatternConverter {
+    @Override
+    protected String convert(LoggingEvent loggingEvent) {
+        return "TID: N/A";
+    }
+}
diff --git a/apm-application-toolkit/apm-toolkit-log4j-1.x/src/main/java/org/apache/skywalking/apm/toolkit/log/log4j/v1/x/TraceIdPatternLayout.java b/apm-application-toolkit/apm-toolkit-log4j-1.x/src/main/java/org/apache/skywalking/apm/toolkit/log/log4j/v1/x/TraceIdPatternLayout.java
index 54ab282e4..92efda3cd 100644
--- a/apm-application-toolkit/apm-toolkit-log4j-1.x/src/main/java/org/apache/skywalking/apm/toolkit/log/log4j/v1/x/TraceIdPatternLayout.java
+++ b/apm-application-toolkit/apm-toolkit-log4j-1.x/src/main/java/org/apache/skywalking/apm/toolkit/log/log4j/v1/x/TraceIdPatternLayout.java
@@ -1,36 +1,36 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-
-package org.apache.skywalking.apm.toolkit.log.log4j.v1.x;
-
-import org.apache.log4j.PatternLayout;
-import org.apache.log4j.helpers.PatternParser;
-
-/**
- * The log4j extend pattern. By using this pattern, if sky-walking agent is also active, {@link
- * PatternParser#finalizeConverter(char)} method will be override dynamic. <p>
- *
- * @author wusheng
- */
-public class TraceIdPatternLayout extends PatternLayout {
-    @Override
-    protected PatternParser createPatternParser(String pattern) {
-        return new TraceIdPatternParser(pattern);
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+package org.apache.skywalking.apm.toolkit.log.log4j.v1.x;
+
+import org.apache.log4j.PatternLayout;
+import org.apache.log4j.helpers.PatternParser;
+
+/**
+ * The log4j extend pattern. By using this pattern, if sky-walking agent is also active, {@link
+ * PatternParser#finalizeConverter(char)} method will be override dynamic. <p>
+ *
+ * @author wusheng
+ */
+public class TraceIdPatternLayout extends PatternLayout {
+    @Override
+    protected PatternParser createPatternParser(String pattern) {
+        return new TraceIdPatternParser(pattern);
+    }
+}
diff --git a/apm-application-toolkit/apm-toolkit-log4j-1.x/src/main/java/org/apache/skywalking/apm/toolkit/log/log4j/v1/x/TraceIdPatternParser.java b/apm-application-toolkit/apm-toolkit-log4j-1.x/src/main/java/org/apache/skywalking/apm/toolkit/log/log4j/v1/x/TraceIdPatternParser.java
index a8ea3a01d..fb55c39f2 100644
--- a/apm-application-toolkit/apm-toolkit-log4j-1.x/src/main/java/org/apache/skywalking/apm/toolkit/log/log4j/v1/x/TraceIdPatternParser.java
+++ b/apm-application-toolkit/apm-toolkit-log4j-1.x/src/main/java/org/apache/skywalking/apm/toolkit/log/log4j/v1/x/TraceIdPatternParser.java
@@ -1,42 +1,42 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-
-package org.apache.skywalking.apm.toolkit.log.log4j.v1.x;
-
-import org.apache.log4j.helpers.PatternParser;
-
-/**
- * Base on '%T', use {@link TraceIdPatternConverter} to convert the '%t' to traceId.
- * <p>
- * Created by wusheng on 2016/12/7.
- */
-public class TraceIdPatternParser extends PatternParser {
-    public TraceIdPatternParser(String pattern) {
-        super(pattern);
-    }
-
-    @Override
-    protected void finalizeConverter(char c) {
-        if ('T' == c) {
-            addConverter(new TraceIdPatternConverter());
-        } else {
-            super.finalizeConverter(c);
-        }
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+package org.apache.skywalking.apm.toolkit.log.log4j.v1.x;
+
+import org.apache.log4j.helpers.PatternParser;
+
+/**
+ * Base on '%T', use {@link TraceIdPatternConverter} to convert the '%t' to traceId.
+ * <p>
+ * Created by wusheng on 2016/12/7.
+ */
+public class TraceIdPatternParser extends PatternParser {
+    public TraceIdPatternParser(String pattern) {
+        super(pattern);
+    }
+
+    @Override
+    protected void finalizeConverter(char c) {
+        if ('T' == c) {
+            addConverter(new TraceIdPatternConverter());
+        } else {
+            super.finalizeConverter(c);
+        }
+    }
+}
diff --git a/apm-application-toolkit/apm-toolkit-log4j-2.x/pom.xml b/apm-application-toolkit/apm-toolkit-log4j-2.x/pom.xml
index eac70f3e4..866a08913 100644
--- a/apm-application-toolkit/apm-toolkit-log4j-2.x/pom.xml
+++ b/apm-application-toolkit/apm-toolkit-log4j-2.x/pom.xml
@@ -1,61 +1,61 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You 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.
-  ~
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>apm-application-toolkit</artifactId>
-        <groupId>org.apache.skywalking</groupId>
-        <version>5.0.0-beta2-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>apm-toolkit-log4j-2.x</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.logging.log4j</groupId>
-            <artifactId>log4j-core</artifactId>
-            <version>2.7</version>
-            <scope>provided</scope>
-        </dependency>
-    </dependencies>
-
-
-    <build>
-        <plugins>
-            <plugin>
-                <!-- 源码插件 -->
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-source-plugin</artifactId>
-                <!-- 发布时自动将源码同时发布的配置 -->
-                <executions>
-                    <execution>
-                        <id>attach-sources</id>
-                        <phase>none</phase>
-                        <goals>
-                            <goal>jar</goal>
-                        </goals>
-                    </execution>
-                </executions>
-                <version>2.4</version>
-            </plugin>
-        </plugins>
-    </build>
-
-</project>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You 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.
+  ~
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>apm-application-toolkit</artifactId>
+        <groupId>org.apache.skywalking</groupId>
+        <version>5.0.0-beta2-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>apm-toolkit-log4j-2.x</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-core</artifactId>
+            <version>2.7</version>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+
+
+    <build>
+        <plugins>
+            <plugin>
+                <!-- 源码插件 -->
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-source-plugin</artifactId>
+                <!-- 发布时自动将源码同时发布的配置 -->
+                <executions>
+                    <execution>
+                        <id>attach-sources</id>
+                        <phase>none</phase>
+                        <goals>
+                            <goal>jar</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <version>2.4</version>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
diff --git a/apm-application-toolkit/apm-toolkit-log4j-2.x/src/main/java/org/apache/skywalking/apm/toolkit/log/log4j/v2/x/Log4j2OutputAppender.java b/apm-application-toolkit/apm-toolkit-log4j-2.x/src/main/java/org/apache/skywalking/apm/toolkit/log/log4j/v2/x/Log4j2OutputAppender.java
index b1bf6f3ff..efe82e040 100644
--- a/apm-application-toolkit/apm-toolkit-log4j-2.x/src/main/java/org/apache/skywalking/apm/toolkit/log/log4j/v2/x/Log4j2OutputAppender.java
+++ b/apm-application-toolkit/apm-toolkit-log4j-2.x/src/main/java/org/apache/skywalking/apm/toolkit/log/log4j/v2/x/Log4j2OutputAppender.java
@@ -1,35 +1,35 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-
-package org.apache.skywalking.apm.toolkit.log.log4j.v2.x;
-
-/**
- * Created by wusheng on 2016/12/11.
- */
-public class Log4j2OutputAppender {
-    /**
-     * As default, append "TID: N/A" to the output message,
-     * if sky-walking agent in active mode, append the real traceId in the recent Context, if existed, or empty String.
-     *
-     * @param toAppendTo origin output message.
-     */
-    public static void append(StringBuilder toAppendTo) {
-        toAppendTo.append("TID: N/A");
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+package org.apache.skywalking.apm.toolkit.log.log4j.v2.x;
+
+/**
+ * Created by wusheng on 2016/12/11.
+ */
+public class Log4j2OutputAppender {
+    /**
+     * As default, append "TID: N/A" to the output message,
+     * if sky-walking agent in active mode, append the real traceId in the recent Context, if existed, or empty String.
+     *
+     * @param toAppendTo origin output message.
+     */
+    public static void append(StringBuilder toAppendTo) {
+        toAppendTo.append("TID: N/A");
+    }
+}
diff --git a/apm-application-toolkit/apm-toolkit-log4j-2.x/src/main/java/org/apache/skywalking/apm/toolkit/log/log4j/v2/x/TraceIdConverter.java b/apm-application-toolkit/apm-toolkit-log4j-2.x/src/main/java/org/apache/skywalking/apm/toolkit/log/log4j/v2/x/TraceIdConverter.java
index 3bf772a08..40895968a 100644
--- a/apm-application-toolkit/apm-toolkit-log4j-2.x/src/main/java/org/apache/skywalking/apm/toolkit/log/log4j/v2/x/TraceIdConverter.java
+++ b/apm-application-toolkit/apm-toolkit-log4j-2.x/src/main/java/org/apache/skywalking/apm/toolkit/log/log4j/v2/x/TraceIdConverter.java
@@ -1,57 +1,57 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-
-package org.apache.skywalking.apm.toolkit.log.log4j.v2.x;
-
-import org.apache.logging.log4j.core.LogEvent;
-import org.apache.logging.log4j.core.config.plugins.Plugin;
-import org.apache.logging.log4j.core.pattern.ConverterKeys;
-import org.apache.logging.log4j.core.pattern.LogEventPatternConverter;
-
-/**
- * {@link TraceIdConverter} is a log4j2 plugin, by annotation as {@link Plugin}.
- * It convert the pattern key: traceId.
- * Use '%traceId' in log4j2's config.
- * '%traceId' will output as TID:xxxx
- * <p>
- * Created by wusheng on 2016/12/7.
- */
-@Plugin(name = "TraceIdConverter", category = "Converter")
-@ConverterKeys({"traceId"})
-public class TraceIdConverter extends LogEventPatternConverter {
-
-    /**
-     * Constructs an instance of LoggingEventPatternConverter.
-     *
-     * @param name name of converter.
-     * @param style CSS style for output.
-     */
-    protected TraceIdConverter(String name, String style) {
-        super(name, style);
-    }
-
-    public static TraceIdConverter newInstance(String[] options) {
-        return new TraceIdConverter("traceId", "traceId");
-    }
-
-    @Override
-    public void format(LogEvent event, StringBuilder toAppendTo) {
-        Log4j2OutputAppender.append(toAppendTo);
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+package org.apache.skywalking.apm.toolkit.log.log4j.v2.x;
+
+import org.apache.logging.log4j.core.LogEvent;
+import org.apache.logging.log4j.core.config.plugins.Plugin;
+import org.apache.logging.log4j.core.pattern.ConverterKeys;
+import org.apache.logging.log4j.core.pattern.LogEventPatternConverter;
+
+/**
+ * {@link TraceIdConverter} is a log4j2 plugin, by annotation as {@link Plugin}.
+ * It convert the pattern key: traceId.
+ * Use '%traceId' in log4j2's config.
+ * '%traceId' will output as TID:xxxx
+ * <p>
+ * Created by wusheng on 2016/12/7.
+ */
+@Plugin(name = "TraceIdConverter", category = "Converter")
+@ConverterKeys({"traceId"})
+public class TraceIdConverter extends LogEventPatternConverter {
+
+    /**
+     * Constructs an instance of LoggingEventPatternConverter.
+     *
+     * @param name name of converter.
+     * @param style CSS style for output.
+     */
+    protected TraceIdConverter(String name, String style) {
+        super(name, style);
+    }
+
+    public static TraceIdConverter newInstance(String[] options) {
+        return new TraceIdConverter("traceId", "traceId");
+    }
+
+    @Override
+    public void format(LogEvent event, StringBuilder toAppendTo) {
+        Log4j2OutputAppender.append(toAppendTo);
+    }
+}
diff --git a/apm-application-toolkit/apm-toolkit-logback-1.x/pom.xml b/apm-application-toolkit/apm-toolkit-logback-1.x/pom.xml
index 63ac3c574..f22abef51 100644
--- a/apm-application-toolkit/apm-toolkit-logback-1.x/pom.xml
+++ b/apm-application-toolkit/apm-toolkit-logback-1.x/pom.xml
@@ -1,60 +1,60 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You 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.
-  ~
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>apm-application-toolkit</artifactId>
-        <groupId>org.apache.skywalking</groupId>
-        <version>5.0.0-beta2-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>apm-toolkit-logback-1.x</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>ch.qos.logback</groupId>
-            <artifactId>logback-classic</artifactId>
-            <version>1.2.3</version>
-            <scope>provided</scope>
-        </dependency>
-    </dependencies>
-
-
-    <build>
-        <plugins>
-            <plugin>
-                <!-- 源码插件 -->
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-source-plugin</artifactId>
-                <!-- 发布时自动将源码同时发布的配置 -->
-                <executions>
-                    <execution>
-                        <id>attach-sources</id>
-                        <phase>none</phase>
-                        <goals>
-                            <goal>jar</goal>
-                        </goals>
-                    </execution>
-                </executions>
-                <version>2.4</version>
-            </plugin>
-        </plugins>
-    </build>
-</project>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You 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.
+  ~
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>apm-application-toolkit</artifactId>
+        <groupId>org.apache.skywalking</groupId>
+        <version>5.0.0-beta2-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>apm-toolkit-logback-1.x</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-classic</artifactId>
+            <version>1.2.3</version>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+
+
+    <build>
+        <plugins>
+            <plugin>
+                <!-- 源码插件 -->
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-source-plugin</artifactId>
+                <!-- 发布时自动将源码同时发布的配置 -->
+                <executions>
+                    <execution>
+                        <id>attach-sources</id>
+                        <phase>none</phase>
+                        <goals>
+                            <goal>jar</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <version>2.4</version>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/apm-application-toolkit/apm-toolkit-logback-1.x/src/main/java/org/apache/skywalking/apm/toolkit/log/logback/v1/x/LogbackPatternConverter.java b/apm-application-toolkit/apm-toolkit-logback-1.x/src/main/java/org/apache/skywalking/apm/toolkit/log/logback/v1/x/LogbackPatternConverter.java
index 4fd9e114a..dbc1bc1e3 100644
--- a/apm-application-toolkit/apm-toolkit-logback-1.x/src/main/java/org/apache/skywalking/apm/toolkit/log/logback/v1/x/LogbackPatternConverter.java
+++ b/apm-application-toolkit/apm-toolkit-logback-1.x/src/main/java/org/apache/skywalking/apm/toolkit/log/logback/v1/x/LogbackPatternConverter.java
@@ -1,40 +1,40 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-
-package org.apache.skywalking.apm.toolkit.log.logback.v1.x;
-
-import ch.qos.logback.classic.pattern.ClassicConverter;
-import ch.qos.logback.classic.spi.ILoggingEvent;
-
-/**
- * Created by wusheng on 2016/12/7.
- */
-public class LogbackPatternConverter extends ClassicConverter {
-    /**
-     * As default, return "TID: N/A" to the output message,
-     * if sky-walking agent in active mode, return the real traceId in the recent Context, if existed.
-     *
-     * @param iLoggingEvent
-     * @return the traceId: N/A, empty String, or the real traceId.
-     */
-    @Override
-    public String convert(ILoggingEvent iLoggingEvent) {
-        return "TID: N/A";
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+package org.apache.skywalking.apm.toolkit.log.logback.v1.x;
+
+import ch.qos.logback.classic.pattern.ClassicConverter;
+import ch.qos.logback.classic.spi.ILoggingEvent;
+
+/**
+ * Created by wusheng on 2016/12/7.
+ */
+public class LogbackPatternConverter extends ClassicConverter {
+    /**
+     * As default, return "TID: N/A" to the output message,
+     * if sky-walking agent in active mode, return the real traceId in the recent Context, if existed.
+     *
+     * @param iLoggingEvent
+     * @return the traceId: N/A, empty String, or the real traceId.
+     */
+    @Override
+    public String convert(ILoggingEvent iLoggingEvent) {
+        return "TID: N/A";
+    }
+}
diff --git a/apm-application-toolkit/apm-toolkit-logback-1.x/src/main/java/org/apache/skywalking/apm/toolkit/log/logback/v1/x/TraceIdPatternLogbackLayout.java b/apm-application-toolkit/apm-toolkit-logback-1.x/src/main/java/org/apache/skywalking/apm/toolkit/log/logback/v1/x/TraceIdPatternLogbackLayout.java
index 3e991fe70..f0ca6cfe3 100644
--- a/apm-application-toolkit/apm-toolkit-logback-1.x/src/main/java/org/apache/skywalking/apm/toolkit/log/logback/v1/x/TraceIdPatternLogbackLayout.java
+++ b/apm-application-toolkit/apm-toolkit-logback-1.x/src/main/java/org/apache/skywalking/apm/toolkit/log/logback/v1/x/TraceIdPatternLogbackLayout.java
@@ -1,35 +1,35 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-
-package org.apache.skywalking.apm.toolkit.log.logback.v1.x;
-
-import ch.qos.logback.classic.PatternLayout;
-
-/**
- * Based on the logback-compoenent convert register mechanism,
- * register {@link LogbackPatternConverter} as a new convert, match to "tid".
- * You can use "%tid" in logback config file, "Pattern" section.
- * <p>
- * Created by wusheng on 2016/12/7.
- */
-public class TraceIdPatternLogbackLayout extends PatternLayout {
-    static {
-        defaultConverterMap.put("tid", LogbackPatternConverter.class.getName());
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+package org.apache.skywalking.apm.toolkit.log.logback.v1.x;
+
+import ch.qos.logback.classic.PatternLayout;
+
+/**
+ * Based on the logback-compoenent convert register mechanism,
+ * register {@link LogbackPatternConverter} as a new convert, match to "tid".
+ * You can use "%tid" in logback config file, "Pattern" section.
+ * <p>
+ * Created by wusheng on 2016/12/7.
+ */
+public class TraceIdPatternLogbackLayout extends PatternLayout {
+    static {
+        defaultConverterMap.put("tid", LogbackPatternConverter.class.getName());
+    }
+}
diff --git a/apm-application-toolkit/apm-toolkit-logback-1.x/src/main/java/org/apache/skywalking/apm/toolkit/log/logback/v1/x/mdc/LogbackMDCPatternConverter.java b/apm-application-toolkit/apm-toolkit-logback-1.x/src/main/java/org/apache/skywalking/apm/toolkit/log/logback/v1/x/mdc/LogbackMDCPatternConverter.java
index 07b0b93ea..426edb9c4 100644
--- a/apm-application-toolkit/apm-toolkit-logback-1.x/src/main/java/org/apache/skywalking/apm/toolkit/log/logback/v1/x/mdc/LogbackMDCPatternConverter.java
+++ b/apm-application-toolkit/apm-toolkit-logback-1.x/src/main/java/org/apache/skywalking/apm/toolkit/log/logback/v1/x/mdc/LogbackMDCPatternConverter.java
@@ -1,49 +1,49 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-
-package org.apache.skywalking.apm.toolkit.log.logback.v1.x.mdc;
-
-import ch.qos.logback.classic.pattern.MDCConverter;
-import ch.qos.logback.classic.spi.ILoggingEvent;
-import ch.qos.logback.core.util.OptionHelper;
-
-/**
- * @author zhangkewei
- */
-public class LogbackMDCPatternConverter extends MDCConverter {
-    private static final  String CONVERT_KEY = "tid";
-
-    private boolean convert4TID = false;
-    @Override
-    public void start() {
-        super.start();
-        String[] key = OptionHelper.extractDefaultReplacement(getFirstOption());
-        if (null != key && key.length > 0 && CONVERT_KEY.equals(key[0])) {
-            convert4TID = true;
-        }
-    }
-    @Override
-    public String convert(ILoggingEvent iLoggingEvent) {
-        return convert4TID ? convertTID() : super.convert(iLoggingEvent);
-    }
-
-    public String convertTID() {
-        return "TID: N/A";
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+package org.apache.skywalking.apm.toolkit.log.logback.v1.x.mdc;
+
+import ch.qos.logback.classic.pattern.MDCConverter;
+import ch.qos.logback.classic.spi.ILoggingEvent;
+import ch.qos.logback.core.util.OptionHelper;
+
+/**
+ * @author zhangkewei
+ */
+public class LogbackMDCPatternConverter extends MDCConverter {
+    private static final  String CONVERT_KEY = "tid";
+
+    private boolean convert4TID = false;
+    @Override
+    public void start() {
+        super.start();
+        String[] key = OptionHelper.extractDefaultReplacement(getFirstOption());
+        if (null != key && key.length > 0 && CONVERT_KEY.equals(key[0])) {
+            convert4TID = true;
+        }
+    }
+    @Override
+    public String convert(ILoggingEvent iLoggingEvent) {
+        return convert4TID ? convertTID() : super.convert(iLoggingEvent);
+    }
+
+    public String convertTID() {
+        return "TID: N/A";
+    }
+}
diff --git a/apm-application-toolkit/apm-toolkit-logback-1.x/src/main/java/org/apache/skywalking/apm/toolkit/log/logback/v1/x/mdc/TraceIdMDCPatternLogbackLayout.java b/apm-application-toolkit/apm-toolkit-logback-1.x/src/main/java/org/apache/skywalking/apm/toolkit/log/logback/v1/x/mdc/TraceIdMDCPatternLogbackLayout.java
index c970abbb2..d73d2324c 100644
--- a/apm-application-toolkit/apm-toolkit-logback-1.x/src/main/java/org/apache/skywalking/apm/toolkit/log/logback/v1/x/mdc/TraceIdMDCPatternLogbackLayout.java
+++ b/apm-application-toolkit/apm-toolkit-logback-1.x/src/main/java/org/apache/skywalking/apm/toolkit/log/logback/v1/x/mdc/TraceIdMDCPatternLogbackLayout.java
@@ -1,32 +1,32 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-
-package org.apache.skywalking.apm.toolkit.log.logback.v1.x.mdc;
-
-import ch.qos.logback.classic.PatternLayout;
-
-/**
- * Override "X",SuperClass run before Subclass.
- * @author zhangkewei
- */
-public class TraceIdMDCPatternLogbackLayout extends PatternLayout {
-    static {
-        defaultConverterMap.put("X", LogbackMDCPatternConverter.class.getName());
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+package org.apache.skywalking.apm.toolkit.log.logback.v1.x.mdc;
+
+import ch.qos.logback.classic.PatternLayout;
+
+/**
+ * Override "X",SuperClass run before Subclass.
+ * @author zhangkewei
+ */
+public class TraceIdMDCPatternLogbackLayout extends PatternLayout {
+    static {
+        defaultConverterMap.put("X", LogbackMDCPatternConverter.class.getName());
+    }
+}
diff --git a/apm-application-toolkit/apm-toolkit-opentracing/pom.xml b/apm-application-toolkit/apm-toolkit-opentracing/pom.xml
index db3d4204c..2e7f98d53 100644
--- a/apm-application-toolkit/apm-toolkit-opentracing/pom.xml
+++ b/apm-application-toolkit/apm-toolkit-opentracing/pom.xml
@@ -1,44 +1,44 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You 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.
-  ~
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>apm-application-toolkit</artifactId>
-        <groupId>org.apache.skywalking</groupId>
-        <version>5.0.0-beta2-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>apm-toolkit-opentracing</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>io.opentracing</groupId>
-            <artifactId>opentracing-api</artifactId>
-            <version>0.30.0</version>
-        </dependency>
-        <dependency>
-            <groupId>io.opentracing</groupId>
-            <artifactId>opentracing-noop</artifactId>
-            <version>0.30.0</version>
-        </dependency>
-    </dependencies>
-
-
-</project>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You 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.
+  ~
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>apm-application-toolkit</artifactId>
+        <groupId>org.apache.skywalking</groupId>
+        <version>5.0.0-beta2-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>apm-toolkit-opentracing</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.opentracing</groupId>
+            <artifactId>opentracing-api</artifactId>
+            <version>0.30.0</version>
+        </dependency>
+        <dependency>
+            <groupId>io.opentracing</groupId>
+            <artifactId>opentracing-noop</artifactId>
+            <version>0.30.0</version>
+        </dependency>
+    </dependencies>
+
+
+</project>
diff --git a/apm-application-toolkit/apm-toolkit-opentracing/src/main/java/org/apache/skywalking/apm/toolkit/opentracing/ByteBufferContext.java b/apm-application-toolkit/apm-toolkit-opentracing/src/main/java/org/apache/skywalking/apm/toolkit/opentracing/ByteBufferContext.java
index c48da9fdb..9f2d0ba92 100644
--- a/apm-application-toolkit/apm-toolkit-opentracing/src/main/java/org/apache/skywalking/apm/toolkit/opentracing/ByteBufferContext.java
+++ b/apm-application-toolkit/apm-toolkit-opentracing/src/main/java/org/apache/skywalking/apm/toolkit/opentracing/ByteBufferContext.java
@@ -1,47 +1,47 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-
-package org.apache.skywalking.apm.toolkit.opentracing;
-
-import io.opentracing.SpanContext;
-import java.nio.ByteBuffer;
-import java.nio.charset.Charset;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Created by wusheng on 2016/12/21.
- */
-public class ByteBufferContext implements SpanContext {
-    static final Charset CHARSET = Charset.forName("UTF-8");
-
-    static final byte NO_ENTRY = 0;
-    static final byte ENTRY = 1;
-
-    private final ByteBuffer byteBuffer;
-
-    ByteBufferContext(ByteBuffer byteBuffer) {
-        this.byteBuffer = byteBuffer;
-    }
-
-    @Override
-    public Iterable<Map.Entry<String, String>> baggageItems() {
-        return new HashMap<String, String>().entrySet();
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+package org.apache.skywalking.apm.toolkit.opentracing;
+
+import io.opentracing.SpanContext;
+import java.nio.ByteBuffer;
+import java.nio.charset.Charset;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Created by wusheng on 2016/12/21.
+ */
+public class ByteBufferContext implements SpanContext {
+    static final Charset CHARSET = Charset.forName("UTF-8");
+
+    static final byte NO_ENTRY = 0;
+    static final byte ENTRY = 1;
+
+    private final ByteBuffer byteBuffer;
+
+    ByteBufferContext(ByteBuffer byteBuffer) {
+        this.byteBuffer = byteBuffer;
+    }
+
+    @Override
+    public Iterable<Map.Entry<String, String>> baggageItems() {
+        return new HashMap<String, String>().entrySet();
+    }
+}
diff --git a/apm-application-toolkit/apm-toolkit-opentracing/src/main/java/org/apache/skywalking/apm/toolkit/opentracing/NeedSnifferActivation.java b/apm-application-toolkit/apm-toolkit-opentracing/src/main/java/org/apache/skywalking/apm/toolkit/opentracing/NeedSnifferActivation.java
index 884d8ef9a..6efc8026b 100644
--- a/apm-application-toolkit/apm-toolkit-opentracing/src/main/java/org/apache/skywalking/apm/toolkit/opentracing/NeedSnifferActivation.java
+++ b/apm-application-toolkit/apm-toolkit-opentracing/src/main/java/org/apache/skywalking/apm/toolkit/opentracing/NeedSnifferActivation.java
@@ -1,37 +1,37 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-
-package org.apache.skywalking.apm.toolkit.opentracing;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * The <code>NeedSnifferActivation</code> annotation is flag for reader and maintainers,
- * which represents this method should be activated/intercepted in sniffer.
- *
- * @author wusheng
- */
-@Target({ElementType.METHOD, ElementType.CONSTRUCTOR})
-@Retention(RetentionPolicy.SOURCE)
-public @interface NeedSnifferActivation {
-    String value() default "What should interceptor do?";
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+package org.apache.skywalking.apm.toolkit.opentracing;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * The <code>NeedSnifferActivation</code> annotation is flag for reader and maintainers,
+ * which represents this method should be activated/intercepted in sniffer.
+ *
+ * @author wusheng
+ */
+@Target({ElementType.METHOD, ElementType.CONSTRUCTOR})
+@Retention(RetentionPolicy.SOURCE)
+public @interface NeedSnifferActivation {
+    String value() default "What should interceptor do?";
+}
diff --git a/apm-application-toolkit/apm-toolkit-opentracing/src/main/java/org/apache/skywalking/apm/toolkit/opentracing/SkywalkingActiveSpan.java b/apm-application-toolkit/apm-toolkit-opentracing/src/main/java/org/apache/skywalking/apm/toolkit/opentracing/SkywalkingActiveSpan.java
index bb5ac6bfb..93dcc8242 100644
--- a/apm-application-toolkit/apm-toolkit-opentracing/src/main/java/org/apache/skywalking/apm/toolkit/opentracing/SkywalkingActiveSpan.java
+++ b/apm-application-toolkit/apm-toolkit-opentracing/src/main/java/org/apache/skywalking/apm/toolkit/opentracing/SkywalkingActiveSpan.java
@@ -1,142 +1,142 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-
-package org.apache.skywalking.apm.toolkit.opentracing;
-
-import io.opentracing.ActiveSpan;
-import io.opentracing.SpanContext;
-import java.util.Map;
-
-/**
- * The <code>SkywalkingActiveSpan</code> is an extension of {@link SkywalkingSpan},
- * but because of Java inheritance restrict, only can do with a facade mode.
- *
- * @author wusheng
- */
-public class SkywalkingActiveSpan implements ActiveSpan {
-    private SkywalkingSpan span;
-
-    public SkywalkingActiveSpan(SkywalkingSpan span) {
-        this.span = span;
-    }
-
-    @Override
-    public void deactivate() {
-        span.finish();
-    }
-
-    @Override
-    public void close() {
-        this.deactivate();
-    }
-
-    @Override
-    public Continuation capture() {
-        return new SkywalkingContinuation();
-    }
-
-    @Override
-    public SpanContext context() {
-        return span.context();
-    }
-
-    @Override
-    public ActiveSpan setTag(String key, String value) {
-        span.setTag(key, value);
-        return this;
-    }
-
-    @Override
-    public ActiveSpan setTag(String key, boolean value) {
-        span.setTag(key, value);
-        return this;
-    }
-
-    @Override
-    public ActiveSpan setTag(String key, Number value) {
-        span.setTag(key, value);
-        return this;
-    }
-
-    @Override
-    public ActiveSpan log(Map<String, ?> fields) {
-        span.log(fields);
-        return this;
-    }
-
-    @Override
-    public ActiveSpan log(long timestampMicroseconds, Map<String, ?> fields) {
-        span.log(timestampMicroseconds, fields);
-        return this;
-    }
-
-    @Override
-    public ActiveSpan log(String event) {
-        span.log(event);
-        return this;
-    }
-
-    @Override
-    public ActiveSpan log(long timestampMicroseconds, String event) {
-        span.log(timestampMicroseconds, event);
-        return this;
-    }
-
-    /**
-     * Don't support baggage item.
-     */
-    @Override
-    public ActiveSpan setBaggageItem(String key, String value) {
-        return this;
-    }
-
-    /**
-     * Don't support baggage item.
-     *
-     * @return null, always.
-     */
-    @Override
-    public String getBaggageItem(String key) {
-        return null;
-    }
-
-    @Override
-    public ActiveSpan setOperationName(String operationName) {
-        span.setOperationName(operationName);
-        return this;
-    }
-
-    /**
-     * Don't support logging with payload.
-     */
-    @Deprecated
-    @Override
-    public ActiveSpan log(String eventName, Object payload) {
-        return this;
-    }
-
-    /**
-     * Don't support logging with payload.
-     */
-    @Deprecated
-    @Override
-    public ActiveSpan log(long timestampMicroseconds, String eventName, Object payload) {
-        return this;
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+package org.apache.skywalking.apm.toolkit.opentracing;
+
+import io.opentracing.ActiveSpan;
+import io.opentracing.SpanContext;
+import java.util.Map;
+
+/**
+ * The <code>SkywalkingActiveSpan</code> is an extension of {@link SkywalkingSpan},
+ * but because of Java inheritance restrict, only can do with a facade mode.
+ *
+ * @author wusheng
+ */
+public class SkywalkingActiveSpan implements ActiveSpan {
+    private SkywalkingSpan span;
+
+    public SkywalkingActiveSpan(SkywalkingSpan span) {
+        this.span = span;
+    }
+
+    @Override
+    public void deactivate() {
+        span.finish();
+    }
+
+    @Override
+    public void close() {
+        this.deactivate();
+    }
+
+    @Override
+    public Continuation capture() {
+        return new SkywalkingContinuation();
+    }
+
+    @Override
+    public SpanContext context() {
+        return span.context();
+    }
+
+    @Override
+    public ActiveSpan setTag(String key, String value) {
+        span.setTag(key, value);
+        return this;
+    }
+
+    @Override
+    public ActiveSpan setTag(String key, boolean value) {
+        span.setTag(key, value);
+        return this;
+    }
+
+    @Override
+    public ActiveSpan setTag(String key, Number value) {
+        span.setTag(key, value);
+        return this;
+    }
+
+    @Override
+    public ActiveSpan log(Map<String, ?> fields) {
+        span.log(fields);
+        return this;
+    }
+
+    @Override
+    public ActiveSpan log(long timestampMicroseconds, Map<String, ?> fields) {
+        span.log(timestampMicroseconds, fields);
+        return this;
+    }
+
+    @Override
+    public ActiveSpan log(String event) {
+        span.log(event);
+        return this;
+    }
+
+    @Override
+    public ActiveSpan log(long timestampMicroseconds, String event) {
+        span.log(timestampMicroseconds, event);
+        return this;
+    }
+
+    /**
+     * Don't support baggage item.
+     */
+    @Override
+    public ActiveSpan setBaggageItem(String key, String value) {
+        return this;
+    }
+
+    /**
+     * Don't support baggage item.
+     *
+     * @return null, always.
+     */
+    @Override
+    public String getBaggageItem(String key) {
+        return null;
+    }
+
+    @Override
+    public ActiveSpan setOperationName(String operationName) {
+        span.setOperationName(operationName);
+        return this;
+    }
+
+    /**
+     * Don't support logging with payload.
+     */
+    @Deprecated
+    @Override
+    public ActiveSpan log(String eventName, Object payload) {
+        return this;
+    }
+
+    /**
+     * Don't support logging with payload.
+     */
+    @Deprecated
+    @Override
+    public ActiveSpan log(long timestampMicroseconds, String eventName, Object payload) {
+        return this;
+    }
+}
diff --git a/apm-application-toolkit/apm-toolkit-opentracing/src/main/java/org/apache/skywalking/apm/toolkit/opentracing/SkywalkingContext.java b/apm-application-toolkit/apm-toolkit-opentracing/src/main/java/org/apache/skywalking/apm/toolkit/opentracing/SkywalkingContext.java
index 7f76a14e2..d83e31291 100644
--- a/apm-application-toolkit/apm-toolkit-opentracing/src/main/java/org/apache/skywalking/apm/toolkit/opentracing/SkywalkingContext.java
+++ b/apm-application-toolkit/apm-toolkit-opentracing/src/main/java/org/apache/skywalking/apm/toolkit/opentracing/SkywalkingContext.java
@@ -1,41 +1,41 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-
-package org.apache.skywalking.apm.toolkit.opentracing;
-
-import io.opentracing.SpanContext;
-
-import java.util.Map;
-
-/**
- * Skywalking tracer context based on {@link ThreadLocal} auto mechanism.
- *
- * @author wusheng
- */
-public class SkywalkingContext implements SpanContext {
-    public static final SkywalkingContext INSTANCE = new SkywalkingContext();
-
-    public SkywalkingContext() {
-    }
-
-    @Override
-    public Iterable<Map.Entry<String, String>> baggageItems() {
-        return null;
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+package org.apache.skywalking.apm.toolkit.opentracing;
+
+import io.opentracing.SpanContext;
+
+import java.util.Map;
+
+/**
+ * Skywalking tracer context based on {@link ThreadLocal} auto mechanism.
+ *
+ * @author wusheng
+ */
+public class SkywalkingContext implements SpanContext {
+    public static final SkywalkingContext INSTANCE = new SkywalkingContext();
+
+    public SkywalkingContext() {
+    }
+
+    @Override
+    public Iterable<Map.Entry<String, String>> baggageItems() {
+        return null;
+    }
+}
diff --git a/apm-application-toolkit/apm-toolkit-opentracing/src/main/java/org/apache/skywalking/apm/toolkit/opentracing/SkywalkingContinuation.java b/apm-application-toolkit/apm-toolkit-opentracing/src/main/java/org/apache/skywalking/apm/toolkit/opentracing/SkywalkingContinuation.java
index 37fdcaf49..8cc8d3e95 100644
--- a/apm-application-toolkit/apm-toolkit-opentracing/src/main/java/org/apache/skywalking/apm/toolkit/opentracing/SkywalkingContinuation.java
+++ b/apm-application-toolkit/apm-toolkit-opentracing/src/main/java/org/apache/skywalking/apm/toolkit/opentracing/SkywalkingContinuation.java
@@ -1,40 +1,40 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-
-package org.apache.skywalking.apm.toolkit.opentracing;
-
-import io.opentracing.ActiveSpan;
-
-/**
- * @author wusheng
- */
-public class SkywalkingContinuation implements ActiveSpan.Continuation {
-    @NeedSnifferActivation("1. ContextManager#capture" +
-        "2. set ContextSnapshot to the dynamic field")
-    public SkywalkingContinuation() {
-    }
-
-    @NeedSnifferActivation("1. get ContextSnapshot from the dynamic field" +
-        "2. ContextManager#continued")
-    @Override
-    public ActiveSpan activate() {
-        SkywalkingSpanBuilder builder = new SkywalkingSpanBuilder("Thread/" + Thread.currentThread().getName());
-        return builder.startActive();
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+package org.apache.skywalking.apm.toolkit.opentracing;
+
+import io.opentracing.ActiveSpan;
+
+/**
+ * @author wusheng
+ */
+public class SkywalkingContinuation implements ActiveSpan.Continuation {
+    @NeedSnifferActivation("1. ContextManager#capture" +
+        "2. set ContextSnapshot to the dynamic field")
+    public SkywalkingContinuation() {
+    }
+
+    @NeedSnifferActivation("1. get ContextSnapshot from the dynamic field" +
+        "2. ContextManager#continued")
+    @Override
+    public ActiveSpan activate() {
+        SkywalkingSpanBuilder builder = new SkywalkingSpanBuilder("Thread/" + Thread.currentThread().getName());
+        return builder.startActive();
+    }
+}
diff --git a/apm-application-toolkit/apm-toolkit-opentracing/src/main/java/org/apache/skywalking/apm/toolkit/opentracing/SkywalkingSpan.java b/apm-application-toolkit/apm-toolkit-opentracing/src/main/java/org/apache/skywalking/apm/toolkit/opentracing/SkywalkingSpan.java
index 61f9dd59c..2a66eeacf 100644
--- a/apm-application-toolkit/apm-toolkit-opentracing/src/main/java/org/apache/skywalking/apm/toolkit/opentracing/SkywalkingSpan.java
+++ b/apm-application-toolkit/apm-toolkit-opentracing/src/main/java/org/apache/skywalking/apm/toolkit/opentracing/SkywalkingSpan.java
@@ -1,150 +1,150 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-
-package org.apache.skywalking.apm.toolkit.opentracing;
-
-import io.opentracing.Span;
-import io.opentracing.SpanContext;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * @author wusheng
- */
-public class SkywalkingSpan implements Span {
-    @NeedSnifferActivation(
-        "1.ContextManager#createSpan (Entry,Exit,Local based on builder)." +
-            "2.set the span reference to the dynamic field of enhanced SkywalkingSpan") SkywalkingSpan(
-        SkywalkingSpanBuilder builder) {
-    }
-
-    /**
-     * Create a shell span for {@link SkywalkingTracer#activeSpan()}
-     *
-     * @param tracer
-     */
-    @NeedSnifferActivation(
-        "1. set the span reference to the dynamic field of enhanced SkywalkingSpan")
-    public SkywalkingSpan(SkywalkingTracer tracer) {
-
-    }
-
-    @NeedSnifferActivation("Override span's operationName, which has been given at ")
-    @Override
-    public Span setOperationName(String operationName) {
-        return this;
-    }
-
-    @NeedSnifferActivation("AbstractTracingSpan#log(long timestampMicroseconds, Map<String, ?> fields)")
-    @Override
-    public Span log(long timestampMicroseconds, Map<String, ?> fields) {
-        return this;
-    }
-
-    /**
-     * Stop the active span
-     *
-     * @param finishMicros
-     */
-    @NeedSnifferActivation(
-        "1.ContextManager#stopSpan(AbstractSpan span)" +
-            "2. The parameter of stop methed is from the dynamic field of enhanced SkywalkingSpan")
-    @Override
-    public void finish(long finishMicros) {
-
-    }
-
-    @Override
-    public Span log(long timestampMicroseconds, String event) {
-        Map<String, String> eventMap = new HashMap<String, String>(1);
-        eventMap.put("event", event);
-        return log(timestampMicroseconds, eventMap);
-    }
-
-    @Override
-    public void finish() {
-        this.finish(System.currentTimeMillis());
-    }
-
-    @Override
-    public SpanContext context() {
-        return SkywalkingContext.INSTANCE;
-    }
-
-    @NeedSnifferActivation(
-        "1. ContextManager#activeSpan()" +
-            "2. SkywalkingSpan#setTag(String, String)")
-    @Override public Span setTag(String key, String value) {
-        return this;
-    }
-
-    @Override public Span setTag(String key, boolean value) {
-        return setTag(key, String.valueOf(value));
-    }
-
-    @Override public Span setTag(String key, Number value) {
-        return setTag(key, String.valueOf(value));
-    }
-
-    @Override
-    public Span log(Map<String, ?> fields) {
-        return log(System.currentTimeMillis(), fields);
-    }
-
-    @Override
-    public Span log(String event) {
-        return log(System.currentTimeMillis(), event);
-    }
-
-    /**
-     * Don't support baggage item.
-     */
-    @Override
-    public Span setBaggageItem(String key, String value) {
-        return this;
-    }
-
-    /**
-     * Don't support baggage item.
-     *
-     * @return null, always.
-     */
-    @Override
-    public String getBaggageItem(String key) {
-        return null;
-    }
-
-    /**
-     * Don't support logging with payload.
-     */
-    @Deprecated
-    @Override
-    public Span log(String eventName, Object payload) {
-        return this;
-    }
-
-    /**
-     * Don't support logging with payload.
-     */
-    @Deprecated
-    @Override
-    public Span log(long timestampMicroseconds, String eventName, Object payload) {
-        return this;
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+package org.apache.skywalking.apm.toolkit.opentracing;
+
+import io.opentracing.Span;
+import io.opentracing.SpanContext;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author wusheng
+ */
+public class SkywalkingSpan implements Span {
+    @NeedSnifferActivation(
+        "1.ContextManager#createSpan (Entry,Exit,Local based on builder)." +
+            "2.set the span reference to the dynamic field of enhanced SkywalkingSpan") SkywalkingSpan(
+        SkywalkingSpanBuilder builder) {
+    }
+
+    /**
+     * Create a shell span for {@link SkywalkingTracer#activeSpan()}
+     *
+     * @param tracer
+     */
+    @NeedSnifferActivation(
+        "1. set the span reference to the dynamic field of enhanced SkywalkingSpan")
+    public SkywalkingSpan(SkywalkingTracer tracer) {
+
+    }
+
+    @NeedSnifferActivation("Override span's operationName, which has been given at ")
+    @Override
+    public Span setOperationName(String operationName) {
+        return this;
+    }
+
+    @NeedSnifferActivation("AbstractTracingSpan#log(long timestampMicroseconds, Map<String, ?> fields)")
+    @Override
+    public Span log(long timestampMicroseconds, Map<String, ?> fields) {
+        return this;
+    }
+
+    /**
+     * Stop the active span
+     *
+     * @param finishMicros
+     */
+    @NeedSnifferActivation(
+        "1.ContextManager#stopSpan(AbstractSpan span)" +
+            "2. The parameter of stop methed is from the dynamic field of enhanced SkywalkingSpan")
+    @Override
+    public void finish(long finishMicros) {
+
+    }
+
+    @Override
+    public Span log(long timestampMicroseconds, String event) {
+        Map<String, String> eventMap = new HashMap<String, String>(1);
+        eventMap.put("event", event);
+        return log(timestampMicroseconds, eventMap);
+    }
+
+    @Override
+    public void finish() {
+        this.finish(System.currentTimeMillis());
+    }
+
+    @Override
+    public SpanContext context() {
+        return SkywalkingContext.INSTANCE;
+    }
+
+    @NeedSnifferActivation(
+        "1. ContextManager#activeSpan()" +
+            "2. SkywalkingSpan#setTag(String, String)")
+    @Override public Span setTag(String key, String value) {
+        return this;
+    }
+
+    @Override public Span setTag(String key, boolean value) {
+        return setTag(key, String.valueOf(value));
+    }
+
+    @Override public Span setTag(String key, Number value) {
+        return setTag(key, String.valueOf(value));
+    }
+
+    @Override
+    public Span log(Map<String, ?> fields) {
+        return log(System.currentTimeMillis(), fields);
+    }
+
+    @Override
+    public Span log(String event) {
+        return log(System.currentTimeMillis(), event);
+    }
+
+    /**
+     * Don't support baggage item.
+     */
+    @Override
+    public Span setBaggageItem(String key, String value) {
+        return this;
+    }
+
+    /**
+     * Don't support baggage item.
+     *
+     * @return null, always.
+     */
+    @Override
+    public String getBaggageItem(String key) {
+        return null;
+    }
+
+    /**
+     * Don't support logging with payload.
+     */
+    @Deprecated
+    @Override
+    public Span log(String eventName, Object payload) {
+        return this;
+    }
+
+    /**
+     * Don't support logging with payload.
+     */
+    @Deprecated
+    @Override
+    public Span log(long timestampMicroseconds, String eventName, Object payload) {
+        return this;
+    }
+}
diff --git a/apm-application-toolkit/apm-toolkit-opentracing/src/main/java/org/apache/skywalking/apm/toolkit/opentracing/SkywalkingSpanBuilder.java b/apm-application-toolkit/apm-toolkit-opentracing/src/main/java/org/apache/skywalking/apm/toolkit/opentracing/SkywalkingSpanBuilder.java
index ba7ded3cf..955180b41 100644
--- a/apm-application-toolkit/apm-toolkit-opentracing/src/main/java/org/apache/skywalking/apm/toolkit/opentracing/SkywalkingSpanBuilder.java
+++ b/apm-application-toolkit/apm-toolkit-opentracing/src/main/java/org/apache/skywalking/apm/toolkit/opentracing/SkywalkingSpanBuilder.java
@@ -1,197 +1,197 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-
-package org.apache.skywalking.apm.toolkit.opentracing;
-
-import io.opentracing.ActiveSpan;
-import io.opentracing.BaseSpan;
-import io.opentracing.References;
-import io.opentracing.Span;
-import io.opentracing.SpanContext;
-import io.opentracing.Tracer;
-import io.opentracing.tag.Tags;
-
-import java.util.LinkedList;
-import java.util.List;
-
-/**
- * @author wusheng
- */
-public class SkywalkingSpanBuilder implements Tracer.SpanBuilder {
-    private List<Tag> tags = new LinkedList<Tag>();
-    private String operationName;
-    private boolean isEntry = false;
-    private boolean isExit = false;
-    private int port;
-    private String peer;
-    private String componentName;
-    private boolean isError = false;
-    private long startTime;
-
-    public SkywalkingSpanBuilder(String operationName) {
-        this.operationName = operationName;
-    }
-
-    @Override
-    public Tracer.SpanBuilder asChildOf(SpanContext parent) {
-        if (parent instanceof SkywalkingContext) {
-            return this;
-        }
-        throw new IllegalArgumentException("parent must be type of SpanContext");
-    }
-
-    @Override
-    public Tracer.SpanBuilder asChildOf(BaseSpan<?> parent) {
-        if (parent instanceof SkywalkingSpan || parent instanceof SkywalkingActiveSpan) {
-            return this;
-        }
-        throw new IllegalArgumentException("parent must be type of SkywalkingSpan");
-    }
-
-    /**
-     * Ignore the reference type. the span always the entry or has a parent span.
-     *
-     * @param referenceType
-     * @param referencedContext
-     * @return
-     */
-    @Override
-    public Tracer.SpanBuilder addReference(String referenceType, SpanContext referencedContext) {
-        if (References.FOLLOWS_FROM.equals(referenceType)) {
-            throw new IllegalArgumentException("only support CHILD_OF reference");
-        }
-        return asChildOf(referencedContext);
-    }
-
-    @Override
-    public Tracer.SpanBuilder withTag(String key, String value) {
-        if (Tags.COMPONENT.getKey().equals(key)) {
-            componentName = value;
-        } else if (Tags.SPAN_KIND.getKey().equals(key)) {
-            if (Tags.SPAN_KIND_CLIENT.equals(value) || Tags.SPAN_KIND_PRODUCER.equals(value)) {
-                isEntry = false;
-                isExit = true;
-            } else if (Tags.SPAN_KIND_SERVER.equals(value) || Tags.SPAN_KIND_CONSUMER.equals(value)) {
-                isEntry = true;
-                isExit = false;
-            } else {
-                isEntry = false;
-                isExit = false;
-            }
-        } else if (Tags.PEER_HOST_IPV4.getKey().equals(key) || Tags.PEER_HOST_IPV6.getKey().equals(key)
-                || Tags.PEER_HOSTNAME.getKey().equals(key)) {
-            peer = value;
-        } else if (Tags.PEER_SERVICE.getKey().equals(key)) {
-            operationName = value;
-        } else {
-            tags.add(new Tag(key, value));
-        }
-        return this;
-    }
-
-    @Override
-    public Tracer.SpanBuilder withTag(String key, boolean value) {
-        if (Tags.ERROR.equals(key)) {
-            isError = value;
-        } else {
-            tags.add(new Tag(key, value ? "true" : "false"));
-        }
-        return this;
-    }
-
-    @Override
-    public Tracer.SpanBuilder withTag(String key, Number value) {
-        if (Tags.PEER_PORT.getKey().equals(key)) {
-            port = value.intValue();
-        } else {
-            tags.add(new Tag(key, value.toString()));
-        }
-        return this;
-    }
-
-    @Override
-    public Tracer.SpanBuilder withStartTimestamp(long microseconds) {
-        startTime = microseconds;
-        return this;
-    }
-
-    @Override
-    public ActiveSpan startActive() {
-        return new SkywalkingActiveSpan(new SkywalkingSpan(this));
-    }
-
-    @Override
-    public Span startManual() {
-        return new SkywalkingSpan(this);
-    }
-
-    @Override
-    @Deprecated
-    public Span start() {
-        return startManual();
-    }
-
-    /**
-     * All the get methods are for accessing data from activation
-     */
-    public List<Tag> getTags() {
-        return tags;
-    }
-
-    public String getOperationName() {
-        return operationName;
-    }
-
-    public boolean isEntry() {
-        return isEntry;
-    }
-
-    public boolean isExit() {
-        return isExit;
-    }
-
-    public int getPort() {
-        return port;
-    }
-
-    public String getPeer() {
-        return peer;
-    }
-
-    public String getComponentName() {
-        return componentName;
-    }
-
-    public boolean isError() {
-        return isError;
-    }
-
-    public long getStartTime() {
-        return startTime;
-    }
-
-    /**
-     * All the following methods are needed for activation.
-     */
-    @Override
-    @NeedSnifferActivation("Stop the active span.")
-    public Tracer.SpanBuilder ignoreActiveSpan() {
-        return this;
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+package org.apache.skywalking.apm.toolkit.opentracing;
+
+import io.opentracing.ActiveSpan;
+import io.opentracing.BaseSpan;
+import io.opentracing.References;
+import io.opentracing.Span;
+import io.opentracing.SpanContext;
+import io.opentracing.Tracer;
+import io.opentracing.tag.Tags;
+
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * @author wusheng
+ */
+public class SkywalkingSpanBuilder implements Tracer.SpanBuilder {
+    private List<Tag> tags = new LinkedList<Tag>();
+    private String operationName;
+    private boolean isEntry = false;
+    private boolean isExit = false;
+    private int port;
+    private String peer;
+    private String componentName;
+    private boolean isError = false;
+    private long startTime;
+
+    public SkywalkingSpanBuilder(String operationName) {
+        this.operationName = operationName;
+    }
+
+    @Override
+    public Tracer.SpanBuilder asChildOf(SpanContext parent) {
+        if (parent instanceof SkywalkingContext) {
+            return this;
+        }
+        throw new IllegalArgumentException("parent must be type of SpanContext");
+    }
+
+    @Override
+    public Tracer.SpanBuilder asChildOf(BaseSpan<?> parent) {
+        if (parent instanceof SkywalkingSpan || parent instanceof SkywalkingActiveSpan) {
+            return this;
+        }
+        throw new IllegalArgumentException("parent must be type of SkywalkingSpan");
+    }
+
+    /**
+     * Ignore the reference type. the span always the entry or has a parent span.
+     *
+     * @param referenceType
+     * @param referencedContext
+     * @return
+     */
+    @Override
+    public Tracer.SpanBuilder addReference(String referenceType, SpanContext referencedContext) {
+        if (References.FOLLOWS_FROM.equals(referenceType)) {
+            throw new IllegalArgumentException("only support CHILD_OF reference");
+        }
+        return asChildOf(referencedContext);
+    }
+
+    @Override
+    public Tracer.SpanBuilder withTag(String key, String value) {
+        if (Tags.COMPONENT.getKey().equals(key)) {
+            componentName = value;
+        } else if (Tags.SPAN_KIND.getKey().equals(key)) {
+            if (Tags.SPAN_KIND_CLIENT.equals(value) || Tags.SPAN_KIND_PRODUCER.equals(value)) {
+                isEntry = false;
+                isExit = true;
+            } else if (Tags.SPAN_KIND_SERVER.equals(value) || Tags.SPAN_KIND_CONSUMER.equals(value)) {
+                isEntry = true;
+                isExit = false;
+            } else {
+                isEntry = false;
+                isExit = false;
+            }
+        } else if (Tags.PEER_HOST_IPV4.getKey().equals(key) || Tags.PEER_HOST_IPV6.getKey().equals(key)
+                || Tags.PEER_HOSTNAME.getKey().equals(key)) {
+            peer = value;
+        } else if (Tags.PEER_SERVICE.getKey().equals(key)) {
+            operationName = value;
+        } else {
+            tags.add(new Tag(key, value));
+        }
+        return this;
+    }
+
+    @Override
+    public Tracer.SpanBuilder withTag(String key, boolean value) {
+        if (Tags.ERROR.equals(key)) {
+            isError = value;
+        } else {
+            tags.add(new Tag(key, value ? "true" : "false"));
+        }
+        return this;
+    }
+
+    @Override
+    public Tracer.SpanBuilder withTag(String key, Number value) {
+        if (Tags.PEER_PORT.getKey().equals(key)) {
+            port = value.intValue();
+        } else {
+            tags.add(new Tag(key, value.toString()));
+        }
+        return this;
+    }
+
+    @Override
+    public Tracer.SpanBuilder withStartTimestamp(long microseconds) {
+        startTime = microseconds;
+        return this;
+    }
+
+    @Override
+    public ActiveSpan startActive() {
+        return new SkywalkingActiveSpan(new SkywalkingSpan(this));
+    }
+
+    @Override
+    public Span startManual() {
+        return new SkywalkingSpan(this);
+    }
+
+    @Override
+    @Deprecated
+    public Span start() {
+        return startManual();
+    }
+
+    /**
+     * All the get methods are for accessing data from activation
+     */
+    public List<Tag> getTags() {
+        return tags;
+    }
+
+    public String getOperationName() {
+        return operationName;
+    }
+
+    public boolean isEntry() {
+        return isEntry;
+    }
+
+    public boolean isExit() {
+        return isExit;
+    }
+
+    public int getPort() {
+        return port;
+    }
+
+    public String getPeer() {
+        return peer;
+    }
+
+    public String getComponentName() {
+        return componentName;
+    }
+
+    public boolean isError() {
+        return isError;
+    }
+
+    public long getStartTime() {
+        return startTime;
+    }
+
+    /**
+     * All the following methods are needed for activation.
+     */
+    @Override
+    @NeedSnifferActivation("Stop the active span.")
+    public Tracer.SpanBuilder ignoreActiveSpan() {
+        return this;
+    }
+}
diff --git a/apm-application-toolkit/apm-toolkit-opentracing/src/main/java/org/apache/skywalking/apm/toolkit/opentracing/SkywalkingTracer.java b/apm-application-toolkit/apm-toolkit-opentracing/src/main/java/org/apache/skywalking/apm/toolkit/opentracing/SkywalkingTracer.java
index 96d1324d2..4149bb015 100644
--- a/apm-application-toolkit/apm-toolkit-opentracing/src/main/java/org/apache/skywalking/apm/toolkit/opentracing/SkywalkingTracer.java
+++ b/apm-application-toolkit/apm-toolkit-opentracing/src/main/java/org/apache/skywalking/apm/toolkit/opentracing/SkywalkingTracer.java
@@ -1,62 +1,62 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-
-package org.apache.skywalking.apm.toolkit.opentracing;
-
-import io.opentracing.ActiveSpan;
-import io.opentracing.Span;
-import io.opentracing.SpanContext;
-import io.opentracing.Tracer;
-import io.opentracing.propagation.Format;
-
-/**
- * @author wusheng
- */
-public class SkywalkingTracer implements Tracer {
-
-    public SpanBuilder buildSpan(String operationName) {
-        return new SkywalkingSpanBuilder(operationName);
-    }
-
-    @NeedSnifferActivation
-    @Override
-    public <C> void inject(SpanContext spanContext, Format<C> format, C carrier) {
-
-    }
-
-    @NeedSnifferActivation
-    @Override
-    public <C> SpanContext extract(Format<C> format, C carrier) {
-        return new SkywalkingContext();
-    }
-
-    @Override
-    public ActiveSpan activeSpan() {
-        return new SkywalkingActiveSpan(new SkywalkingSpan(this));
-    }
-
-    @Override
-    public ActiveSpan makeActive(Span span) {
-        if (span instanceof SkywalkingSpan) {
-            return new SkywalkingActiveSpan((SkywalkingSpan)span);
-        } else {
-            throw new IllegalArgumentException("span must be a type of SkywalkingSpan");
-        }
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+package org.apache.skywalking.apm.toolkit.opentracing;
+
+import io.opentracing.ActiveSpan;
+import io.opentracing.Span;
+import io.opentracing.SpanContext;
+import io.opentracing.Tracer;
+import io.opentracing.propagation.Format;
+
+/**
+ * @author wusheng
+ */
+public class SkywalkingTracer implements Tracer {
+
+    public SpanBuilder buildSpan(String operationName) {
+        return new SkywalkingSpanBuilder(operationName);
+    }
+
+    @NeedSnifferActivation
+    @Override
+    public <C> void inject(SpanContext spanContext, Format<C> format, C carrier) {
+
+    }
+
+    @NeedSnifferActivation
+    @Override
+    public <C> SpanContext extract(Format<C> format, C carrier) {
+        return new SkywalkingContext();
+    }
+
+    @Override
+    public ActiveSpan activeSpan() {
+        return new SkywalkingActiveSpan(new SkywalkingSpan(this));
+    }
+
+    @Override
+    public ActiveSpan makeActive(Span span) {
+        if (span instanceof SkywalkingSpan) {
+            return new SkywalkingActiveSpan((SkywalkingSpan)span);
+        } else {
+            throw new IllegalArgumentException("span must be a type of SkywalkingSpan");
+        }
+    }
+}
diff --git a/apm-application-toolkit/apm-toolkit-opentracing/src/main/java/org/apache/skywalking/apm/toolkit/opentracing/Tag.java b/apm-application-toolkit/apm-toolkit-opentracing/src/main/java/org/apache/skywalking/apm/toolkit/opentracing/Tag.java
index cc3f8ede3..848c63a42 100644
--- a/apm-application-toolkit/apm-toolkit-opentracing/src/main/java/org/apache/skywalking/apm/toolkit/opentracing/Tag.java
+++ b/apm-application-toolkit/apm-toolkit-opentracing/src/main/java/org/apache/skywalking/apm/toolkit/opentracing/Tag.java
@@ -1,41 +1,41 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-
-package org.apache.skywalking.apm.toolkit.opentracing;
-
-/**
- * @author wusheng
- */
-public class Tag {
-    private String key;
-    private String value;
-
-    public Tag(String key, String value) {
-        this.key = key;
-        this.value = value;
-    }
-
-    public String getKey() {
-        return key;
-    }
-
-    public String getValue() {
-        return value;
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+package org.apache.skywalking.apm.toolkit.opentracing;
+
+/**
+ * @author wusheng
+ */
+public class Tag {
+    private String key;
+    private String value;
+
+    public Tag(String key, String value) {
+        this.key = key;
+        this.value = value;
+    }
+
+    public String getKey() {
+        return key;
+    }
+
+    public String getValue() {
+        return value;
+    }
+}
diff --git a/apm-application-toolkit/apm-toolkit-opentracing/src/main/java/org/apache/skywalking/apm/toolkit/opentracing/TextMapContext.java b/apm-application-toolkit/apm-toolkit-opentracing/src/main/java/org/apache/skywalking/apm/toolkit/opentracing/TextMapContext.java
index 471989198..e1af473b3 100644
--- a/apm-application-toolkit/apm-toolkit-opentracing/src/main/java/org/apache/skywalking/apm/toolkit/opentracing/TextMapContext.java
+++ b/apm-application-toolkit/apm-toolkit-opentracing/src/main/java/org/apache/skywalking/apm/toolkit/opentracing/TextMapContext.java
@@ -1,37 +1,37 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-
-package org.apache.skywalking.apm.toolkit.opentracing;
-
-import io.opentracing.SpanContext;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Created by wusheng on 2016/12/21.
- */
-public class TextMapContext implements SpanContext {
-    public TextMapContext() {
-    }
-
-    @Override
-    public Iterable<Map.Entry<String, String>> baggageItems() {
-        return new HashMap<String, String>(0).entrySet();
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+package org.apache.skywalking.apm.toolkit.opentracing;
+
+import io.opentracing.SpanContext;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Created by wusheng on 2016/12/21.
+ */
+public class TextMapContext implements SpanContext {
+    public TextMapContext() {
+    }
+
+    @Override
+    public Iterable<Map.Entry<String, String>> baggageItems() {
+        return new HashMap<String, String>(0).entrySet();
+    }
+}
diff --git a/apm-application-toolkit/apm-toolkit-opentracing/src/main/resources/META-INF.services/io.opentracing.Tracer b/apm-application-toolkit/apm-toolkit-opentracing/src/main/resources/META-INF.services/io.opentracing.Tracer
index 894da6a64..d85250400 100644
--- a/apm-application-toolkit/apm-toolkit-opentracing/src/main/resources/META-INF.services/io.opentracing.Tracer
+++ b/apm-application-toolkit/apm-toolkit-opentracing/src/main/resources/META-INF.services/io.opentracing.Tracer
@@ -1,19 +1,19 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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.
-#
-#
-
-org.apache.skywalking.apm.toolkit.opentracing.SkyWalkingTracer
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+#
+#
+
+org.apache.skywalking.apm.toolkit.opentracing.SkyWalkingTracer
diff --git a/apm-application-toolkit/apm-toolkit-trace/pom.xml b/apm-application-toolkit/apm-toolkit-trace/pom.xml
index ad28aaead..e8ea953c9 100644
--- a/apm-application-toolkit/apm-toolkit-trace/pom.xml
+++ b/apm-application-toolkit/apm-toolkit-trace/pom.xml
@@ -1,53 +1,53 @@
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You 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.
-  ~
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>apm-application-toolkit</artifactId>
-        <groupId>org.apache.skywalking</groupId>
-        <version>5.0.0-beta2-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>apm-toolkit-trace</artifactId>
-    <packaging>jar</packaging>
-
-    <url>http://maven.apache.org</url>
-
-    <build>
-        <plugins>
-            <plugin>
-                <!-- 源码插件 -->
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-source-plugin</artifactId>
-                <!-- 发布时自动将源码同时发布的配置 -->
-                <executions>
-                    <execution>
-                        <id>attach-sources</id>
-                        <phase>none</phase>
-                        <goals>
-                            <goal>jar</goal>
-                        </goals>
-                    </execution>
-                </executions>
-                <version>2.4</version>
-            </plugin>
-        </plugins>
-    </build>
-
-</project>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You 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.
+  ~
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>apm-application-toolkit</artifactId>
+        <groupId>org.apache.skywalking</groupId>
+        <version>5.0.0-beta2-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>apm-toolkit-trace</artifactId>
+    <packaging>jar</packaging>
+
+    <url>http://maven.apache.org</url>
+
+    <build>
+        <plugins>
+            <plugin>
+                <!-- 源码插件 -->
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-source-plugin</artifactId>
+                <!-- 发布时自动将源码同时发布的配置 -->
+                <executions>
+                    <execution>
+                        <id>attach-sources</id>
+                        <phase>none</phase>
+                        <goals>
+                            <goal>jar</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <version>2.4</version>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
diff --git a/apm-application-toolkit/apm-toolkit-trace/src/main/java/org/apache/skywalking/apm/toolkit/trace/ActiveSpan.java b/apm-application-toolkit/apm-toolkit-trace/src/main/java/org/apache/skywalking/apm/toolkit/trace/ActiveSpan.java
index 0c6e4956c..a1c985623 100644
--- a/apm-application-toolkit/apm-toolkit-trace/src/main/java/org/apache/skywalking/apm/toolkit/trace/ActiveSpan.java
+++ b/apm-application-toolkit/apm-toolkit-trace/src/main/java/org/apache/skywalking/apm/toolkit/trace/ActiveSpan.java
@@ -1,35 +1,35 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-
-package org.apache.skywalking.apm.toolkit.trace;
-
-/**
- * provide custom api that set tag for current active span.
- *
- * @author zhangxin
- */
-public class ActiveSpan {
-    /**
-     * @param key tag key
-     * @param value tag value
-     */
-    public static void tag(String key, String value) {
-
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+package org.apache.skywalking.apm.toolkit.trace;
+
+/**
+ * provide custom api that set tag for current active span.
+ *
+ * @author zhangxin
+ */
+public class ActiveSpan {
+    /**
+     * @param key tag key
+     * @param value tag value
+     */
+    public static void tag(String key, String value) {
+
+    }
+}
diff --git a/apm-application-toolkit/apm-toolkit-trace/src/main/java/org/apache/skywalking/apm/toolkit/trace/CallableWrapper.java b/apm-application-toolkit/apm-toolkit-trace/src/main/java/org/apache/skywalking/apm/toolkit/trace/CallableWrapper.java
index 32c8f31c9..f75b8a052 100644
--- a/apm-application-toolkit/apm-toolkit-trace/src/main/java/org/apache/skywalking/apm/toolkit/trace/CallableWrapper.java
+++ b/apm-application-toolkit/apm-toolkit-trace/src/main/java/org/apache/skywalking/apm/toolkit/trace/CallableWrapper.java
@@ -1,41 +1,41 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.apache.skywalking.apm.toolkit.trace;
-
-import java.util.concurrent.Callable;
-
-/**
- * @author carlvine500
- */
-@TraceCrossThread
-public class CallableWrapper<V> implements Callable<V> {
-    final Callable<V> callable;
-
-    public static <V> CallableWrapper of(Callable<V> r) {
-        return new CallableWrapper<V>(r);
-    }
-
-    public CallableWrapper(Callable<V> callable) {
-        this.callable = callable;
-    }
-
-    @Override
-    public V call() throws Exception {
-        return callable.call();
-    }
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.skywalking.apm.toolkit.trace;
+
+import java.util.concurrent.Callable;
+
+/**
+ * @author carlvine500
+ */
+@TraceCrossThread
+public class CallableWrapper<V> implements Callable<V> {
+    final Callable<V> callable;
+
+    public static <V> CallableWrapper of(Callable<V> r) {
+        return new CallableWrapper<V>(r);
+    }
+
+    public CallableWrapper(Callable<V> callable) {
+        this.callable = callable;
+    }
+
+    @Override
+    public V call() throws Exception {
+        return callable.call();
+    }
 }
\ No newline at end of file
diff --git a/apm-application-toolkit/apm-toolkit-trace/src/main/java/org/apache/skywalking/apm/toolkit/trace/RunnableWrapper.java b/apm-application-toolkit/apm-toolkit-trace/src/main/java/org/apache/skywalking/apm/toolkit/trace/RunnableWrapper.java
index 60cd912dc..cdca4fa3b 100644
--- a/apm-application-toolkit/apm-toolkit-trace/src/main/java/org/apache/skywalking/apm/toolkit/trace/RunnableWrapper.java
+++ b/apm-application-toolkit/apm-toolkit-trace/src/main/java/org/apache/skywalking/apm/toolkit/trace/RunnableWrapper.java
@@ -1,39 +1,39 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.skywalking.apm.toolkit.trace;
-
-/**
- * @author lican
- */
-@TraceCrossThread
-public class RunnableWrapper implements Runnable {
-    final Runnable runnable;
-
-    public RunnableWrapper(Runnable runnable) {
-        this.runnable = runnable;
-    }
-
-    public static RunnableWrapper of(Runnable r) {
-        return new RunnableWrapper(r);
-    }
-
-
-    @Override
-    public void run() {
-        this.runnable.run();
-    }
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.skywalking.apm.toolkit.trace;
+
+/**
+ * @author lican
+ */
+@TraceCrossThread
+public class RunnableWrapper implements Runnable {
+    final Runnable runnable;
+
+    public RunnableWrapper(Runnable runnable) {
+        this.runnable = runnable;
+    }
+
+    public static RunnableWrapper of(Runnable r) {
+        return new RunnableWrapper(r);
+    }
+
+
+    @Override
+    public void run() {
+        this.runnable.run();
+    }
 }
\ No newline at end of file
diff --git a/apm-application-toolkit/apm-toolkit-trace/src/main/java/org/apache/skywalking/apm/toolkit/trace/Trace.java b/apm-application-toolkit/apm-toolkit-trace/src/main/java/org/apache/skywalking/apm/toolkit/trace/Trace.java
index b76236db9..50f32c6a6 100644
--- a/apm-application-toolkit/apm-toolkit-trace/src/main/java/org/apache/skywalking/apm/toolkit/trace/Trace.java
+++ b/apm-application-toolkit/apm-toolkit-trace/src/main/java/org/apache/skywalking/apm/toolkit/trace/Trace.java
@@ -1,41 +1,41 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-
-package org.apache.skywalking.apm.toolkit.trace;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * The agent create local span if the method that annotation with {@link Trace}. The value of span operation name will
- * fetch by {@link #operationName()}.  if the value of {@link #operationName()} is blank string. the operation name will
- * be set the class name + method name.
- *
- * @author zhangxin
- */
-@Target(ElementType.METHOD)
-@Retention(RetentionPolicy.RUNTIME)
-public @interface Trace {
-    /**
-     * @return operation name, the default value is blank string.
-     */
-    String operationName() default "";
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+package org.apache.skywalking.apm.toolkit.trace;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * The agent create local span if the method that annotation with {@link Trace}. The value of span operation name will
+ * fetch by {@link #operationName()}.  if the value of {@link #operationName()} is blank string. the operation name will
+ * be set the class name + method name.
+ *
+ * @author zhangxin
+ */
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Trace {
+    /**
+     * @return operation name, the default value is blank string.
+     */
+    String operationName() default "";
+}
diff --git a/apm-application-toolkit/apm-toolkit-trace/src/main/java/org/apache/skywalking/apm/toolkit/trace/TraceContext.java b/apm-application-toolkit/apm-toolkit-trace/src/main/java/org/apache/skywalking/apm/toolkit/trace/TraceContext.java
index a890b6fa8..ca7f64048 100644
--- a/apm-application-toolkit/apm-toolkit-trace/src/main/java/org/apache/skywalking/apm/toolkit/trace/TraceContext.java
+++ b/apm-application-toolkit/apm-toolkit-trace/src/main/java/org/apache/skywalking/apm/toolkit/trace/TraceContext.java
@@ -1,40 +1,40 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-
-package org.apache.skywalking.apm.toolkit.trace;
-
-/**
- * Try to access the sky-walking tracer context.
- * The context is not existed, always.
- * only the middleware, component, or rpc-framework are supported in the current invoke stack, in the same thread,
- * the context will be available.
- * <p>
- * Created by xin on 2016/12/15.
- */
-public class TraceContext {
-
-    /**
-     * Try to get the traceId of current trace context.
-     *
-     * @return traceId, if it exists, or empty {@link String}.
-     */
-    public static String traceId() {
-        return "";
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+package org.apache.skywalking.apm.toolkit.trace;
+
+/**
+ * Try to access the sky-walking tracer context.
+ * The context is not existed, always.
+ * only the middleware, component, or rpc-framework are supported in the current invoke stack, in the same thread,
+ * the context will be available.
+ * <p>
+ * Created by xin on 2016/12/15.
+ */
+public class TraceContext {
+
+    /**
+     * Try to get the traceId of current trace context.
+     *
+     * @return traceId, if it exists, or empty {@link String}.
+     */
+    public static String traceId() {
+        return "";
+    }
+}
diff --git a/apm-application-toolkit/apm-toolkit-trace/src/main/java/org/apache/skywalking/apm/toolkit/trace/TraceCrossThread.java b/apm-application-toolkit/apm-toolkit-trace/src/main/java/org/apache/skywalking/apm/toolkit/trace/TraceCrossThread.java
index 1eaf87a3a..c8a9bc1a6 100644
--- a/apm-application-toolkit/apm-toolkit-trace/src/main/java/org/apache/skywalking/apm/toolkit/trace/TraceCrossThread.java
+++ b/apm-application-toolkit/apm-toolkit-trace/src/main/java/org/apache/skywalking/apm/toolkit/trace/TraceCrossThread.java
@@ -1,32 +1,32 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.apache.skywalking.apm.toolkit.trace;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * @author carlvine500
- */
-@Target(ElementType.TYPE)
-@Retention(RetentionPolicy.RUNTIME)
-public @interface TraceCrossThread {
-
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.skywalking.apm.toolkit.trace;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * @author carlvine500
+ */
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface TraceCrossThread {
+
 }
\ No newline at end of file
diff --git a/apm-application-toolkit/pom.xml b/apm-application-toolkit/pom.xml
index a91447da9..92be4b653 100644
--- a/apm-application-toolkit/pom.xml
+++ b/apm-application-toolkit/pom.xml
@@ -1,40 +1,40 @@
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You 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.
-  ~
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <parent>
-        <artifactId>apm</artifactId>
-        <groupId>org.apache.skywalking</groupId>
-        <version>5.0.0-beta2-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>apm-application-toolkit</artifactId>
-    <packaging>pom</packaging>
-
-    <properties>
-        <compiler.version>1.6</compiler.version>
-    </properties>
-
-    <modules>
-        <module>apm-toolkit-log4j-1.x</module>
-        <module>apm-toolkit-log4j-2.x</module>
-        <module>apm-toolkit-logback-1.x</module>
-        <module>apm-toolkit-opentracing</module>
-        <module>apm-toolkit-trace</module>
-    </modules>
-</project>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You 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.
+  ~
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <parent>
+        <artifactId>apm</artifactId>
+        <groupId>org.apache.skywalking</groupId>
+        <version>5.0.0-beta2-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>apm-application-toolkit</artifactId>
+    <packaging>pom</packaging>
+
+    <properties>
+        <compiler.version>1.6</compiler.version>
+    </properties>
+
+    <modules>
+        <module>apm-toolkit-log4j-1.x</module>
+        <module>apm-toolkit-log4j-2.x</module>
+        <module>apm-toolkit-logback-1.x</module>
+        <module>apm-toolkit-opentracing</module>
+        <module>apm-toolkit-trace</module>
+    </modules>
+</project>
diff --git a/apm-checkstyle/pom.xml b/apm-checkstyle/pom.xml
index 387be9e97..c08e1d58f 100644
--- a/apm-checkstyle/pom.xml
+++ b/apm-checkstyle/pom.xml
@@ -1,62 +1,62 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You 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.
-  ~
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <groupId>org.apache</groupId>
-        <artifactId>apache</artifactId>
-        <version>19</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <groupId>org.apache.skywalking</groupId>
-    <artifactId>apm-checkstyle</artifactId>
-    <version>5.0.0-beta2-SNAPSHOT</version>
-    <description>Module to hold Checkstyle for SkyWalking.</description>
-
-    <build>
-        <plugins>
-            <!-- 覆盖率 -->
-            <plugin>
-                <groupId>org.jacoco</groupId>
-                <artifactId>jacoco-maven-plugin</artifactId>
-                <version>0.7.9</version>
-                <executions>
-                    <execution>
-                        <id>prepare-agent</id>
-                        <goals>
-                            <goal>prepare-agent</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.eluder.coveralls</groupId>
-                <artifactId>coveralls-maven-plugin</artifactId>
-                <version>4.1.0</version>
-                <configuration>
-                    <repoToken>xFwR2GqmxcMxV7tGEpW2NfwIrbCD4cQCS</repoToken>
-                    <sourceDirectories>
-                        <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
-                    </sourceDirectories>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-</project>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You 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.
+  ~
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <groupId>org.apache</groupId>
+        <artifactId>apache</artifactId>
+        <version>19</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>org.apache.skywalking</groupId>
+    <artifactId>apm-checkstyle</artifactId>
+    <version>5.0.0-beta2-SNAPSHOT</version>
+    <description>Module to hold Checkstyle for SkyWalking.</description>
+
+    <build>
+        <plugins>
+            <!-- 覆盖率 -->
+            <plugin>
+                <groupId>org.jacoco</groupId>
+                <artifactId>jacoco-maven-plugin</artifactId>
+                <version>0.7.9</version>
+                <executions>
+                    <execution>
+                        <id>prepare-agent</id>
+                        <goals>
+                            <goal>prepare-agent</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.eluder.coveralls</groupId>
+                <artifactId>coveralls-maven-plugin</artifactId>
+                <version>4.1.0</version>
+                <configuration>
+                    <repoToken>xFwR2GqmxcMxV7tGEpW2NfwIrbCD4cQCS</repoToken>
+                    <sourceDirectories>
+                        <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
+                    </sourceDirectories>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/apm-checkstyle/src/main/resources/skywalking/CHECKSTYLE_HEAD b/apm-checkstyle/src/main/resources/skywalking/CHECKSTYLE_HEAD
index 70774e004..11390489e 100644
--- a/apm-checkstyle/src/main/resources/skywalking/CHECKSTYLE_HEAD
+++ b/apm-checkstyle/src/main/resources/skywalking/CHECKSTYLE_HEAD
@@ -1,17 +1,17 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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.
- *
- */
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
diff --git a/apm-checkstyle/src/main/resources/skywalking/checkStyle.xml b/apm-checkstyle/src/main/resources/skywalking/checkStyle.xml
index 913484e56..15df2b533 100644
--- a/apm-checkstyle/src/main/resources/skywalking/checkStyle.xml
+++ b/apm-checkstyle/src/main/resources/skywalking/checkStyle.xml
@@ -1,108 +1,108 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You 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.
-  ~
-  -->
-
-<!DOCTYPE module PUBLIC
-    "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
-    "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
-<!--Refer http://checkstyle.sourceforge.net/reports/google-java-style.html#s2.2-file-encoding -->
-<module name="Checker">
-
-    <property name="localeLanguage" value="en"/>
-
-    <!--To configure the check to report on the first instance in each file-->
-    <module name="FileTabCharacter"/>
-
-    <module name="RegexpSingleline">
-        <property name="format" value="System\.out\.println"/>
-        <property name="message" value="Prohibit invoking System.out.println in source code !"/>
-    </module>
-
-    <module name="RegexpSingleline">
-        <property name="format"
-                  value=".*[\u3400-\u4DB5\u4E00-\u9FA5\u9FA6-\u9FBB\uF900-\uFA2D\uFA30-\uFA6A\uFA70-\uFAD9\uFF00-\uFFEF\u2E80-\u2EFF\u3000-\u303F\u31C0-\u31EF]+.*"/>
-        <property name="message" value="Not allow chinese character !"/>
-    </module>
-
-    <module name="FileLength">
-        <property name="max" value="3000"/>
-    </module>
-
-    <module name="TreeWalker">
-
-        <module name="UnusedImports">
-            <property name="processJavadoc" value="true"/>
-        </module>
-        <module name="RedundantImport"/>
-
-        <!--Checks that classes that override equals() also override hashCode()-->
-        <module name="EqualsHashCode"/>
-        <!--Checks for over-complicated boolean expressions. Currently finds code like if (topic == true), topic || true, !false, etc.-->
-        <module name="SimplifyBooleanExpression"/>
-        <module name="OneStatementPerLine"/>
-        <module name="UnnecessaryParentheses"/>
-        <!--Checks for over-complicated boolean return statements. For example the following code-->
-        <module name="SimplifyBooleanReturn"/>
-
-        <!--Check that the default is after all the cases in producerGroup switch statement-->
-        <module name="DefaultComesLast"/>
-        <!--Detects empty statements (standalone ";" semicolon)-->
-        <module name="EmptyStatement"/>
-        <!--Checks that long constants are defined with an upper ell-->
-        <module name="UpperEll"/>
-        <module name="ConstantName">
-            <property name="format" value="(^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$)|(^logger)"/>
-        </module>
-        <!--Checks that local, non-final variable names conform to producerGroup format specified by the format property-->
-        <module name="LocalVariableName"/>
-        <!--Validates identifiers for local, final variables, including catch parameters-->
-        <module name="LocalFinalVariableName"/>
-        <!--Validates identifiers for non-static fields-->
-        <module name="MemberName"/>
-        <!--Validates identifiers for class type parameters-->
-        <module name="ClassTypeParameterName">
-            <property name="format" value="(^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$)"/>
-        </module>
-        <!--Validates identifiers for method type parameters-->
-        <module name="MethodTypeParameterName">
-            <property name="format" value="(^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$)"/>
-        </module>
-        <module name="PackageName"/>
-        <module name="ParameterName"/>
-        <module name="StaticVariableName">
-            <property name="format" value="(^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$)"/>
-        </module>
-        <module name="TypeName">
-            <property name="format" value="(^[A-Z][a-zA-Z0-9]*$)|(^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$)"/>
-        </module>
-
-        <!--whitespace-->
-        <module name="GenericWhitespace"/>
-        <module name="NoWhitespaceBefore"/>
-        <module name="NoWhitespaceAfter"/>
-        <module name="WhitespaceAround">
-            <property name="allowEmptyConstructors" value="true"/>
-            <property name="allowEmptyMethods" value="true"/>
-        </module>
-        <module name="Indentation"/>
-        <module name="MethodParamPad"/>
-        <module name="ParenPad"/>
-        <module name="TypecastParenPad"/>
-        <module name="TypecastParenPad"/>
-    </module>
-</module>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You 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.
+  ~
+  -->
+
+<!DOCTYPE module PUBLIC
+    "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
+    "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
+<!--Refer http://checkstyle.sourceforge.net/reports/google-java-style.html#s2.2-file-encoding -->
+<module name="Checker">
+
+    <property name="localeLanguage" value="en"/>
+
+    <!--To configure the check to report on the first instance in each file-->
+    <module name="FileTabCharacter"/>
+
+    <module name="RegexpSingleline">
+        <property name="format" value="System\.out\.println"/>
+        <property name="message" value="Prohibit invoking System.out.println in source code !"/>
+    </module>
+
+    <module name="RegexpSingleline">
+        <property name="format"
+                  value=".*[\u3400-\u4DB5\u4E00-\u9FA5\u9FA6-\u9FBB\uF900-\uFA2D\uFA30-\uFA6A\uFA70-\uFAD9\uFF00-\uFFEF\u2E80-\u2EFF\u3000-\u303F\u31C0-\u31EF]+.*"/>
+        <property name="message" value="Not allow chinese character !"/>
+    </module>
+
+    <module name="FileLength">
+        <property name="max" value="3000"/>
+    </module>
+
+    <module name="TreeWalker">
+
+        <module name="UnusedImports">
+            <property name="processJavadoc" value="true"/>
+        </module>
+        <module name="RedundantImport"/>
+
+        <!--Checks that classes that override equals() also override hashCode()-->
+        <module name="EqualsHashCode"/>
+        <!--Checks for over-complicated boolean expressions. Currently finds code like if (topic == true), topic || true, !false, etc.-->
+        <module name="SimplifyBooleanExpression"/>
+        <module name="OneStatementPerLine"/>
+        <module name="UnnecessaryParentheses"/>
+        <!--Checks for over-complicated boolean return statements. For example the following code-->
+        <module name="SimplifyBooleanReturn"/>
+
+        <!--Check that the default is after all the cases in producerGroup switch statement-->
+        <module name="DefaultComesLast"/>
+        <!--Detects empty statements (standalone ";" semicolon)-->
+        <module name="EmptyStatement"/>
+        <!--Checks that long constants are defined with an upper ell-->
+        <module name="UpperEll"/>
+        <module name="ConstantName">
+            <property name="format" value="(^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$)|(^logger)"/>
+        </module>
+        <!--Checks that local, non-final variable names conform to producerGroup format specified by the format property-->
+        <module name="LocalVariableName"/>
+        <!--Validates identifiers for local, final variables, including catch parameters-->
+        <module name="LocalFinalVariableName"/>
+        <!--Validates identifiers for non-static fields-->
+        <module name="MemberName"/>
+        <!--Validates identifiers for class type parameters-->
+        <module name="ClassTypeParameterName">
+            <property name="format" value="(^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$)"/>
+        </module>
+        <!--Validates identifiers for method type parameters-->
+        <module name="MethodTypeParameterName">
+            <property name="format" value="(^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$)"/>
+        </module>
+        <module name="PackageName"/>
+        <module name="ParameterName"/>
+        <module name="StaticVariableName">
+            <property name="format" value="(^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$)"/>
+        </module>
+        <module name="TypeName">
+            <property name="format" value="(^[A-Z][a-zA-Z0-9]*$)|(^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$)"/>
+        </module>
+
+        <!--whitespace-->
+        <module name="GenericWhitespace"/>
+        <module name="NoWhitespaceBefore"/>
+        <module name="NoWhitespaceAfter"/>
+        <module name="WhitespaceAround">
+            <property name="allowEmptyConstructors" value="true"/>
+            <property name="allowEmptyMethods" value="true"/>
+        </module>
+        <module name="Indentation"/>
+        <module name="MethodParamPad"/>
+        <module name="ParenPad"/>
+        <module name="TypecastParenPad"/>
+        <module name="TypecastParenPad"/>
+    </module>
+</module>
diff --git a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-define/pom.xml b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-define/pom.xml
index fa4ca292a..8edcad507 100644
--- a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-define/pom.xml
+++ b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-define/pom.xml
@@ -1,31 +1,31 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You 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.
-  ~
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>agent-grpc</artifactId>
-        <groupId>org.apache.skywalking</groupId>
-        <version>5.0.0-beta2-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>agent-grpc-define</artifactId>
-    <packaging>jar</packaging>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You 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.
+  ~
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>agent-grpc</artifactId>
+        <groupId>org.apache.skywalking</groupId>
+        <version>5.0.0-beta2-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>agent-grpc-define</artifactId>
+    <packaging>jar</packaging>
 </project>
\ No newline at end of file
diff --git a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-define/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/define/AgentGRPCModule.java b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-define/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/define/AgentGRPCModule.java
index 3c519c0da..2fc2eabe1 100644
--- a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-define/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/define/AgentGRPCModule.java
+++ b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-define/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/define/AgentGRPCModule.java
@@ -1,38 +1,38 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-
-package org.apache.skywalking.apm.collector.agent.grpc.define;
-
-import org.apache.skywalking.apm.collector.core.module.ModuleDefine;
-
-/**
- * @author peng-yongsheng
- */
-public class AgentGRPCModule extends ModuleDefine {
-
-    public static final String NAME = "agent_gRPC";
-
-    @Override public String name() {
-        return NAME;
-    }
-
-    @Override public Class[] services() {
-        return new Class[0];
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+package org.apache.skywalking.apm.collector.agent.grpc.define;
+
+import org.apache.skywalking.apm.collector.core.module.ModuleDefine;
+
+/**
+ * @author peng-yongsheng
+ */
+public class AgentGRPCModule extends ModuleDefine {
+
+    public static final String NAME = "agent_gRPC";
+
+    @Override public String name() {
+        return NAME;
+    }
+
+    @Override public Class[] services() {
+        return new Class[0];
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-define/src/main/resources/META-INF/services/org.apache.skywalking.apm.collector.core.module.ModuleDefine b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-define/src/main/resources/META-INF/services/org.apache.skywalking.apm.collector.core.module.ModuleDefine
index 502c70faa..664883743 100644
--- a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-define/src/main/resources/META-INF/services/org.apache.skywalking.apm.collector.core.module.ModuleDefine
+++ b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-define/src/main/resources/META-INF/services/org.apache.skywalking.apm.collector.core.module.ModuleDefine
@@ -1,19 +1,19 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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.
-#
-#
-
-org.apache.skywalking.apm.collector.agent.grpc.define.AgentGRPCModule
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+#
+#
+
+org.apache.skywalking.apm.collector.agent.grpc.define.AgentGRPCModule
diff --git a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/pom.xml b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/pom.xml
index cd496ff97..a6d424e19 100644
--- a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/pom.xml
+++ b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/pom.xml
@@ -1,88 +1,88 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You 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.
-  ~
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>agent-grpc</artifactId>
-        <groupId>org.apache.skywalking</groupId>
-        <version>5.0.0-beta2-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>agent-grpc-provider</artifactId>
-    <properties>
-        <grpc.version>1.10.0</grpc.version>
-    </properties>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.skywalking</groupId>
-            <artifactId>agent-grpc-define</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.skywalking</groupId>
-            <artifactId>collector-cluster-define</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.skywalking</groupId>
-            <artifactId>collector-naming-define</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.skywalking</groupId>
-            <artifactId>collector-grpc-manager-define</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.skywalking</groupId>
-            <artifactId>segment-parser-define</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.skywalking</groupId>
-            <artifactId>jvm-define</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.skywalking</groupId>
-            <artifactId>metric-define</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.skywalking</groupId>
-            <artifactId>register-define</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>io.grpc</groupId>
-            <artifactId>grpc-testing</artifactId>
-            <version>${grpc.version}</version>
-            <scope>test</scope>
-            <exclusions>
-                <exclusion>
-                    <artifactId>mockito-core</artifactId>
-                    <groupId>org.mockito</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-    </dependencies>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You 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.
+  ~
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>agent-grpc</artifactId>
+        <groupId>org.apache.skywalking</groupId>
+        <version>5.0.0-beta2-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>agent-grpc-provider</artifactId>
+    <properties>
+        <grpc.version>1.10.0</grpc.version>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.skywalking</groupId>
+            <artifactId>agent-grpc-define</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.skywalking</groupId>
+            <artifactId>collector-cluster-define</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.skywalking</groupId>
+            <artifactId>collector-naming-define</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.skywalking</groupId>
+            <artifactId>collector-grpc-manager-define</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.skywalking</groupId>
+            <artifactId>segment-parser-define</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.skywalking</groupId>
+            <artifactId>jvm-define</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.skywalking</groupId>
+            <artifactId>metric-define</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.skywalking</groupId>
+            <artifactId>register-define</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.grpc</groupId>
+            <artifactId>grpc-testing</artifactId>
+            <version>${grpc.version}</version>
+            <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <artifactId>mockito-core</artifactId>
+                    <groupId>org.mockito</groupId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+    </dependencies>
 </project>
\ No newline at end of file
diff --git a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/AgentModuleGRPCConfig.java b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/AgentModuleGRPCConfig.java
index 47049d2a6..30040e434 100644
--- a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/AgentModuleGRPCConfig.java
+++ b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/AgentModuleGRPCConfig.java
@@ -1,27 +1,27 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.agent.grpc.provider;
-
-import org.apache.skywalking.apm.collector.server.grpc.GRPCServerConfig;
-
-/**
- * @author peng-yongsheng
- */
-class AgentModuleGRPCConfig extends GRPCServerConfig {
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.collector.agent.grpc.provider;
+
+import org.apache.skywalking.apm.collector.server.grpc.GRPCServerConfig;
+
+/**
+ * @author peng-yongsheng
+ */
+class AgentModuleGRPCConfig extends GRPCServerConfig {
+}
diff --git a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/AgentModuleGRPCProvider.java b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/AgentModuleGRPCProvider.java
index f4487171d..a4a74c234 100644
--- a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/AgentModuleGRPCProvider.java
+++ b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/AgentModuleGRPCProvider.java
@@ -1,142 +1,142 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.agent.grpc.provider;
-
-import java.io.File;
-import org.apache.skywalking.apm.collector.agent.grpc.define.AgentGRPCModule;
-import org.apache.skywalking.apm.collector.agent.grpc.provider.handler.ApplicationRegisterServiceHandler;
-import org.apache.skywalking.apm.collector.agent.grpc.provider.handler.InstanceDiscoveryServiceHandler;
-import org.apache.skywalking.apm.collector.agent.grpc.provider.handler.JVMMetricsServiceHandler;
-import org.apache.skywalking.apm.collector.agent.grpc.provider.handler.NetworkAddressRegisterServiceHandler;
-import org.apache.skywalking.apm.collector.agent.grpc.provider.handler.ServiceNameDiscoveryServiceHandler;
-import org.apache.skywalking.apm.collector.agent.grpc.provider.handler.TraceSegmentServiceHandler;
-import org.apache.skywalking.apm.collector.agent.grpc.provider.handler.naming.AgentGRPCNamingHandler;
-import org.apache.skywalking.apm.collector.agent.grpc.provider.handler.naming.AgentGRPCNamingListener;
-import org.apache.skywalking.apm.collector.analysis.metric.define.AnalysisMetricModule;
-import org.apache.skywalking.apm.collector.analysis.segment.parser.define.AnalysisSegmentParserModule;
-import org.apache.skywalking.apm.collector.cluster.ClusterModule;
-import org.apache.skywalking.apm.collector.cluster.service.ModuleListenerService;
-import org.apache.skywalking.apm.collector.cluster.service.ModuleRegisterService;
-import org.apache.skywalking.apm.collector.core.module.ModuleDefine;
-import org.apache.skywalking.apm.collector.core.module.ModuleConfig;
-import org.apache.skywalking.apm.collector.core.module.ModuleProvider;
-import org.apache.skywalking.apm.collector.core.module.ServiceNotProvidedException;
-import org.apache.skywalking.apm.collector.core.util.Const;
-import org.apache.skywalking.apm.collector.core.util.StringUtils;
-import org.apache.skywalking.apm.collector.grpc.manager.GRPCManagerModule;
-import org.apache.skywalking.apm.collector.grpc.manager.service.GRPCManagerService;
-import org.apache.skywalking.apm.collector.naming.NamingModule;
-import org.apache.skywalking.apm.collector.naming.service.NamingHandlerRegisterService;
-import org.apache.skywalking.apm.collector.server.grpc.GRPCServer;
-import org.eclipse.jetty.util.StringUtil;
-
-/**
- * @author peng-yongsheng
- */
-public class AgentModuleGRPCProvider extends ModuleProvider {
-
-    public static final String NAME = "gRPC";
-    private final AgentModuleGRPCConfig config;
-
-    public AgentModuleGRPCProvider() {
-        super();
-        this.config = new AgentModuleGRPCConfig();
-    }
-
-    @Override
-    public String name() {
-        return NAME;
-    }
-
-    @Override
-    public Class<? extends ModuleDefine> module() {
-        return AgentGRPCModule.class;
-    }
-
-    @Override public ModuleConfig createConfigBeanIfAbsent() {
-        return config;
-    }
-
-    @Override
-    public void prepare() {
-    }
-
-    @Override
-    public void start() throws ServiceNotProvidedException {
-        String host = config.getHost();
-        Integer port = config.getPort();
-        String sslCertChainFilePath = config.getSslCertChainFilePath();
-        String sslPrivateKeyFilePath = config.getSslPrivateKeyFilePath();
-        String authentication = StringUtils.isNotEmpty(config.getAuthentication()) ? config.getAuthentication() : Const.EMPTY_STRING;
-
-        AuthenticationSimpleChecker.INSTANCE.setExpectedToken(authentication);
-        File sslCertChainFile = null;
-        File sslPrivateKeyFile = null;
-        if (StringUtil.isNotBlank(sslCertChainFilePath)) {
-            sslCertChainFile = new File(sslCertChainFilePath);
-            if (!(sslCertChainFile.exists() && sslCertChainFile.isFile())) {
-                sslCertChainFile = null;
-            }
-        }
-        if (StringUtil.isNotBlank(sslPrivateKeyFilePath)) {
-            sslPrivateKeyFile = new File(sslPrivateKeyFilePath);
-            if (!(sslPrivateKeyFile.exists() && sslPrivateKeyFile.isFile())) {
-                sslPrivateKeyFile = null;
-            }
-        }
-
-        ModuleRegisterService moduleRegisterService = getManager().find(ClusterModule.NAME).getService(ModuleRegisterService.class);
-        moduleRegisterService.register(AgentGRPCModule.NAME, this.name(), new AgentModuleGRPCRegistration(host, port));
-
-        AgentGRPCNamingListener namingListener = new AgentGRPCNamingListener();
-        ModuleListenerService moduleListenerService = getManager().find(ClusterModule.NAME).getService(ModuleListenerService.class);
-        moduleListenerService.addListener(namingListener);
-
-        NamingHandlerRegisterService namingHandlerRegisterService = getManager().find(NamingModule.NAME).getService(NamingHandlerRegisterService.class);
-        namingHandlerRegisterService.register(new AgentGRPCNamingHandler(namingListener));
-
-        GRPCManagerService managerService = getManager().find(GRPCManagerModule.NAME).getService(GRPCManagerService.class);
-        GRPCServer gRPCServer;
-        if (sslCertChainFile != null && sslPrivateKeyFile != null) {
-            gRPCServer = managerService.createIfAbsent(host, port, sslCertChainFile, sslPrivateKeyFile);
-        } else {
-            gRPCServer = managerService.createIfAbsent(host, port);
-        }
-
-        addHandlers(gRPCServer);
-    }
-
-    @Override
-    public void notifyAfterCompleted() {
-    }
-
-    @Override
-    public String[] requiredModules() {
-        return new String[] {ClusterModule.NAME, NamingModule.NAME, GRPCManagerModule.NAME, AnalysisSegmentParserModule.NAME, AnalysisMetricModule.NAME};
-    }
-
-    private void addHandlers(GRPCServer gRPCServer) {
-        AuthenticationSimpleChecker.INSTANCE.build(gRPCServer, new ApplicationRegisterServiceHandler(getManager()));
-        AuthenticationSimpleChecker.INSTANCE.build(gRPCServer, new InstanceDiscoveryServiceHandler(getManager()));
-        AuthenticationSimpleChecker.INSTANCE.build(gRPCServer, new ServiceNameDiscoveryServiceHandler(getManager()));
-        AuthenticationSimpleChecker.INSTANCE.build(gRPCServer, new JVMMetricsServiceHandler(getManager()));
-        AuthenticationSimpleChecker.INSTANCE.build(gRPCServer, new TraceSegmentServiceHandler(getManager()));
-        AuthenticationSimpleChecker.INSTANCE.build(gRPCServer, new NetworkAddressRegisterServiceHandler(getManager()));
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.collector.agent.grpc.provider;
+
+import java.io.File;
+import org.apache.skywalking.apm.collector.agent.grpc.define.AgentGRPCModule;
+import org.apache.skywalking.apm.collector.agent.grpc.provider.handler.ApplicationRegisterServiceHandler;
+import org.apache.skywalking.apm.collector.agent.grpc.provider.handler.InstanceDiscoveryServiceHandler;
+import org.apache.skywalking.apm.collector.agent.grpc.provider.handler.JVMMetricsServiceHandler;
+import org.apache.skywalking.apm.collector.agent.grpc.provider.handler.NetworkAddressRegisterServiceHandler;
+import org.apache.skywalking.apm.collector.agent.grpc.provider.handler.ServiceNameDiscoveryServiceHandler;
+import org.apache.skywalking.apm.collector.agent.grpc.provider.handler.TraceSegmentServiceHandler;
+import org.apache.skywalking.apm.collector.agent.grpc.provider.handler.naming.AgentGRPCNamingHandler;
+import org.apache.skywalking.apm.collector.agent.grpc.provider.handler.naming.AgentGRPCNamingListener;
+import org.apache.skywalking.apm.collector.analysis.metric.define.AnalysisMetricModule;
+import org.apache.skywalking.apm.collector.analysis.segment.parser.define.AnalysisSegmentParserModule;
+import org.apache.skywalking.apm.collector.cluster.ClusterModule;
+import org.apache.skywalking.apm.collector.cluster.service.ModuleListenerService;
+import org.apache.skywalking.apm.collector.cluster.service.ModuleRegisterService;
+import org.apache.skywalking.apm.collector.core.module.ModuleDefine;
+import org.apache.skywalking.apm.collector.core.module.ModuleConfig;
+import org.apache.skywalking.apm.collector.core.module.ModuleProvider;
+import org.apache.skywalking.apm.collector.core.module.ServiceNotProvidedException;
+import org.apache.skywalking.apm.collector.core.util.Const;
+import org.apache.skywalking.apm.collector.core.util.StringUtils;
+import org.apache.skywalking.apm.collector.grpc.manager.GRPCManagerModule;
+import org.apache.skywalking.apm.collector.grpc.manager.service.GRPCManagerService;
+import org.apache.skywalking.apm.collector.naming.NamingModule;
+import org.apache.skywalking.apm.collector.naming.service.NamingHandlerRegisterService;
+import org.apache.skywalking.apm.collector.server.grpc.GRPCServer;
+import org.eclipse.jetty.util.StringUtil;
+
+/**
+ * @author peng-yongsheng
+ */
+public class AgentModuleGRPCProvider extends ModuleProvider {
+
+    public static final String NAME = "gRPC";
+    private final AgentModuleGRPCConfig config;
+
+    public AgentModuleGRPCProvider() {
+        super();
+        this.config = new AgentModuleGRPCConfig();
+    }
+
+    @Override
+    public String name() {
+        return NAME;
+    }
+
+    @Override
+    public Class<? extends ModuleDefine> module() {
+        return AgentGRPCModule.class;
+    }
+
+    @Override public ModuleConfig createConfigBeanIfAbsent() {
+        return config;
+    }
+
+    @Override
+    public void prepare() {
+    }
+
+    @Override
+    public void start() throws ServiceNotProvidedException {
+        String host = config.getHost();
+        Integer port = config.getPort();
+        String sslCertChainFilePath = config.getSslCertChainFilePath();
+        String sslPrivateKeyFilePath = config.getSslPrivateKeyFilePath();
+        String authentication = StringUtils.isNotEmpty(config.getAuthentication()) ? config.getAuthentication() : Const.EMPTY_STRING;
+
+        AuthenticationSimpleChecker.INSTANCE.setExpectedToken(authentication);
+        File sslCertChainFile = null;
+        File sslPrivateKeyFile = null;
+        if (StringUtil.isNotBlank(sslCertChainFilePath)) {
+            sslCertChainFile = new File(sslCertChainFilePath);
+            if (!(sslCertChainFile.exists() && sslCertChainFile.isFile())) {
+                sslCertChainFile = null;
+            }
+        }
+        if (StringUtil.isNotBlank(sslPrivateKeyFilePath)) {
+            sslPrivateKeyFile = new File(sslPrivateKeyFilePath);
+            if (!(sslPrivateKeyFile.exists() && sslPrivateKeyFile.isFile())) {
+                sslPrivateKeyFile = null;
+            }
+        }
+
+        ModuleRegisterService moduleRegisterService = getManager().find(ClusterModule.NAME).getService(ModuleRegisterService.class);
+        moduleRegisterService.register(AgentGRPCModule.NAME, this.name(), new AgentModuleGRPCRegistration(host, port));
+
+        AgentGRPCNamingListener namingListener = new AgentGRPCNamingListener();
+        ModuleListenerService moduleListenerService = getManager().find(ClusterModule.NAME).getService(ModuleListenerService.class);
+        moduleListenerService.addListener(namingListener);
+
+        NamingHandlerRegisterService namingHandlerRegisterService = getManager().find(NamingModule.NAME).getService(NamingHandlerRegisterService.class);
+        namingHandlerRegisterService.register(new AgentGRPCNamingHandler(namingListener));
+
+        GRPCManagerService managerService = getManager().find(GRPCManagerModule.NAME).getService(GRPCManagerService.class);
+        GRPCServer gRPCServer;
+        if (sslCertChainFile != null && sslPrivateKeyFile != null) {
+            gRPCServer = managerService.createIfAbsent(host, port, sslCertChainFile, sslPrivateKeyFile);
+        } else {
+            gRPCServer = managerService.createIfAbsent(host, port);
+        }
+
+        addHandlers(gRPCServer);
+    }
+
+    @Override
+    public void notifyAfterCompleted() {
+    }
+
+    @Override
+    public String[] requiredModules() {
+        return new String[] {ClusterModule.NAME, NamingModule.NAME, GRPCManagerModule.NAME, AnalysisSegmentParserModule.NAME, AnalysisMetricModule.NAME};
+    }
+
+    private void addHandlers(GRPCServer gRPCServer) {
+        AuthenticationSimpleChecker.INSTANCE.build(gRPCServer, new ApplicationRegisterServiceHandler(getManager()));
+        AuthenticationSimpleChecker.INSTANCE.build(gRPCServer, new InstanceDiscoveryServiceHandler(getManager()));
+        AuthenticationSimpleChecker.INSTANCE.build(gRPCServer, new ServiceNameDiscoveryServiceHandler(getManager()));
+        AuthenticationSimpleChecker.INSTANCE.build(gRPCServer, new JVMMetricsServiceHandler(getManager()));
+        AuthenticationSimpleChecker.INSTANCE.build(gRPCServer, new TraceSegmentServiceHandler(getManager()));
+        AuthenticationSimpleChecker.INSTANCE.build(gRPCServer, new NetworkAddressRegisterServiceHandler(getManager()));
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/AgentModuleGRPCRegistration.java b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/AgentModuleGRPCRegistration.java
index cf49deaa2..1e0e383fa 100644
--- a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/AgentModuleGRPCRegistration.java
+++ b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/AgentModuleGRPCRegistration.java
@@ -1,41 +1,41 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-
-package org.apache.skywalking.apm.collector.agent.grpc.provider;
-
-import org.apache.skywalking.apm.collector.cluster.ModuleRegistration;
-import org.apache.skywalking.apm.collector.core.util.Const;
-
-/**
- * @author peng-yongsheng
- */
-public class AgentModuleGRPCRegistration extends ModuleRegistration {
-
-    private final String host;
-    private final int port;
-
-    public AgentModuleGRPCRegistration(String host, int port) {
-        this.host = host;
-        this.port = port;
-    }
-
-    @Override public Value buildValue() {
-        return new Value(host, port, Const.EMPTY_STRING);
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+package org.apache.skywalking.apm.collector.agent.grpc.provider;
+
+import org.apache.skywalking.apm.collector.cluster.ModuleRegistration;
+import org.apache.skywalking.apm.collector.core.util.Const;
+
+/**
+ * @author peng-yongsheng
+ */
+public class AgentModuleGRPCRegistration extends ModuleRegistration {
+
+    private final String host;
+    private final int port;
+
+    public AgentModuleGRPCRegistration(String host, int port) {
+        this.host = host;
+        this.port = port;
+    }
+
+    @Override public Value buildValue() {
+        return new Value(host, port, Const.EMPTY_STRING);
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/AuthenticationSimpleChecker.java b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/AuthenticationSimpleChecker.java
index 10e69da87..3e20966ac 100644
--- a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/AuthenticationSimpleChecker.java
+++ b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/AuthenticationSimpleChecker.java
@@ -1,70 +1,70 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.agent.grpc.provider;
-
-import io.grpc.BindableService;
-import io.grpc.Metadata;
-import io.grpc.ServerCall;
-import io.grpc.ServerCallHandler;
-import io.grpc.ServerInterceptor;
-import io.grpc.ServerInterceptors;
-import io.grpc.Status;
-import org.apache.skywalking.apm.collector.core.util.StringUtils;
-import org.apache.skywalking.apm.collector.server.grpc.GRPCServer;
-
-/**
- * Active the authentication token checker if expected token exists in application.yml
- *
- * @author wusheng
- */
-public enum AuthenticationSimpleChecker {
-    INSTANCE;
-
-    private static final Metadata.Key<String> AUTH_HEAD_HEADER_NAME =
-        Metadata.Key.of("Authentication", Metadata.ASCII_STRING_MARSHALLER);
-
-    private String expectedToken = "";
-
-    public void build(GRPCServer gRPCServer, BindableService targetService) {
-        if (StringUtils.isNotEmpty(expectedToken)) {
-            gRPCServer.addHandler(ServerInterceptors.intercept(targetService, new ServerInterceptor() {
-                @Override
-                public <REQ, RESP> ServerCall.Listener<REQ> interceptCall(ServerCall<REQ, RESP> serverCall,
-                    Metadata metadata,
-                    ServerCallHandler<REQ, RESP> next) {
-                    String token = metadata.get(AUTH_HEAD_HEADER_NAME);
-                    if (expectedToken.equals(token)) {
-                        return next.startCall(serverCall, metadata);
-                    } else {
-                        serverCall.close(Status.PERMISSION_DENIED, new Metadata());
-                        return new ServerCall.Listener() {
-                        };
-                    }
-
-                }
-            }));
-        } else {
-            gRPCServer.addHandler(targetService);
-        }
-    }
-
-    public void setExpectedToken(String expectedToken) {
-        this.expectedToken = expectedToken;
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.collector.agent.grpc.provider;
+
+import io.grpc.BindableService;
+import io.grpc.Metadata;
+import io.grpc.ServerCall;
+import io.grpc.ServerCallHandler;
+import io.grpc.ServerInterceptor;
+import io.grpc.ServerInterceptors;
+import io.grpc.Status;
+import org.apache.skywalking.apm.collector.core.util.StringUtils;
+import org.apache.skywalking.apm.collector.server.grpc.GRPCServer;
+
+/**
+ * Active the authentication token checker if expected token exists in application.yml
+ *
+ * @author wusheng
+ */
+public enum AuthenticationSimpleChecker {
+    INSTANCE;
+
+    private static final Metadata.Key<String> AUTH_HEAD_HEADER_NAME =
+        Metadata.Key.of("Authentication", Metadata.ASCII_STRING_MARSHALLER);
+
+    private String expectedToken = "";
+
+    public void build(GRPCServer gRPCServer, BindableService targetService) {
+        if (StringUtils.isNotEmpty(expectedToken)) {
+            gRPCServer.addHandler(ServerInterceptors.intercept(targetService, new ServerInterceptor() {
+                @Override
+                public <REQ, RESP> ServerCall.Listener<REQ> interceptCall(ServerCall<REQ, RESP> serverCall,
+                    Metadata metadata,
+                    ServerCallHandler<REQ, RESP> next) {
+                    String token = metadata.get(AUTH_HEAD_HEADER_NAME);
+                    if (expectedToken.equals(token)) {
+                        return next.startCall(serverCall, metadata);
+                    } else {
+                        serverCall.close(Status.PERMISSION_DENIED, new Metadata());
+                        return new ServerCall.Listener() {
+                        };
+                    }
+
+                }
+            }));
+        } else {
+            gRPCServer.addHandler(targetService);
+        }
+    }
+
+    public void setExpectedToken(String expectedToken) {
+        this.expectedToken = expectedToken;
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/ApplicationRegisterServiceHandler.java b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/ApplicationRegisterServiceHandler.java
index 9ca2ca2e0..552c9f41f 100644
--- a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/ApplicationRegisterServiceHandler.java
+++ b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/ApplicationRegisterServiceHandler.java
@@ -1,61 +1,61 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.agent.grpc.provider.handler;
-
-import io.grpc.stub.StreamObserver;
-import org.apache.skywalking.apm.collector.analysis.register.define.AnalysisRegisterModule;
-import org.apache.skywalking.apm.collector.analysis.register.define.service.IApplicationIDService;
-import org.apache.skywalking.apm.collector.core.module.ModuleManager;
-import org.apache.skywalking.apm.collector.server.grpc.GRPCHandler;
-import org.apache.skywalking.apm.network.proto.Application;
-import org.apache.skywalking.apm.network.proto.ApplicationMapping;
-import org.apache.skywalking.apm.network.proto.ApplicationRegisterServiceGrpc;
-import org.apache.skywalking.apm.network.proto.KeyWithIntegerValue;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author peng-yongsheng
- */
-public class ApplicationRegisterServiceHandler extends ApplicationRegisterServiceGrpc.ApplicationRegisterServiceImplBase implements GRPCHandler {
-
-    private static final Logger logger = LoggerFactory.getLogger(ApplicationRegisterServiceHandler.class);
-
-    private final IApplicationIDService applicationIDService;
-
-    public ApplicationRegisterServiceHandler(ModuleManager moduleManager) {
-        applicationIDService = moduleManager.find(AnalysisRegisterModule.NAME).getService(IApplicationIDService.class);
-    }
-
-    @Override
-    public void applicationCodeRegister(Application request, StreamObserver<ApplicationMapping> responseObserver) {
-        logger.debug("register application");
-
-        ApplicationMapping.Builder builder = ApplicationMapping.newBuilder();
-        String applicationCode = request.getApplicationCode();
-        int applicationId = applicationIDService.getOrCreateForApplicationCode(applicationCode);
-
-        if (applicationId != 0) {
-            KeyWithIntegerValue value = KeyWithIntegerValue.newBuilder().setKey(applicationCode).setValue(applicationId).build();
-            builder.setApplication(value);
-        }
-        responseObserver.onNext(builder.build());
-        responseObserver.onCompleted();
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.collector.agent.grpc.provider.handler;
+
+import io.grpc.stub.StreamObserver;
+import org.apache.skywalking.apm.collector.analysis.register.define.AnalysisRegisterModule;
+import org.apache.skywalking.apm.collector.analysis.register.define.service.IApplicationIDService;
+import org.apache.skywalking.apm.collector.core.module.ModuleManager;
+import org.apache.skywalking.apm.collector.server.grpc.GRPCHandler;
+import org.apache.skywalking.apm.network.proto.Application;
+import org.apache.skywalking.apm.network.proto.ApplicationMapping;
+import org.apache.skywalking.apm.network.proto.ApplicationRegisterServiceGrpc;
+import org.apache.skywalking.apm.network.proto.KeyWithIntegerValue;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author peng-yongsheng
+ */
+public class ApplicationRegisterServiceHandler extends ApplicationRegisterServiceGrpc.ApplicationRegisterServiceImplBase implements GRPCHandler {
+
+    private static final Logger logger = LoggerFactory.getLogger(ApplicationRegisterServiceHandler.class);
+
+    private final IApplicationIDService applicationIDService;
+
+    public ApplicationRegisterServiceHandler(ModuleManager moduleManager) {
+        applicationIDService = moduleManager.find(AnalysisRegisterModule.NAME).getService(IApplicationIDService.class);
+    }
+
+    @Override
+    public void applicationCodeRegister(Application request, StreamObserver<ApplicationMapping> responseObserver) {
+        logger.debug("register application");
+
+        ApplicationMapping.Builder builder = ApplicationMapping.newBuilder();
+        String applicationCode = request.getApplicationCode();
+        int applicationId = applicationIDService.getOrCreateForApplicationCode(applicationCode);
+
+        if (applicationId != 0) {
+            KeyWithIntegerValue value = KeyWithIntegerValue.newBuilder().setKey(applicationCode).setValue(applicationId).build();
+            builder.setApplication(value);
+        }
+        responseObserver.onNext(builder.build());
+        responseObserver.onCompleted();
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/InstanceDiscoveryServiceHandler.java b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/InstanceDiscoveryServiceHandler.java
index 7f1f9c9f5..d874bc210 100644
--- a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/InstanceDiscoveryServiceHandler.java
+++ b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/InstanceDiscoveryServiceHandler.java
@@ -1,86 +1,86 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.agent.grpc.provider.handler;
-
-import com.google.gson.JsonArray;
-import com.google.gson.JsonObject;
-import io.grpc.stub.StreamObserver;
-import org.apache.skywalking.apm.collector.analysis.metric.define.AnalysisMetricModule;
-import org.apache.skywalking.apm.collector.analysis.metric.define.service.IInstanceHeartBeatService;
-import org.apache.skywalking.apm.collector.analysis.register.define.AnalysisRegisterModule;
-import org.apache.skywalking.apm.collector.analysis.register.define.service.IInstanceIDService;
-import org.apache.skywalking.apm.collector.core.module.ModuleManager;
-import org.apache.skywalking.apm.collector.server.grpc.GRPCHandler;
-import org.apache.skywalking.apm.network.proto.ApplicationInstance;
-import org.apache.skywalking.apm.network.proto.ApplicationInstanceHeartbeat;
-import org.apache.skywalking.apm.network.proto.ApplicationInstanceMapping;
-import org.apache.skywalking.apm.network.proto.Downstream;
-import org.apache.skywalking.apm.network.proto.InstanceDiscoveryServiceGrpc;
-import org.apache.skywalking.apm.network.proto.OSInfo;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author peng-yongsheng
- */
-public class InstanceDiscoveryServiceHandler extends InstanceDiscoveryServiceGrpc.InstanceDiscoveryServiceImplBase implements GRPCHandler {
-
-    private static final Logger logger = LoggerFactory.getLogger(InstanceDiscoveryServiceHandler.class);
-
-    private final IInstanceIDService instanceIDService;
-    private final IInstanceHeartBeatService instanceHeartBeatService;
-
-    public InstanceDiscoveryServiceHandler(ModuleManager moduleManager) {
-        this.instanceIDService = moduleManager.find(AnalysisRegisterModule.NAME).getService(IInstanceIDService.class);
-        this.instanceHeartBeatService = moduleManager.find(AnalysisMetricModule.NAME).getService(IInstanceHeartBeatService.class);
-    }
-
-    @Override
-    public void registerInstance(ApplicationInstance request,
-        StreamObserver<ApplicationInstanceMapping> responseObserver) {
-        int instanceId = instanceIDService.getOrCreateByAgentUUID(request.getApplicationId(), request.getAgentUUID(), request.getRegisterTime(), buildOsInfo(request.getOsinfo()));
-        ApplicationInstanceMapping.Builder builder = ApplicationInstanceMapping.newBuilder();
-        builder.setApplicationId(request.getApplicationId());
-        builder.setApplicationInstanceId(instanceId);
-        responseObserver.onNext(builder.build());
-        responseObserver.onCompleted();
-    }
-
-    @Override public void heartbeat(ApplicationInstanceHeartbeat request, StreamObserver<Downstream> responseObserver) {
-        int instanceId = request.getApplicationInstanceId();
-        long heartBeatTime = request.getHeartbeatTime();
-        this.instanceHeartBeatService.heartBeat(instanceId, heartBeatTime);
-        responseObserver.onNext(Downstream.getDefaultInstance());
-        responseObserver.onCompleted();
-    }
-
-    private String buildOsInfo(OSInfo osinfo) {
-        JsonObject osInfoJson = new JsonObject();
-        osInfoJson.addProperty("osName", osinfo.getOsName());
-        osInfoJson.addProperty("hostName", osinfo.getHostname());
-        osInfoJson.addProperty("processId", osinfo.getProcessNo());
-
-        JsonArray ipv4Array = new JsonArray();
-        for (String ipv4 : osinfo.getIpv4SList()) {
-            ipv4Array.add(ipv4);
-        }
-        osInfoJson.add("ipv4s", ipv4Array);
-        return osInfoJson.toString();
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.collector.agent.grpc.provider.handler;
+
+import com.google.gson.JsonArray;
+import com.google.gson.JsonObject;
+import io.grpc.stub.StreamObserver;
+import org.apache.skywalking.apm.collector.analysis.metric.define.AnalysisMetricModule;
+import org.apache.skywalking.apm.collector.analysis.metric.define.service.IInstanceHeartBeatService;
+import org.apache.skywalking.apm.collector.analysis.register.define.AnalysisRegisterModule;
+import org.apache.skywalking.apm.collector.analysis.register.define.service.IInstanceIDService;
+import org.apache.skywalking.apm.collector.core.module.ModuleManager;
+import org.apache.skywalking.apm.collector.server.grpc.GRPCHandler;
+import org.apache.skywalking.apm.network.proto.ApplicationInstance;
+import org.apache.skywalking.apm.network.proto.ApplicationInstanceHeartbeat;
+import org.apache.skywalking.apm.network.proto.ApplicationInstanceMapping;
+import org.apache.skywalking.apm.network.proto.Downstream;
+import org.apache.skywalking.apm.network.proto.InstanceDiscoveryServiceGrpc;
+import org.apache.skywalking.apm.network.proto.OSInfo;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author peng-yongsheng
+ */
+public class InstanceDiscoveryServiceHandler extends InstanceDiscoveryServiceGrpc.InstanceDiscoveryServiceImplBase implements GRPCHandler {
+
+    private static final Logger logger = LoggerFactory.getLogger(InstanceDiscoveryServiceHandler.class);
+
+    private final IInstanceIDService instanceIDService;
+    private final IInstanceHeartBeatService instanceHeartBeatService;
+
+    public InstanceDiscoveryServiceHandler(ModuleManager moduleManager) {
+        this.instanceIDService = moduleManager.find(AnalysisRegisterModule.NAME).getService(IInstanceIDService.class);
+        this.instanceHeartBeatService = moduleManager.find(AnalysisMetricModule.NAME).getService(IInstanceHeartBeatService.class);
+    }
+
+    @Override
+    public void registerInstance(ApplicationInstance request,
+        StreamObserver<ApplicationInstanceMapping> responseObserver) {
+        int instanceId = instanceIDService.getOrCreateByAgentUUID(request.getApplicationId(), request.getAgentUUID(), request.getRegisterTime(), buildOsInfo(request.getOsinfo()));
+        ApplicationInstanceMapping.Builder builder = ApplicationInstanceMapping.newBuilder();
+        builder.setApplicationId(request.getApplicationId());
+        builder.setApplicationInstanceId(instanceId);
+        responseObserver.onNext(builder.build());
+        responseObserver.onCompleted();
+    }
+
+    @Override public void heartbeat(ApplicationInstanceHeartbeat request, StreamObserver<Downstream> responseObserver) {
+        int instanceId = request.getApplicationInstanceId();
+        long heartBeatTime = request.getHeartbeatTime();
+        this.instanceHeartBeatService.heartBeat(instanceId, heartBeatTime);
+        responseObserver.onNext(Downstream.getDefaultInstance());
+        responseObserver.onCompleted();
+    }
+
+    private String buildOsInfo(OSInfo osinfo) {
+        JsonObject osInfoJson = new JsonObject();
+        osInfoJson.addProperty("osName", osinfo.getOsName());
+        osInfoJson.addProperty("hostName", osinfo.getHostname());
+        osInfoJson.addProperty("processId", osinfo.getProcessNo());
+
+        JsonArray ipv4Array = new JsonArray();
+        for (String ipv4 : osinfo.getIpv4SList()) {
+            ipv4Array.add(ipv4);
+        }
+        osInfoJson.add("ipv4s", ipv4Array);
+        return osInfoJson.toString();
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/JVMMetricsServiceHandler.java b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/JVMMetricsServiceHandler.java
index 05d728f19..89d9e6b8c 100644
--- a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/JVMMetricsServiceHandler.java
+++ b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/JVMMetricsServiceHandler.java
@@ -1,102 +1,102 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.agent.grpc.provider.handler;
-
-import io.grpc.stub.StreamObserver;
-import java.util.List;
-import org.apache.skywalking.apm.collector.analysis.jvm.define.AnalysisJVMModule;
-import org.apache.skywalking.apm.collector.analysis.jvm.define.service.ICpuMetricService;
-import org.apache.skywalking.apm.collector.analysis.jvm.define.service.IGCMetricService;
-import org.apache.skywalking.apm.collector.analysis.jvm.define.service.IMemoryMetricService;
-import org.apache.skywalking.apm.collector.analysis.jvm.define.service.IMemoryPoolMetricService;
-import org.apache.skywalking.apm.collector.analysis.metric.define.AnalysisMetricModule;
-import org.apache.skywalking.apm.collector.analysis.metric.define.service.IInstanceHeartBeatService;
-import org.apache.skywalking.apm.collector.core.module.ModuleManager;
-import org.apache.skywalking.apm.collector.core.util.TimeBucketUtils;
-import org.apache.skywalking.apm.collector.server.grpc.GRPCHandler;
-import org.apache.skywalking.apm.network.proto.CPU;
-import org.apache.skywalking.apm.network.proto.Downstream;
-import org.apache.skywalking.apm.network.proto.GC;
-import org.apache.skywalking.apm.network.proto.JVMMetrics;
-import org.apache.skywalking.apm.network.proto.JVMMetricsServiceGrpc;
-import org.apache.skywalking.apm.network.proto.Memory;
-import org.apache.skywalking.apm.network.proto.MemoryPool;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author peng-yongsheng
- */
-public class JVMMetricsServiceHandler extends JVMMetricsServiceGrpc.JVMMetricsServiceImplBase implements GRPCHandler {
-
-    private static final Logger logger = LoggerFactory.getLogger(JVMMetricsServiceHandler.class);
-
-    private final ICpuMetricService cpuMetricService;
-    private final IGCMetricService gcMetricService;
-    private final IMemoryMetricService memoryMetricService;
-    private final IMemoryPoolMetricService memoryPoolMetricService;
-    private final IInstanceHeartBeatService instanceHeartBeatService;
-
-    public JVMMetricsServiceHandler(ModuleManager moduleManager) {
-        this.cpuMetricService = moduleManager.find(AnalysisJVMModule.NAME).getService(ICpuMetricService.class);
-        this.gcMetricService = moduleManager.find(AnalysisJVMModule.NAME).getService(IGCMetricService.class);
-        this.memoryMetricService = moduleManager.find(AnalysisJVMModule.NAME).getService(IMemoryMetricService.class);
-        this.memoryPoolMetricService = moduleManager.find(AnalysisJVMModule.NAME).getService(IMemoryPoolMetricService.class);
-        this.instanceHeartBeatService = moduleManager.find(AnalysisMetricModule.NAME).getService(IInstanceHeartBeatService.class);
-    }
-
-    @Override public void collect(JVMMetrics request, StreamObserver<Downstream> responseObserver) {
-        int instanceId = request.getApplicationInstanceId();
-        logger.debug("receive the jvm metric from application instance, id: {}", instanceId);
-
-        request.getMetricsList().forEach(metric -> {
-            long minuteTimeBucket = TimeBucketUtils.INSTANCE.getMinuteTimeBucket(metric.getTime());
-            sendToCpuMetricService(instanceId, minuteTimeBucket, metric.getCpu());
-            sendToMemoryMetricService(instanceId, minuteTimeBucket, metric.getMemoryList());
-            sendToMemoryPoolMetricService(instanceId, minuteTimeBucket, metric.getMemoryPoolList());
-            sendToGCMetricService(instanceId, minuteTimeBucket, metric.getGcList());
-            sendToInstanceHeartBeatService(instanceId, metric.getTime());
-        });
-
-        responseObserver.onNext(Downstream.newBuilder().build());
-        responseObserver.onCompleted();
-    }
-
-    private void sendToMemoryMetricService(int instanceId, long timeBucket, List<Memory> memories) {
-        memories.forEach(memory -> memoryMetricService.send(instanceId, timeBucket, memory.getIsHeap(), memory.getInit(), memory.getMax(), memory.getUsed(), memory.getCommitted()));
-    }
-
-    private void sendToMemoryPoolMetricService(int instanceId, long timeBucket,
-        List<MemoryPool> memoryPools) {
-
-        memoryPools.forEach(memoryPool -> memoryPoolMetricService.send(instanceId, timeBucket, memoryPool.getType().getNumber(), memoryPool.getInit(), memoryPool.getMax(), memoryPool.getUsed(), memoryPool.getCommited()));
-    }
-
-    private void sendToCpuMetricService(int instanceId, long timeBucket, CPU cpu) {
-        cpuMetricService.send(instanceId, timeBucket, cpu.getUsagePercent());
-    }
-
-    private void sendToGCMetricService(int instanceId, long timeBucket, List<GC> gcs) {
-        gcs.forEach(gc -> gcMetricService.send(instanceId, timeBucket, gc.getPhraseValue(), gc.getCount(), gc.getTime()));
-    }
-
-    private void sendToInstanceHeartBeatService(int instanceId, long heartBeatTime) {
-        instanceHeartBeatService.heartBeat(instanceId, heartBeatTime);
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.collector.agent.grpc.provider.handler;
+
+import io.grpc.stub.StreamObserver;
+import java.util.List;
+import org.apache.skywalking.apm.collector.analysis.jvm.define.AnalysisJVMModule;
+import org.apache.skywalking.apm.collector.analysis.jvm.define.service.ICpuMetricService;
+import org.apache.skywalking.apm.collector.analysis.jvm.define.service.IGCMetricService;
+import org.apache.skywalking.apm.collector.analysis.jvm.define.service.IMemoryMetricService;
+import org.apache.skywalking.apm.collector.analysis.jvm.define.service.IMemoryPoolMetricService;
+import org.apache.skywalking.apm.collector.analysis.metric.define.AnalysisMetricModule;
+import org.apache.skywalking.apm.collector.analysis.metric.define.service.IInstanceHeartBeatService;
+import org.apache.skywalking.apm.collector.core.module.ModuleManager;
+import org.apache.skywalking.apm.collector.core.util.TimeBucketUtils;
+import org.apache.skywalking.apm.collector.server.grpc.GRPCHandler;
+import org.apache.skywalking.apm.network.proto.CPU;
+import org.apache.skywalking.apm.network.proto.Downstream;
+import org.apache.skywalking.apm.network.proto.GC;
+import org.apache.skywalking.apm.network.proto.JVMMetrics;
+import org.apache.skywalking.apm.network.proto.JVMMetricsServiceGrpc;
+import org.apache.skywalking.apm.network.proto.Memory;
+import org.apache.skywalking.apm.network.proto.MemoryPool;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author peng-yongsheng
+ */
+public class JVMMetricsServiceHandler extends JVMMetricsServiceGrpc.JVMMetricsServiceImplBase implements GRPCHandler {
+
+    private static final Logger logger = LoggerFactory.getLogger(JVMMetricsServiceHandler.class);
+
+    private final ICpuMetricService cpuMetricService;
+    private final IGCMetricService gcMetricService;
+    private final IMemoryMetricService memoryMetricService;
+    private final IMemoryPoolMetricService memoryPoolMetricService;
+    private final IInstanceHeartBeatService instanceHeartBeatService;
+
+    public JVMMetricsServiceHandler(ModuleManager moduleManager) {
+        this.cpuMetricService = moduleManager.find(AnalysisJVMModule.NAME).getService(ICpuMetricService.class);
+        this.gcMetricService = moduleManager.find(AnalysisJVMModule.NAME).getService(IGCMetricService.class);
+        this.memoryMetricService = moduleManager.find(AnalysisJVMModule.NAME).getService(IMemoryMetricService.class);
+        this.memoryPoolMetricService = moduleManager.find(AnalysisJVMModule.NAME).getService(IMemoryPoolMetricService.class);
+        this.instanceHeartBeatService = moduleManager.find(AnalysisMetricModule.NAME).getService(IInstanceHeartBeatService.class);
+    }
+
+    @Override public void collect(JVMMetrics request, StreamObserver<Downstream> responseObserver) {
+        int instanceId = request.getApplicationInstanceId();
+        logger.debug("receive the jvm metric from application instance, id: {}", instanceId);
+
+        request.getMetricsList().forEach(metric -> {
+            long minuteTimeBucket = TimeBucketUtils.INSTANCE.getMinuteTimeBucket(metric.getTime());
+            sendToCpuMetricService(instanceId, minuteTimeBucket, metric.getCpu());
+            sendToMemoryMetricService(instanceId, minuteTimeBucket, metric.getMemoryList());
+            sendToMemoryPoolMetricService(instanceId, minuteTimeBucket, metric.getMemoryPoolList());
+            sendToGCMetricService(instanceId, minuteTimeBucket, metric.getGcList());
+            sendToInstanceHeartBeatService(instanceId, metric.getTime());
+        });
+
+        responseObserver.onNext(Downstream.newBuilder().build());
+        responseObserver.onCompleted();
+    }
+
+    private void sendToMemoryMetricService(int instanceId, long timeBucket, List<Memory> memories) {
+        memories.forEach(memory -> memoryMetricService.send(instanceId, timeBucket, memory.getIsHeap(), memory.getInit(), memory.getMax(), memory.getUsed(), memory.getCommitted()));
+    }
+
+    private void sendToMemoryPoolMetricService(int instanceId, long timeBucket,
+        List<MemoryPool> memoryPools) {
+
+        memoryPools.forEach(memoryPool -> memoryPoolMetricService.send(instanceId, timeBucket, memoryPool.getType().getNumber(), memoryPool.getInit(), memoryPool.getMax(), memoryPool.getUsed(), memoryPool.getCommited()));
+    }
+
+    private void sendToCpuMetricService(int instanceId, long timeBucket, CPU cpu) {
+        cpuMetricService.send(instanceId, timeBucket, cpu.getUsagePercent());
+    }
+
+    private void sendToGCMetricService(int instanceId, long timeBucket, List<GC> gcs) {
+        gcs.forEach(gc -> gcMetricService.send(instanceId, timeBucket, gc.getPhraseValue(), gc.getCount(), gc.getTime()));
+    }
+
+    private void sendToInstanceHeartBeatService(int instanceId, long heartBeatTime) {
+        instanceHeartBeatService.heartBeat(instanceId, heartBeatTime);
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/NetworkAddressRegisterServiceHandler.java b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/NetworkAddressRegisterServiceHandler.java
index d925d3d4d..7e6cc12d6 100644
--- a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/NetworkAddressRegisterServiceHandler.java
+++ b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/NetworkAddressRegisterServiceHandler.java
@@ -1,64 +1,64 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.agent.grpc.provider.handler;
-
-import com.google.protobuf.ProtocolStringList;
-import io.grpc.stub.StreamObserver;
-import org.apache.skywalking.apm.collector.analysis.register.define.AnalysisRegisterModule;
-import org.apache.skywalking.apm.collector.analysis.register.define.service.INetworkAddressIDService;
-import org.apache.skywalking.apm.collector.core.module.ModuleManager;
-import org.apache.skywalking.apm.collector.server.grpc.GRPCHandler;
-import org.apache.skywalking.apm.network.proto.KeyWithIntegerValue;
-import org.apache.skywalking.apm.network.proto.NetworkAddressMappings;
-import org.apache.skywalking.apm.network.proto.NetworkAddressRegisterServiceGrpc;
-import org.apache.skywalking.apm.network.proto.NetworkAddresses;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author peng-yongsheng
- */
-public class NetworkAddressRegisterServiceHandler extends NetworkAddressRegisterServiceGrpc.NetworkAddressRegisterServiceImplBase implements GRPCHandler {
-
-    private static final Logger logger = LoggerFactory.getLogger(NetworkAddressRegisterServiceHandler.class);
-
-    private final INetworkAddressIDService networkAddressIDService;
-
-    public NetworkAddressRegisterServiceHandler(ModuleManager moduleManager) {
-        this.networkAddressIDService = moduleManager.find(AnalysisRegisterModule.NAME).getService(INetworkAddressIDService.class);
-    }
-
-    @Override
-    public void batchRegister(NetworkAddresses request, StreamObserver<NetworkAddressMappings> responseObserver) {
-        logger.debug("register application");
-        ProtocolStringList addressesList = request.getAddressesList();
-
-        NetworkAddressMappings.Builder builder = NetworkAddressMappings.newBuilder();
-        for (String networkAddress : addressesList) {
-            int addressId = networkAddressIDService.get(networkAddress);
-
-            if (addressId != 0) {
-                KeyWithIntegerValue value = KeyWithIntegerValue.newBuilder().setKey(networkAddress).setValue(addressId).build();
-                builder.addAddressIds(value);
-            }
-        }
-        responseObserver.onNext(builder.build());
-        responseObserver.onCompleted();
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.collector.agent.grpc.provider.handler;
+
+import com.google.protobuf.ProtocolStringList;
+import io.grpc.stub.StreamObserver;
+import org.apache.skywalking.apm.collector.analysis.register.define.AnalysisRegisterModule;
+import org.apache.skywalking.apm.collector.analysis.register.define.service.INetworkAddressIDService;
+import org.apache.skywalking.apm.collector.core.module.ModuleManager;
+import org.apache.skywalking.apm.collector.server.grpc.GRPCHandler;
+import org.apache.skywalking.apm.network.proto.KeyWithIntegerValue;
+import org.apache.skywalking.apm.network.proto.NetworkAddressMappings;
+import org.apache.skywalking.apm.network.proto.NetworkAddressRegisterServiceGrpc;
+import org.apache.skywalking.apm.network.proto.NetworkAddresses;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author peng-yongsheng
+ */
+public class NetworkAddressRegisterServiceHandler extends NetworkAddressRegisterServiceGrpc.NetworkAddressRegisterServiceImplBase implements GRPCHandler {
+
+    private static final Logger logger = LoggerFactory.getLogger(NetworkAddressRegisterServiceHandler.class);
+
+    private final INetworkAddressIDService networkAddressIDService;
+
+    public NetworkAddressRegisterServiceHandler(ModuleManager moduleManager) {
+        this.networkAddressIDService = moduleManager.find(AnalysisRegisterModule.NAME).getService(INetworkAddressIDService.class);
+    }
+
+    @Override
+    public void batchRegister(NetworkAddresses request, StreamObserver<NetworkAddressMappings> responseObserver) {
+        logger.debug("register application");
+        ProtocolStringList addressesList = request.getAddressesList();
+
+        NetworkAddressMappings.Builder builder = NetworkAddressMappings.newBuilder();
+        for (String networkAddress : addressesList) {
+            int addressId = networkAddressIDService.get(networkAddress);
+
+            if (addressId != 0) {
+                KeyWithIntegerValue value = KeyWithIntegerValue.newBuilder().setKey(networkAddress).setValue(addressId).build();
+                builder.addAddressIds(value);
+            }
+        }
+        responseObserver.onNext(builder.build());
+        responseObserver.onCompleted();
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/SegmentCounter.java b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/SegmentCounter.java
index db933afc6..6e029ba9e 100644
--- a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/SegmentCounter.java
+++ b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/SegmentCounter.java
@@ -1,34 +1,34 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.agent.grpc.provider.handler;
-
-import java.util.concurrent.atomic.AtomicLong;
-
-/**
- * @author peng-yongsheng
- */
-public enum SegmentCounter {
-    INSTANCE;
-
-    private final AtomicLong counter = new AtomicLong(0);
-
-    public long incrementAndGet() {
-        return counter.incrementAndGet();
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.collector.agent.grpc.provider.handler;
+
+import java.util.concurrent.atomic.AtomicLong;
+
+/**
+ * @author peng-yongsheng
+ */
+public enum SegmentCounter {
+    INSTANCE;
+
+    private final AtomicLong counter = new AtomicLong(0);
+
+    public long incrementAndGet() {
+        return counter.incrementAndGet();
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/ServiceNameDiscoveryServiceHandler.java b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/ServiceNameDiscoveryServiceHandler.java
index 61c1e1726..065fb4aa8 100644
--- a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/ServiceNameDiscoveryServiceHandler.java
+++ b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/ServiceNameDiscoveryServiceHandler.java
@@ -1,70 +1,70 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.agent.grpc.provider.handler;
-
-import io.grpc.stub.StreamObserver;
-import java.util.List;
-import org.apache.skywalking.apm.collector.analysis.register.define.AnalysisRegisterModule;
-import org.apache.skywalking.apm.collector.analysis.register.define.service.IServiceNameService;
-import org.apache.skywalking.apm.collector.core.module.ModuleManager;
-import org.apache.skywalking.apm.collector.server.grpc.GRPCHandler;
-import org.apache.skywalking.apm.network.proto.ServiceNameCollection;
-import org.apache.skywalking.apm.network.proto.ServiceNameDiscoveryServiceGrpc;
-import org.apache.skywalking.apm.network.proto.ServiceNameElement;
-import org.apache.skywalking.apm.network.proto.ServiceNameMappingCollection;
-import org.apache.skywalking.apm.network.proto.ServiceNameMappingElement;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author peng-yongsheng
- */
-public class ServiceNameDiscoveryServiceHandler extends ServiceNameDiscoveryServiceGrpc.ServiceNameDiscoveryServiceImplBase implements GRPCHandler {
-
-    private static final Logger logger = LoggerFactory.getLogger(ServiceNameDiscoveryServiceHandler.class);
-
-    private final IServiceNameService serviceNameService;
-
-    public ServiceNameDiscoveryServiceHandler(ModuleManager moduleManager) {
-        this.serviceNameService = moduleManager.find(AnalysisRegisterModule.NAME).getService(IServiceNameService.class);
-    }
-
-    @Override public void discovery(ServiceNameCollection request,
-        StreamObserver<ServiceNameMappingCollection> responseObserver) {
-        List<ServiceNameElement> serviceNameElementList = request.getElementsList();
-
-        ServiceNameMappingCollection.Builder builder = ServiceNameMappingCollection.newBuilder();
-        for (ServiceNameElement serviceNameElement : serviceNameElementList) {
-            int applicationId = serviceNameElement.getApplicationId();
-            String serviceName = serviceNameElement.getServiceName();
-            int srcSpanType = serviceNameElement.getSrcSpanTypeValue();
-            int serviceId = serviceNameService.get(applicationId, srcSpanType, serviceName);
-
-            if (serviceId != 0) {
-                ServiceNameMappingElement.Builder mappingElement = ServiceNameMappingElement.newBuilder();
-                mappingElement.setServiceId(serviceId);
-                mappingElement.setElement(serviceNameElement);
-                builder.addElements(mappingElement);
-            }
-        }
-
-        responseObserver.onNext(builder.build());
-        responseObserver.onCompleted();
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.collector.agent.grpc.provider.handler;
+
+import io.grpc.stub.StreamObserver;
+import java.util.List;
+import org.apache.skywalking.apm.collector.analysis.register.define.AnalysisRegisterModule;
+import org.apache.skywalking.apm.collector.analysis.register.define.service.IServiceNameService;
+import org.apache.skywalking.apm.collector.core.module.ModuleManager;
+import org.apache.skywalking.apm.collector.server.grpc.GRPCHandler;
+import org.apache.skywalking.apm.network.proto.ServiceNameCollection;
+import org.apache.skywalking.apm.network.proto.ServiceNameDiscoveryServiceGrpc;
+import org.apache.skywalking.apm.network.proto.ServiceNameElement;
+import org.apache.skywalking.apm.network.proto.ServiceNameMappingCollection;
+import org.apache.skywalking.apm.network.proto.ServiceNameMappingElement;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author peng-yongsheng
+ */
+public class ServiceNameDiscoveryServiceHandler extends ServiceNameDiscoveryServiceGrpc.ServiceNameDiscoveryServiceImplBase implements GRPCHandler {
+
+    private static final Logger logger = LoggerFactory.getLogger(ServiceNameDiscoveryServiceHandler.class);
+
+    private final IServiceNameService serviceNameService;
+
+    public ServiceNameDiscoveryServiceHandler(ModuleManager moduleManager) {
+        this.serviceNameService = moduleManager.find(AnalysisRegisterModule.NAME).getService(IServiceNameService.class);
+    }
+
+    @Override public void discovery(ServiceNameCollection request,
+        StreamObserver<ServiceNameMappingCollection> responseObserver) {
+        List<ServiceNameElement> serviceNameElementList = request.getElementsList();
+
+        ServiceNameMappingCollection.Builder builder = ServiceNameMappingCollection.newBuilder();
+        for (ServiceNameElement serviceNameElement : serviceNameElementList) {
+            int applicationId = serviceNameElement.getApplicationId();
+            String serviceName = serviceNameElement.getServiceName();
+            int srcSpanType = serviceNameElement.getSrcSpanTypeValue();
+            int serviceId = serviceNameService.get(applicationId, srcSpanType, serviceName);
+
+            if (serviceId != 0) {
+                ServiceNameMappingElement.Builder mappingElement = ServiceNameMappingElement.newBuilder();
+                mappingElement.setServiceId(serviceId);
+                mappingElement.setElement(serviceNameElement);
+                builder.addElements(mappingElement);
+            }
+        }
+
+        responseObserver.onNext(builder.build());
+        responseObserver.onCompleted();
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/TraceSegmentServiceHandler.java b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/TraceSegmentServiceHandler.java
index 4298e791c..67539a521 100644
--- a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/TraceSegmentServiceHandler.java
+++ b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/TraceSegmentServiceHandler.java
@@ -1,69 +1,69 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.agent.grpc.provider.handler;
-
-import io.grpc.stub.StreamObserver;
-import org.apache.skywalking.apm.collector.analysis.segment.parser.define.AnalysisSegmentParserModule;
-import org.apache.skywalking.apm.collector.analysis.segment.parser.define.service.ISegmentParseService;
-import org.apache.skywalking.apm.collector.core.module.ModuleManager;
-import org.apache.skywalking.apm.collector.server.grpc.GRPCHandler;
-import org.apache.skywalking.apm.network.proto.*;
-import org.slf4j.*;
-
-/**
- * @author peng-yongsheng
- */
-public class TraceSegmentServiceHandler extends TraceSegmentServiceGrpc.TraceSegmentServiceImplBase implements GRPCHandler {
-
-    private static final Logger logger = LoggerFactory.getLogger(TraceSegmentServiceHandler.class);
-
-    private final ISegmentParseService segmentParseService;
-    private final Boolean debug;
-
-    public TraceSegmentServiceHandler(ModuleManager moduleManager) {
-        this.segmentParseService = moduleManager.find(AnalysisSegmentParserModule.NAME).getService(ISegmentParseService.class);
-        this.debug = System.getProperty("debug") != null;
-    }
-
-    @Override public StreamObserver<UpstreamSegment> collect(StreamObserver<Downstream> responseObserver) {
-        return new StreamObserver<UpstreamSegment>() {
-            @Override public void onNext(UpstreamSegment segment) {
-                logger.debug("receive segment");
-                segmentParseService.parse(segment, ISegmentParseService.Source.Agent);
-
-                if (debug) {
-                    long count = SegmentCounter.INSTANCE.incrementAndGet();
-                    if (count % 100000 == 0) {
-                        logger.info("received segment count: {}", count);
-                    }
-                }
-            }
-
-            @Override public void onError(Throwable throwable) {
-                logger.error(throwable.getMessage(), throwable);
-                responseObserver.onCompleted();
-            }
-
-            @Override public void onCompleted() {
-                responseObserver.onNext(Downstream.newBuilder().build());
-                responseObserver.onCompleted();
-            }
-        };
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.collector.agent.grpc.provider.handler;
+
+import io.grpc.stub.StreamObserver;
+import org.apache.skywalking.apm.collector.analysis.segment.parser.define.AnalysisSegmentParserModule;
+import org.apache.skywalking.apm.collector.analysis.segment.parser.define.service.ISegmentParseService;
+import org.apache.skywalking.apm.collector.core.module.ModuleManager;
+import org.apache.skywalking.apm.collector.server.grpc.GRPCHandler;
+import org.apache.skywalking.apm.network.proto.*;
+import org.slf4j.*;
+
+/**
+ * @author peng-yongsheng
+ */
+public class TraceSegmentServiceHandler extends TraceSegmentServiceGrpc.TraceSegmentServiceImplBase implements GRPCHandler {
+
+    private static final Logger logger = LoggerFactory.getLogger(TraceSegmentServiceHandler.class);
+
+    private final ISegmentParseService segmentParseService;
+    private final Boolean debug;
+
+    public TraceSegmentServiceHandler(ModuleManager moduleManager) {
+        this.segmentParseService = moduleManager.find(AnalysisSegmentParserModule.NAME).getService(ISegmentParseService.class);
+        this.debug = System.getProperty("debug") != null;
+    }
+
+    @Override public StreamObserver<UpstreamSegment> collect(StreamObserver<Downstream> responseObserver) {
+        return new StreamObserver<UpstreamSegment>() {
+            @Override public void onNext(UpstreamSegment segment) {
+                logger.debug("receive segment");
+                segmentParseService.parse(segment, ISegmentParseService.Source.Agent);
+
+                if (debug) {
+                    long count = SegmentCounter.INSTANCE.incrementAndGet();
+                    if (count % 100000 == 0) {
+                        logger.info("received segment count: {}", count);
+                    }
+                }
+            }
+
+            @Override public void onError(Throwable throwable) {
+                logger.error(throwable.getMessage(), throwable);
+                responseObserver.onCompleted();
+            }
+
+            @Override public void onCompleted() {
+                responseObserver.onNext(Downstream.newBuilder().build());
+                responseObserver.onCompleted();
+            }
+        };
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/naming/AgentGRPCNamingHandler.java b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/naming/AgentGRPCNamingHandler.java
index 3d5ce31f2..9718e1c86 100644
--- a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/naming/AgentGRPCNamingHandler.java
+++ b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/naming/AgentGRPCNamingHandler.java
@@ -1,54 +1,54 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-
-package org.apache.skywalking.apm.collector.agent.grpc.provider.handler.naming;
-
-import com.google.gson.JsonArray;
-import com.google.gson.JsonElement;
-import java.util.Set;
-import javax.servlet.http.HttpServletRequest;
-import org.apache.skywalking.apm.collector.server.jetty.ArgumentsParseException;
-import org.apache.skywalking.apm.collector.server.jetty.JettyHandler;
-
-/**
- * @author peng-yongsheng
- */
-public class AgentGRPCNamingHandler extends JettyHandler {
-
-    private final AgentGRPCNamingListener namingListener;
-
-    public AgentGRPCNamingHandler(AgentGRPCNamingListener namingListener) {
-        this.namingListener = namingListener;
-    }
-
-    @Override public String pathSpec() {
-        return "/agent/gRPC";
-    }
-
-    @Override protected JsonElement doGet(HttpServletRequest req) throws ArgumentsParseException {
-        Set<String> servers = namingListener.getAddresses();
-        JsonArray serverArray = new JsonArray();
-        servers.forEach(serverArray::add);
-        return serverArray;
-    }
-
-    @Override protected JsonElement doPost(HttpServletRequest req) throws ArgumentsParseException {
-        throw new UnsupportedOperationException();
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+package org.apache.skywalking.apm.collector.agent.grpc.provider.handler.naming;
+
+import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
+import java.util.Set;
+import javax.servlet.http.HttpServletRequest;
+import org.apache.skywalking.apm.collector.server.jetty.ArgumentsParseException;
+import org.apache.skywalking.apm.collector.server.jetty.JettyHandler;
+
+/**
+ * @author peng-yongsheng
+ */
+public class AgentGRPCNamingHandler extends JettyHandler {
+
+    private final AgentGRPCNamingListener namingListener;
+
+    public AgentGRPCNamingHandler(AgentGRPCNamingListener namingListener) {
+        this.namingListener = namingListener;
+    }
+
+    @Override public String pathSpec() {
+        return "/agent/gRPC";
+    }
+
+    @Override protected JsonElement doGet(HttpServletRequest req) throws ArgumentsParseException {
+        Set<String> servers = namingListener.getAddresses();
+        JsonArray serverArray = new JsonArray();
+        servers.forEach(serverArray::add);
+        return serverArray;
+    }
+
+    @Override protected JsonElement doPost(HttpServletRequest req) throws ArgumentsParseException {
+        throw new UnsupportedOperationException();
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/naming/AgentGRPCNamingListener.java b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/naming/AgentGRPCNamingListener.java
index c6e231032..1acbe0feb 100644
--- a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/naming/AgentGRPCNamingListener.java
+++ b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/naming/AgentGRPCNamingListener.java
@@ -1,43 +1,43 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.agent.grpc.provider.handler.naming;
-
-import org.apache.skywalking.apm.collector.agent.grpc.define.AgentGRPCModule;
-import org.apache.skywalking.apm.collector.agent.grpc.provider.AgentModuleGRPCProvider;
-import org.apache.skywalking.apm.collector.cluster.ClusterModuleListener;
-
-/**
- * @author peng-yongsheng
- */
-public class AgentGRPCNamingListener extends ClusterModuleListener {
-
-    public static final String PATH = "/" + AgentGRPCModule.NAME + "/" + AgentModuleGRPCProvider.NAME;
-
-    @Override public String path() {
-        return PATH;
-    }
-
-    @Override public void serverJoinNotify(String serverAddress) {
-
-    }
-
-    @Override public void serverQuitNotify(String serverAddress) {
-
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.collector.agent.grpc.provider.handler.naming;
+
+import org.apache.skywalking.apm.collector.agent.grpc.define.AgentGRPCModule;
+import org.apache.skywalking.apm.collector.agent.grpc.provider.AgentModuleGRPCProvider;
+import org.apache.skywalking.apm.collector.cluster.ClusterModuleListener;
+
+/**
+ * @author peng-yongsheng
+ */
+public class AgentGRPCNamingListener extends ClusterModuleListener {
+
+    public static final String PATH = "/" + AgentGRPCModule.NAME + "/" + AgentModuleGRPCProvider.NAME;
+
+    @Override public String path() {
+        return PATH;
+    }
+
+    @Override public void serverJoinNotify(String serverAddress) {
+
+    }
+
+    @Override public void serverQuitNotify(String serverAddress) {
+
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/resources/META-INF/services/org.apache.skywalking.apm.collector.core.module.ModuleProvider b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/resources/META-INF/services/org.apache.skywalking.apm.collector.core.module.ModuleProvider
index c32b4c937..ebeeee598 100644
--- a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/resources/META-INF/services/org.apache.skywalking.apm.collector.core.module.ModuleProvider
+++ b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/resources/META-INF/services/org.apache.skywalking.apm.collector.core.module.ModuleProvider
@@ -1,19 +1,19 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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.
-#
-#
-
-org.apache.skywalking.apm.collector.agent.grpc.provider.AgentModuleGRPCProvider
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+#
+#
+
+org.apache.skywalking.apm.collector.agent.grpc.provider.AgentModuleGRPCProvider
diff --git a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/AgentModuleGRPCProviderTest.java b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/AgentModuleGRPCProviderTest.java
index 8196f4445..4c5ec65f3 100644
--- a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/AgentModuleGRPCProviderTest.java
+++ b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/AgentModuleGRPCProviderTest.java
@@ -1,102 +1,102 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.skywalking.apm.collector.agent.grpc.provider;
-
-import org.apache.skywalking.apm.collector.agent.grpc.define.AgentGRPCModule;
-import org.apache.skywalking.apm.collector.core.module.MockModule;
-import org.apache.skywalking.apm.collector.core.module.ModuleManager;
-import org.apache.skywalking.apm.collector.core.module.ServiceNotProvidedException;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.Mockito;
-import org.mockito.internal.util.reflection.Whitebox;
-import org.mockito.runners.MockitoJUnitRunner;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.anyString;
-import static org.powermock.api.mockito.PowerMockito.when;
-
-/**
- * @author lican
- */
-@RunWith(MockitoJUnitRunner.class)
-public class AgentModuleGRPCProviderTest {
-
-    private AgentModuleGRPCProvider agentModuleGRPCProvider;
-
-    @Mock
-    private AgentModuleGRPCConfig config;
-
-    @Mock
-    private ModuleManager moduleManager;
-
-
-    @Before
-    public void setUp() throws Exception {
-        agentModuleGRPCProvider = new AgentModuleGRPCProvider();
-        when(moduleManager.find(anyString())).then(invocation -> new MockModule());
-        Whitebox.setInternalState(agentModuleGRPCProvider, "config", config);
-        Whitebox.setInternalState(agentModuleGRPCProvider, "manager", moduleManager);
-    }
-
-    @Test
-    public void name() {
-        Assert.assertEquals(agentModuleGRPCProvider.name(), "gRPC");
-    }
-
-    @Test
-    public void module() {
-        Assert.assertEquals(agentModuleGRPCProvider.module(), AgentGRPCModule.class);
-    }
-
-    @Test
-    public void createConfigBeanIfAbsent() {
-        assertEquals(agentModuleGRPCProvider.createConfigBeanIfAbsent(), config);
-    }
-
-    @Test
-    public void prepare() {
-        agentModuleGRPCProvider.prepare();
-    }
-
-    @Test
-    public void start() throws ServiceNotProvidedException {
-        String host = "127.0.0.1";
-        Integer port = 12801;
-        Mockito.when(config.getHost()).thenReturn(host);
-        Mockito.when(config.getPort()).thenReturn(port);
-        Mockito.when(config.getAuthentication()).thenReturn("test_token");
-        agentModuleGRPCProvider.start();
-
-    }
-
-    @Test
-    public void notifyAfterCompleted() {
-        agentModuleGRPCProvider.notifyAfterCompleted();
-    }
-
-    @Test
-    public void requiredModules() {
-        String[] strings = agentModuleGRPCProvider.requiredModules();
-        assertTrue(strings.length > 0);
-    }
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.skywalking.apm.collector.agent.grpc.provider;
+
+import org.apache.skywalking.apm.collector.agent.grpc.define.AgentGRPCModule;
+import org.apache.skywalking.apm.collector.core.module.MockModule;
+import org.apache.skywalking.apm.collector.core.module.ModuleManager;
+import org.apache.skywalking.apm.collector.core.module.ServiceNotProvidedException;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.internal.util.reflection.Whitebox;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Matchers.anyString;
+import static org.powermock.api.mockito.PowerMockito.when;
+
+/**
+ * @author lican
+ */
+@RunWith(MockitoJUnitRunner.class)
+public class AgentModuleGRPCProviderTest {
+
+    private AgentModuleGRPCProvider agentModuleGRPCProvider;
+
+    @Mock
+    private AgentModuleGRPCConfig config;
+
+    @Mock
+    private ModuleManager moduleManager;
+
+
+    @Before
+    public void setUp() throws Exception {
+        agentModuleGRPCProvider = new AgentModuleGRPCProvider();
+        when(moduleManager.find(anyString())).then(invocation -> new MockModule());
+        Whitebox.setInternalState(agentModuleGRPCProvider, "config", config);
+        Whitebox.setInternalState(agentModuleGRPCProvider, "manager", moduleManager);
+    }
+
+    @Test
+    public void name() {
+        Assert.assertEquals(agentModuleGRPCProvider.name(), "gRPC");
+    }
+
+    @Test
+    public void module() {
+        Assert.assertEquals(agentModuleGRPCProvider.module(), AgentGRPCModule.class);
+    }
+
+    @Test
+    public void createConfigBeanIfAbsent() {
+        assertEquals(agentModuleGRPCProvider.createConfigBeanIfAbsent(), config);
+    }
+
+    @Test
+    public void prepare() {
+        agentModuleGRPCProvider.prepare();
+    }
+
+    @Test
+    public void start() throws ServiceNotProvidedException {
+        String host = "127.0.0.1";
+        Integer port = 12801;
+        Mockito.when(config.getHost()).thenReturn(host);
+        Mockito.when(config.getPort()).thenReturn(port);
+        Mockito.when(config.getAuthentication()).thenReturn("test_token");
+        agentModuleGRPCProvider.start();
+
+    }
+
+    @Test
+    public void notifyAfterCompleted() {
+        agentModuleGRPCProvider.notifyAfterCompleted();
+    }
+
+    @Test
+    public void requiredModules() {
+        String[] strings = agentModuleGRPCProvider.requiredModules();
+        assertTrue(strings.length > 0);
+    }
 }
\ No newline at end of file
diff --git a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/AgentModuleGRPCRegistrationTest.java b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/AgentModuleGRPCRegistrationTest.java
index 5239ca19f..bfafee52b 100644
--- a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/AgentModuleGRPCRegistrationTest.java
+++ b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/AgentModuleGRPCRegistrationTest.java
@@ -1,48 +1,48 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.skywalking.apm.collector.agent.grpc.provider;
-
-import org.apache.skywalking.apm.collector.cluster.ModuleRegistration;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.runners.MockitoJUnitRunner;
-
-import static org.junit.Assert.*;
-
-/**
- * @author lican
- */
-@RunWith(MockitoJUnitRunner.class)
-public class AgentModuleGRPCRegistrationTest {
-
-    private AgentModuleGRPCRegistration agentModuleGRPCRegistration;
-
-    @Before
-    public void setUp() throws Exception {
-        agentModuleGRPCRegistration = new AgentModuleGRPCRegistration("127.0.0.1", 10900);
-    }
-
-    @Test
-    public void buildValue() {
-        ModuleRegistration.Value value = agentModuleGRPCRegistration.buildValue();
-        Assert.assertEquals(value.getHostPort(),"127.0.0.1:10900");
-        Assert.assertEquals(value.getContextPath(),"");
-    }
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.skywalking.apm.collector.agent.grpc.provider;
+
+import org.apache.skywalking.apm.collector.cluster.ModuleRegistration;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import static org.junit.Assert.*;
+
+/**
+ * @author lican
+ */
+@RunWith(MockitoJUnitRunner.class)
+public class AgentModuleGRPCRegistrationTest {
+
+    private AgentModuleGRPCRegistration agentModuleGRPCRegistration;
+
+    @Before
+    public void setUp() throws Exception {
+        agentModuleGRPCRegistration = new AgentModuleGRPCRegistration("127.0.0.1", 10900);
+    }
+
+    @Test
+    public void buildValue() {
+        ModuleRegistration.Value value = agentModuleGRPCRegistration.buildValue();
+        Assert.assertEquals(value.getHostPort(),"127.0.0.1:10900");
+        Assert.assertEquals(value.getContextPath(),"");
+    }
 }
\ No newline at end of file
diff --git a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/AuthenticationSimpleCheckerTest.java b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/AuthenticationSimpleCheckerTest.java
index fea67e916..91d05fe58 100644
--- a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/AuthenticationSimpleCheckerTest.java
+++ b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/AuthenticationSimpleCheckerTest.java
@@ -1,105 +1,105 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.skywalking.apm.collector.agent.grpc.provider;
-
-import io.grpc.ServerServiceDefinition;
-import io.grpc.StatusRuntimeException;
-import io.grpc.testing.GrpcServerRule;
-import org.apache.skywalking.apm.collector.agent.grpc.provider.handler.ApplicationRegisterServiceHandler;
-import org.apache.skywalking.apm.collector.core.module.MockModule;
-import org.apache.skywalking.apm.collector.core.module.ModuleManager;
-import org.apache.skywalking.apm.collector.server.ServerException;
-import org.apache.skywalking.apm.collector.server.grpc.GRPCServer;
-import org.apache.skywalking.apm.network.proto.Application;
-import org.apache.skywalking.apm.network.proto.ApplicationMapping;
-import org.apache.skywalking.apm.network.proto.ApplicationRegisterServiceGrpc;
-import org.apache.skywalking.apm.network.proto.KeyWithIntegerValue;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.runners.MockitoJUnitRunner;
-
-import static org.junit.Assert.assertEquals;
-import static org.mockito.Matchers.anyString;
-import static org.powermock.api.mockito.PowerMockito.when;
-
-/**
- * @author lican
- */
-@RunWith(MockitoJUnitRunner.class)
-public class AuthenticationSimpleCheckerTest {
-
-    @Rule
-    public final GrpcServerRule grpcServerRule = new GrpcServerRule().directExecutor();
-
-    @Mock
-    private ModuleManager moduleManager;
-
-    @Before
-    public void setUp() throws Exception {
-        when(moduleManager.find(anyString())).then(invocation -> new MockModule());
-    }
-
-    @Test(expected = StatusRuntimeException.class)
-    public void build() throws ServerException {
-        ApplicationRegisterServiceHandler applicationRegisterServiceHandler = new ApplicationRegisterServiceHandler(moduleManager);
-        MockGRPCServer mockGRPCServer = new MockGRPCServer(grpcServerRule);
-        mockGRPCServer.initialize();
-
-        AuthenticationSimpleChecker.INSTANCE.build(mockGRPCServer, applicationRegisterServiceHandler);
-        grpcServerRule.getServiceRegistry().addService(applicationRegisterServiceHandler);
-
-        ApplicationRegisterServiceGrpc.ApplicationRegisterServiceBlockingStub stub = ApplicationRegisterServiceGrpc.newBlockingStub(grpcServerRule.getChannel());
-        Application application = Application.newBuilder().setApplicationCode("test").build();
-
-        ApplicationMapping applicationMapping = stub.applicationCodeRegister(application);
-        assertEquals(applicationMapping.getApplication(), KeyWithIntegerValue.getDefaultInstance());
-
-        AuthenticationSimpleChecker.INSTANCE.setExpectedToken("test");
-        AuthenticationSimpleChecker.INSTANCE.build(mockGRPCServer, applicationRegisterServiceHandler);
-        stub.applicationCodeRegister(application);
-
-    }
-
-    @Test
-    public void setExpectedToken() {
-
-    }
-
-    class MockGRPCServer extends GRPCServer {
-
-        private GrpcServerRule grpcServerRule;
-
-        public MockGRPCServer(String host, int port) {
-            super(host, port);
-        }
-
-        public MockGRPCServer(GrpcServerRule grpcServerRule) {
-            super("127.0.0.1", 0);
-            this.grpcServerRule = grpcServerRule;
-        }
-
-        public void addHandler(ServerServiceDefinition definition) {
-            grpcServerRule.getServiceRegistry().addService(definition);
-        }
-
-
-    }
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.skywalking.apm.collector.agent.grpc.provider;
+
+import io.grpc.ServerServiceDefinition;
+import io.grpc.StatusRuntimeException;
+import io.grpc.testing.GrpcServerRule;
+import org.apache.skywalking.apm.collector.agent.grpc.provider.handler.ApplicationRegisterServiceHandler;
+import org.apache.skywalking.apm.collector.core.module.MockModule;
+import org.apache.skywalking.apm.collector.core.module.ModuleManager;
+import org.apache.skywalking.apm.collector.server.ServerException;
+import org.apache.skywalking.apm.collector.server.grpc.GRPCServer;
+import org.apache.skywalking.apm.network.proto.Application;
+import org.apache.skywalking.apm.network.proto.ApplicationMapping;
+import org.apache.skywalking.apm.network.proto.ApplicationRegisterServiceGrpc;
+import org.apache.skywalking.apm.network.proto.KeyWithIntegerValue;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Matchers.anyString;
+import static org.powermock.api.mockito.PowerMockito.when;
+
+/**
+ * @author lican
+ */
+@RunWith(MockitoJUnitRunner.class)
+public class AuthenticationSimpleCheckerTest {
+
+    @Rule
+    public final GrpcServerRule grpcServerRule = new GrpcServerRule().directExecutor();
+
+    @Mock
+    private ModuleManager moduleManager;
+
+    @Before
+    public void setUp() throws Exception {
+        when(moduleManager.find(anyString())).then(invocation -> new MockModule());
+    }
+
+    @Test(expected = StatusRuntimeException.class)
+    public void build() throws ServerException {
+        ApplicationRegisterServiceHandler applicationRegisterServiceHandler = new ApplicationRegisterServiceHandler(moduleManager);
+        MockGRPCServer mockGRPCServer = new MockGRPCServer(grpcServerRule);
+        mockGRPCServer.initialize();
+
+        AuthenticationSimpleChecker.INSTANCE.build(mockGRPCServer, applicationRegisterServiceHandler);
+        grpcServerRule.getServiceRegistry().addService(applicationRegisterServiceHandler);
+
+        ApplicationRegisterServiceGrpc.ApplicationRegisterServiceBlockingStub stub = ApplicationRegisterServiceGrpc.newBlockingStub(grpcServerRule.getChannel());
+        Application application = Application.newBuilder().setApplicationCode("test").build();
+
+        ApplicationMapping applicationMapping = stub.applicationCodeRegister(application);
+        assertEquals(applicationMapping.getApplication(), KeyWithIntegerValue.getDefaultInstance());
+
+        AuthenticationSimpleChecker.INSTANCE.setExpectedToken("test");
+        AuthenticationSimpleChecker.INSTANCE.build(mockGRPCServer, applicationRegisterServiceHandler);
+        stub.applicationCodeRegister(application);
+
+    }
+
+    @Test
+    public void setExpectedToken() {
+
+    }
+
+    class MockGRPCServer extends GRPCServer {
+
+        private GrpcServerRule grpcServerRule;
+
+        public MockGRPCServer(String host, int port) {
+            super(host, port);
+        }
+
+        public MockGRPCServer(GrpcServerRule grpcServerRule) {
+            super("127.0.0.1", 0);
+            this.grpcServerRule = grpcServerRule;
+        }
+
+        public void addHandler(ServerServiceDefinition definition) {
+            grpcServerRule.getServiceRegistry().addService(definition);
+        }
+
+
+    }
 }
\ No newline at end of file
diff --git a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/ApplicationRegisterServiceHandlerTest.java b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/ApplicationRegisterServiceHandlerTest.java
index 554aead6d..b5b227ccb 100644
--- a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/ApplicationRegisterServiceHandlerTest.java
+++ b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/ApplicationRegisterServiceHandlerTest.java
@@ -1,81 +1,81 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.skywalking.apm.collector.agent.grpc.provider.handler;
-
-import io.grpc.stub.StreamObserver;
-import org.apache.skywalking.apm.collector.analysis.register.define.service.IApplicationIDService;
-import org.apache.skywalking.apm.collector.core.module.MockModule;
-import org.apache.skywalking.apm.collector.core.module.ModuleManager;
-import org.apache.skywalking.apm.network.proto.Application;
-import org.apache.skywalking.apm.network.proto.ApplicationMapping;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.internal.util.reflection.Whitebox;
-import org.mockito.runners.MockitoJUnitRunner;
-
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Mockito.mock;
-import static org.powermock.api.mockito.PowerMockito.when;
-
-/**
- * @author lican
- */
-@RunWith(MockitoJUnitRunner.class)
-public class ApplicationRegisterServiceHandlerTest {
-
-    private ApplicationRegisterServiceHandler applicationRegisterServiceHandler;
-
-    @Mock
-    private IApplicationIDService applicationIDService;
-
-
-    @Before
-    public void setUp() {
-//        MockitoAnnotations.initMocks(this);
-        ModuleManager moduleManager = mock(ModuleManager.class);
-        when(moduleManager.find(anyString())).then(invocation -> new MockModule());
-        applicationRegisterServiceHandler = new ApplicationRegisterServiceHandler(moduleManager);
-        Whitebox.setInternalState(applicationRegisterServiceHandler, "applicationIDService", applicationIDService);
-
-    }
-
-    @Test
-    public void applicationCodeRegister() {
-        Application application = Application.newBuilder().setApplicationCode("test_code").build();
-        when(applicationIDService.getOrCreateForApplicationCode(anyString())).thenReturn(1000);
-        applicationRegisterServiceHandler.applicationCodeRegister(application, new StreamObserver<ApplicationMapping>() {
-            @Override
-            public void onNext(ApplicationMapping applicationMapping) {
-                Assert.assertTrue(applicationMapping.getApplication().getValue() == 1000);
-            }
-
-            @Override
-            public void onError(Throwable throwable) {
-
-            }
-
-            @Override
-            public void onCompleted() {
-
-            }
-        });
-    }
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.skywalking.apm.collector.agent.grpc.provider.handler;
+
+import io.grpc.stub.StreamObserver;
+import org.apache.skywalking.apm.collector.analysis.register.define.service.IApplicationIDService;
+import org.apache.skywalking.apm.collector.core.module.MockModule;
+import org.apache.skywalking.apm.collector.core.module.ModuleManager;
+import org.apache.skywalking.apm.network.proto.Application;
+import org.apache.skywalking.apm.network.proto.ApplicationMapping;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.internal.util.reflection.Whitebox;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import static org.mockito.Matchers.anyString;
+import static org.mockito.Mockito.mock;
+import static org.powermock.api.mockito.PowerMockito.when;
+
+/**
+ * @author lican
+ */
+@RunWith(MockitoJUnitRunner.class)
+public class ApplicationRegisterServiceHandlerTest {
+
+    private ApplicationRegisterServiceHandler applicationRegisterServiceHandler;
+
+    @Mock
+    private IApplicationIDService applicationIDService;
+
+
+    @Before
+    public void setUp() {
+//        MockitoAnnotations.initMocks(this);
+        ModuleManager moduleManager = mock(ModuleManager.class);
+        when(moduleManager.find(anyString())).then(invocation -> new MockModule());
+        applicationRegisterServiceHandler = new ApplicationRegisterServiceHandler(moduleManager);
+        Whitebox.setInternalState(applicationRegisterServiceHandler, "applicationIDService", applicationIDService);
+
+    }
+
+    @Test
+    public void applicationCodeRegister() {
+        Application application = Application.newBuilder().setApplicationCode("test_code").build();
+        when(applicationIDService.getOrCreateForApplicationCode(anyString())).thenReturn(1000);
+        applicationRegisterServiceHandler.applicationCodeRegister(application, new StreamObserver<ApplicationMapping>() {
+            @Override
+            public void onNext(ApplicationMapping applicationMapping) {
+                Assert.assertTrue(applicationMapping.getApplication().getValue() == 1000);
+            }
+
+            @Override
+            public void onError(Throwable throwable) {
+
+            }
+
+            @Override
+            public void onCompleted() {
+
+            }
+        });
+    }
 }
\ No newline at end of file
diff --git a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/InstanceDiscoveryServiceHandlerTest.java b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/InstanceDiscoveryServiceHandlerTest.java
index d3ab08010..d11f94376 100644
--- a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/InstanceDiscoveryServiceHandlerTest.java
+++ b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/InstanceDiscoveryServiceHandlerTest.java
@@ -1,121 +1,121 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.skywalking.apm.collector.agent.grpc.provider.handler;
-
-import io.grpc.stub.StreamObserver;
-import org.apache.skywalking.apm.collector.analysis.metric.define.service.IInstanceHeartBeatService;
-import org.apache.skywalking.apm.collector.analysis.register.define.service.IInstanceIDService;
-import org.apache.skywalking.apm.collector.core.module.MockModule;
-import org.apache.skywalking.apm.collector.core.module.ModuleManager;
-import org.apache.skywalking.apm.network.proto.*;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.internal.util.reflection.Whitebox;
-import org.mockito.runners.MockitoJUnitRunner;
-
-import java.util.UUID;
-
-import static org.junit.Assert.*;
-import static org.mockito.Matchers.anyInt;
-import static org.mockito.Matchers.anyLong;
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Mockito.mock;
-import static org.powermock.api.mockito.PowerMockito.when;
-
-/**
- * @author lican
- */
-@RunWith(MockitoJUnitRunner.class)
-public class InstanceDiscoveryServiceHandlerTest {
-
-    private InstanceDiscoveryServiceHandler instanceDiscoveryServiceHandler;
-
-    @Mock
-    private IInstanceIDService instanceIDService;
-    @Mock
-    private IInstanceHeartBeatService instanceHeartBeatService;
-
-    @Before
-    public void setUp() throws Exception {
-        ModuleManager moduleManager = mock(ModuleManager.class);
-        when(moduleManager.find(anyString())).then(invocation -> new MockModule());
-        instanceDiscoveryServiceHandler = new InstanceDiscoveryServiceHandler(moduleManager);
-        Whitebox.setInternalState(instanceDiscoveryServiceHandler, "instanceIDService", instanceIDService);
-        Whitebox.setInternalState(instanceDiscoveryServiceHandler, "instanceHeartBeatService", instanceHeartBeatService);
-    }
-
-    @Test
-    public void registerInstance() {
-        ApplicationInstance applicationInstance = ApplicationInstance.newBuilder()
-                .setAgentUUID(UUID.randomUUID().toString())
-                .setApplicationId(10)
-                .setRegisterTime(System.currentTimeMillis())
-                .setOsinfo(
-                        OSInfo.newBuilder()
-                                .setOsName("MAC OS")
-                                .setHostname("test")
-                                .addIpv4S("127.0.0.1")
-                                .setProcessNo(123456)
-                                .build()
-                ).build();
-        when(instanceIDService.getOrCreateByAgentUUID(anyInt(), anyString(), anyLong(), anyString())).thenReturn(100);
-        instanceDiscoveryServiceHandler.registerInstance(applicationInstance, new StreamObserver<ApplicationInstanceMapping>() {
-            @Override
-            public void onNext(ApplicationInstanceMapping applicationInstanceMapping) {
-                Assert.assertEquals(100,applicationInstanceMapping.getApplicationInstanceId());
-            }
-
-            @Override
-            public void onError(Throwable throwable) {
-
-            }
-
-            @Override
-            public void onCompleted() {
-
-            }
-        });
-    }
-
-    @Test
-    public void heartbeat() {
-        ApplicationInstanceHeartbeat heartbeat = ApplicationInstanceHeartbeat.newBuilder()
-                .setApplicationInstanceId(100)
-                .setHeartbeatTime(System.currentTimeMillis())
-                .build();
-        instanceDiscoveryServiceHandler.heartbeat(heartbeat, new StreamObserver<Downstream>() {
-            @Override
-            public void onNext(Downstream downstream) {
-                Assert.assertEquals(Downstream.getDefaultInstance(),downstream);
-            }
-
-            @Override
-            public void onError(Throwable throwable) {
-
-            }
-
-            @Override
-            public void onCompleted() {
-
-            }
-        });
-    }
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.skywalking.apm.collector.agent.grpc.provider.handler;
+
+import io.grpc.stub.StreamObserver;
+import org.apache.skywalking.apm.collector.analysis.metric.define.service.IInstanceHeartBeatService;
+import org.apache.skywalking.apm.collector.analysis.register.define.service.IInstanceIDService;
+import org.apache.skywalking.apm.collector.core.module.MockModule;
+import org.apache.skywalking.apm.collector.core.module.ModuleManager;
+import org.apache.skywalking.apm.network.proto.*;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.internal.util.reflection.Whitebox;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import java.util.UUID;
+
+import static org.junit.Assert.*;
+import static org.mockito.Matchers.anyInt;
+import static org.mockito.Matchers.anyLong;
+import static org.mockito.Matchers.anyString;
+import static org.mockito.Mockito.mock;
+import static org.powermock.api.mockito.PowerMockito.when;
+
+/**
+ * @author lican
+ */
+@RunWith(MockitoJUnitRunner.class)
+public class InstanceDiscoveryServiceHandlerTest {
+
+    private InstanceDiscoveryServiceHandler instanceDiscoveryServiceHandler;
+
+    @Mock
+    private IInstanceIDService instanceIDService;
+    @Mock
+    private IInstanceHeartBeatService instanceHeartBeatService;
+
+    @Before
+    public void setUp() throws Exception {
+        ModuleManager moduleManager = mock(ModuleManager.class);
+        when(moduleManager.find(anyString())).then(invocation -> new MockModule());
+        instanceDiscoveryServiceHandler = new InstanceDiscoveryServiceHandler(moduleManager);
+        Whitebox.setInternalState(instanceDiscoveryServiceHandler, "instanceIDService", instanceIDService);
+        Whitebox.setInternalState(instanceDiscoveryServiceHandler, "instanceHeartBeatService", instanceHeartBeatService);
+    }
+
+    @Test
+    public void registerInstance() {
+        ApplicationInstance applicationInstance = ApplicationInstance.newBuilder()
+                .setAgentUUID(UUID.randomUUID().toString())
+                .setApplicationId(10)
+                .setRegisterTime(System.currentTimeMillis())
+                .setOsinfo(
+                        OSInfo.newBuilder()
+                                .setOsName("MAC OS")
+                                .setHostname("test")
+                                .addIpv4S("127.0.0.1")
+                                .setProcessNo(123456)
+                                .build()
+                ).build();
+        when(instanceIDService.getOrCreateByAgentUUID(anyInt(), anyString(), anyLong(), anyString())).thenReturn(100);
+        instanceDiscoveryServiceHandler.registerInstance(applicationInstance, new StreamObserver<ApplicationInstanceMapping>() {
+            @Override
+            public void onNext(ApplicationInstanceMapping applicationInstanceMapping) {
+                Assert.assertEquals(100,applicationInstanceMapping.getApplicationInstanceId());
+            }
+
+            @Override
+            public void onError(Throwable throwable) {
+
+            }
+
+            @Override
+            public void onCompleted() {
+
+            }
+        });
+    }
+
+    @Test
+    public void heartbeat() {
+        ApplicationInstanceHeartbeat heartbeat = ApplicationInstanceHeartbeat.newBuilder()
+                .setApplicationInstanceId(100)
+                .setHeartbeatTime(System.currentTimeMillis())
+                .build();
+        instanceDiscoveryServiceHandler.heartbeat(heartbeat, new StreamObserver<Downstream>() {
+            @Override
+            public void onNext(Downstream downstream) {
+                Assert.assertEquals(Downstream.getDefaultInstance(),downstream);
+            }
+
+            @Override
+            public void onError(Throwable throwable) {
+
+            }
+
+            @Override
+            public void onCompleted() {
+
+            }
+        });
+    }
 }
\ No newline at end of file
diff --git a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/JVMMetricsServiceHandlerTest.java b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/JVMMetricsServiceHandlerTest.java
index 3194d9254..90e92ad4b 100644
--- a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/JVMMetricsServiceHandlerTest.java
+++ b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/JVMMetricsServiceHandlerTest.java
@@ -1,154 +1,154 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.skywalking.apm.collector.agent.grpc.provider.handler;
-
-import io.grpc.stub.StreamObserver;
-import org.apache.skywalking.apm.collector.analysis.jvm.define.service.ICpuMetricService;
-import org.apache.skywalking.apm.collector.analysis.jvm.define.service.IGCMetricService;
-import org.apache.skywalking.apm.collector.analysis.jvm.define.service.IMemoryMetricService;
-import org.apache.skywalking.apm.collector.analysis.jvm.define.service.IMemoryPoolMetricService;
-import org.apache.skywalking.apm.collector.analysis.metric.define.service.IInstanceHeartBeatService;
-import org.apache.skywalking.apm.collector.core.module.MockModule;
-import org.apache.skywalking.apm.collector.core.module.ModuleManager;
-import org.apache.skywalking.apm.network.proto.*;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.internal.util.reflection.Whitebox;
-import org.mockito.runners.MockitoJUnitRunner;
-
-import java.lang.management.*;
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Mockito.mock;
-import static org.powermock.api.mockito.PowerMockito.when;
-
-/**
- * @author lican
- */
-@RunWith(MockitoJUnitRunner.class)
-public class JVMMetricsServiceHandlerTest {
-
-    @Mock
-    private ICpuMetricService cpuMetricService;
-    @Mock
-    private IGCMetricService gcMetricService;
-    @Mock
-    private IMemoryMetricService memoryMetricService;
-    @Mock
-    private IMemoryPoolMetricService memoryPoolMetricService;
-    @Mock
-    private IInstanceHeartBeatService instanceHeartBeatService;
-
-    private JVMMetricsServiceHandler jvmMetricsServiceHandler;
-
-    @Before
-    public void setUp() {
-        ModuleManager moduleManager = mock(ModuleManager.class);
-        when(moduleManager.find(anyString())).then(invocation -> new MockModule());
-        jvmMetricsServiceHandler = new JVMMetricsServiceHandler(moduleManager);
-        Whitebox.setInternalState(jvmMetricsServiceHandler, "cpuMetricService", cpuMetricService);
-        Whitebox.setInternalState(jvmMetricsServiceHandler, "gcMetricService", gcMetricService);
-        Whitebox.setInternalState(jvmMetricsServiceHandler, "memoryMetricService", memoryMetricService);
-        Whitebox.setInternalState(jvmMetricsServiceHandler, "memoryPoolMetricService", memoryPoolMetricService);
-        Whitebox.setInternalState(jvmMetricsServiceHandler, "instanceHeartBeatService", instanceHeartBeatService);
-    }
-
-
-    @Test
-    public void collect() {
-        List<GarbageCollectorMXBean> beans = ManagementFactory.getGarbageCollectorMXBeans();
-        List<GC> gcList = new ArrayList<>();
-        for (GarbageCollectorMXBean bean : beans) {
-            gcList.add(GC.newBuilder().setPhrase(GCPhrase.NEW)
-                    .setCount(10)
-                    .setTime(100)
-                    .build());
-        }
-        CPU cpu = CPU.newBuilder()
-                .setUsagePercent(80.0d)
-                .build();
-
-        List<Memory> memoryList = new LinkedList<Memory>();
-
-        MemoryMXBean memoryMXBean = ManagementFactory.getMemoryMXBean();
-        MemoryUsage heapMemoryUsage = memoryMXBean.getHeapMemoryUsage();
-        Memory.Builder heapMemoryBuilder = Memory.newBuilder();
-        heapMemoryBuilder.setIsHeap(true);
-        heapMemoryBuilder.setInit(heapMemoryUsage.getInit());
-        heapMemoryBuilder.setUsed(heapMemoryUsage.getUsed());
-        heapMemoryBuilder.setCommitted(heapMemoryUsage.getCommitted());
-        heapMemoryBuilder.setMax(heapMemoryUsage.getMax());
-        memoryList.add(heapMemoryBuilder.build());
-
-        MemoryUsage nonHeapMemoryUsage = memoryMXBean.getNonHeapMemoryUsage();
-        Memory.Builder nonHeapMemoryBuilder = Memory.newBuilder();
-        nonHeapMemoryBuilder.setIsHeap(false);
-        nonHeapMemoryBuilder.setInit(nonHeapMemoryUsage.getInit());
-        nonHeapMemoryBuilder.setUsed(nonHeapMemoryUsage.getUsed());
-        nonHeapMemoryBuilder.setCommitted(nonHeapMemoryUsage.getCommitted());
-        nonHeapMemoryBuilder.setMax(nonHeapMemoryUsage.getMax());
-        memoryList.add(nonHeapMemoryBuilder.build());
-
-        List<MemoryPoolMXBean> memoryPoolMXBeans = ManagementFactory.getMemoryPoolMXBeans();
-        List<MemoryPool> poolList = new LinkedList<MemoryPool>();
-        for (MemoryPoolMXBean memoryPoolMXBean : memoryPoolMXBeans) {
-            MemoryUsage usage = memoryPoolMXBean.getUsage();
-            poolList.add(MemoryPool.newBuilder().setType(PoolType.CODE_CACHE_USAGE)
-                    .setInit(usage.getInit())
-                    .setMax(usage.getMax())
-                    .setCommited(usage.getCommitted())
-                    .setUsed(usage.getUsed())
-                    .build());
-        }
-
-        JVMMetric jvmMetric = JVMMetric.newBuilder()
-                .addAllGc(gcList)
-                .setCpu(cpu)
-                .addAllMemory(memoryList)
-                .addAllMemoryPool(poolList)
-                .setTime(System.currentTimeMillis())
-                .build();
-        JVMMetrics request = JVMMetrics.newBuilder()
-                .addMetrics(jvmMetric)
-                .setApplicationInstanceId(120)
-                .build();
-
-        jvmMetricsServiceHandler.collect(request, new StreamObserver<Downstream>() {
-            @Override
-            public void onNext(Downstream downstream) {
-                Assert.assertEquals(downstream.isInitialized(), true);
-            }
-
-            @Override
-            public void onError(Throwable throwable) {
-
-            }
-
-            @Override
-            public void onCompleted() {
-
-            }
-        });
-    }
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.skywalking.apm.collector.agent.grpc.provider.handler;
+
+import io.grpc.stub.StreamObserver;
+import org.apache.skywalking.apm.collector.analysis.jvm.define.service.ICpuMetricService;
+import org.apache.skywalking.apm.collector.analysis.jvm.define.service.IGCMetricService;
+import org.apache.skywalking.apm.collector.analysis.jvm.define.service.IMemoryMetricService;
+import org.apache.skywalking.apm.collector.analysis.jvm.define.service.IMemoryPoolMetricService;
+import org.apache.skywalking.apm.collector.analysis.metric.define.service.IInstanceHeartBeatService;
+import org.apache.skywalking.apm.collector.core.module.MockModule;
+import org.apache.skywalking.apm.collector.core.module.ModuleManager;
+import org.apache.skywalking.apm.network.proto.*;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.internal.util.reflection.Whitebox;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import java.lang.management.*;
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+
+import static org.mockito.Matchers.anyString;
+import static org.mockito.Mockito.mock;
+import static org.powermock.api.mockito.PowerMockito.when;
+
+/**
+ * @author lican
+ */
+@RunWith(MockitoJUnitRunner.class)
+public class JVMMetricsServiceHandlerTest {
+
+    @Mock
+    private ICpuMetricService cpuMetricService;
+    @Mock
+    private IGCMetricService gcMetricService;
+    @Mock
+    private IMemoryMetricService memoryMetricService;
+    @Mock
+    private IMemoryPoolMetricService memoryPoolMetricService;
+    @Mock
+    private IInstanceHeartBeatService instanceHeartBeatService;
+
+    private JVMMetricsServiceHandler jvmMetricsServiceHandler;
+
+    @Before
+    public void setUp() {
+        ModuleManager moduleManager = mock(ModuleManager.class);
+        when(moduleManager.find(anyString())).then(invocation -> new MockModule());
+        jvmMetricsServiceHandler = new JVMMetricsServiceHandler(moduleManager);
+        Whitebox.setInternalState(jvmMetricsServiceHandler, "cpuMetricService", cpuMetricService);
+        Whitebox.setInternalState(jvmMetricsServiceHandler, "gcMetricService", gcMetricService);
+        Whitebox.setInternalState(jvmMetricsServiceHandler, "memoryMetricService", memoryMetricService);
+        Whitebox.setInternalState(jvmMetricsServiceHandler, "memoryPoolMetricService", memoryPoolMetricService);
+        Whitebox.setInternalState(jvmMetricsServiceHandler, "instanceHeartBeatService", instanceHeartBeatService);
+    }
+
+
+    @Test
+    public void collect() {
+        List<GarbageCollectorMXBean> beans = ManagementFactory.getGarbageCollectorMXBeans();
+        List<GC> gcList = new ArrayList<>();
+        for (GarbageCollectorMXBean bean : beans) {
+            gcList.add(GC.newBuilder().setPhrase(GCPhrase.NEW)
+                    .setCount(10)
+                    .setTime(100)
+                    .build());
+        }
+        CPU cpu = CPU.newBuilder()
+                .setUsagePercent(80.0d)
+                .build();
+
+        List<Memory> memoryList = new LinkedList<Memory>();
+
+        MemoryMXBean memoryMXBean = ManagementFactory.getMemoryMXBean();
+        MemoryUsage heapMemoryUsage = memoryMXBean.getHeapMemoryUsage();
+        Memory.Builder heapMemoryBuilder = Memory.newBuilder();
+        heapMemoryBuilder.setIsHeap(true);
+        heapMemoryBuilder.setInit(heapMemoryUsage.getInit());
+        heapMemoryBuilder.setUsed(heapMemoryUsage.getUsed());
+        heapMemoryBuilder.setCommitted(heapMemoryUsage.getCommitted());
+        heapMemoryBuilder.setMax(heapMemoryUsage.getMax());
+        memoryList.add(heapMemoryBuilder.build());
+
+        MemoryUsage nonHeapMemoryUsage = memoryMXBean.getNonHeapMemoryUsage();
+        Memory.Builder nonHeapMemoryBuilder = Memory.newBuilder();
+        nonHeapMemoryBuilder.setIsHeap(false);
+        nonHeapMemoryBuilder.setInit(nonHeapMemoryUsage.getInit());
+        nonHeapMemoryBuilder.setUsed(nonHeapMemoryUsage.getUsed());
+        nonHeapMemoryBuilder.setCommitted(nonHeapMemoryUsage.getCommitted());
+        nonHeapMemoryBuilder.setMax(nonHeapMemoryUsage.getMax());
+        memoryList.add(nonHeapMemoryBuilder.build());
+
+        List<MemoryPoolMXBean> memoryPoolMXBeans = ManagementFactory.getMemoryPoolMXBeans();
+        List<MemoryPool> poolList = new LinkedList<MemoryPool>();
+        for (MemoryPoolMXBean memoryPoolMXBean : memoryPoolMXBeans) {
+            MemoryUsage usage = memoryPoolMXBean.getUsage();
+            poolList.add(MemoryPool.newBuilder().setType(PoolType.CODE_CACHE_USAGE)
+                    .setInit(usage.getInit())
+                    .setMax(usage.getMax())
+                    .setCommited(usage.getCommitted())
+                    .setUsed(usage.getUsed())
+                    .build());
+        }
+
+        JVMMetric jvmMetric = JVMMetric.newBuilder()
+                .addAllGc(gcList)
+                .setCpu(cpu)
+                .addAllMemory(memoryList)
+                .addAllMemoryPool(poolList)
+                .setTime(System.currentTimeMillis())
+                .build();
+        JVMMetrics request = JVMMetrics.newBuilder()
+                .addMetrics(jvmMetric)
+                .setApplicationInstanceId(120)
+                .build();
+
+        jvmMetricsServiceHandler.collect(request, new StreamObserver<Downstream>() {
+            @Override
+            public void onNext(Downstream downstream) {
+                Assert.assertEquals(downstream.isInitialized(), true);
+            }
+
+            @Override
+            public void onError(Throwable throwable) {
+
+            }
+
+            @Override
+            public void onCompleted() {
+
+            }
+        });
+    }
 }
\ No newline at end of file
diff --git a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/NetworkAddressRegisterServiceHandlerTest.java b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/NetworkAddressRegisterServiceHandlerTest.java
index 5becd467a..b193baa5a 100644
--- a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/NetworkAddressRegisterServiceHandlerTest.java
+++ b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/NetworkAddressRegisterServiceHandlerTest.java
@@ -1,81 +1,81 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.skywalking.apm.collector.agent.grpc.provider.handler;
-
-import io.grpc.stub.StreamObserver;
-import org.apache.skywalking.apm.collector.analysis.register.define.service.INetworkAddressIDService;
-import org.apache.skywalking.apm.collector.core.module.MockModule;
-import org.apache.skywalking.apm.collector.core.module.ModuleManager;
-import org.apache.skywalking.apm.network.proto.NetworkAddressMappings;
-import org.apache.skywalking.apm.network.proto.NetworkAddresses;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.internal.util.reflection.Whitebox;
-import org.mockito.runners.MockitoJUnitRunner;
-
-import static org.junit.Assert.*;
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Mockito.mock;
-import static org.powermock.api.mockito.PowerMockito.when;
-
-/**
- * @author lican
- */
-@RunWith(MockitoJUnitRunner.class)
-public class NetworkAddressRegisterServiceHandlerTest {
-
-    @Mock
-    private INetworkAddressIDService networkAddressIDService;
-
-    private NetworkAddressRegisterServiceHandler networkAddressRegisterServiceHandler;
-
-    @Before
-    public void setUp() throws Exception {
-        ModuleManager moduleManager = mock(ModuleManager.class);
-        when(moduleManager.find(anyString())).then(invocation -> new MockModule());
-        networkAddressRegisterServiceHandler = new NetworkAddressRegisterServiceHandler(moduleManager);
-        Whitebox.setInternalState(networkAddressRegisterServiceHandler, "networkAddressIDService", networkAddressIDService);
-    }
-
-    @Test
-    public void batchRegister() {
-        NetworkAddresses networkAddresses = NetworkAddresses.newBuilder()
-                .addAddresses("127.0.0.1:6379")
-                .build();
-        when(networkAddressIDService.get(anyString())).thenReturn(1);
-        networkAddressRegisterServiceHandler.batchRegister(networkAddresses, new StreamObserver<NetworkAddressMappings>() {
-            @Override
-            public void onNext(NetworkAddressMappings networkAddressMappings) {
-                Assert.assertEquals(networkAddressMappings.getAddressIdsList().get(0).getValue(), 1);
-            }
-
-            @Override
-            public void onError(Throwable throwable) {
-
-            }
-
-            @Override
-            public void onCompleted() {
-
-            }
-        });
-    }
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.skywalking.apm.collector.agent.grpc.provider.handler;
+
+import io.grpc.stub.StreamObserver;
+import org.apache.skywalking.apm.collector.analysis.register.define.service.INetworkAddressIDService;
+import org.apache.skywalking.apm.collector.core.module.MockModule;
+import org.apache.skywalking.apm.collector.core.module.ModuleManager;
+import org.apache.skywalking.apm.network.proto.NetworkAddressMappings;
+import org.apache.skywalking.apm.network.proto.NetworkAddresses;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.internal.util.reflection.Whitebox;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import static org.junit.Assert.*;
+import static org.mockito.Matchers.anyString;
+import static org.mockito.Mockito.mock;
+import static org.powermock.api.mockito.PowerMockito.when;
+
+/**
+ * @author lican
+ */
+@RunWith(MockitoJUnitRunner.class)
+public class NetworkAddressRegisterServiceHandlerTest {
+
+    @Mock
+    private INetworkAddressIDService networkAddressIDService;
+
+    private NetworkAddressRegisterServiceHandler networkAddressRegisterServiceHandler;
+
+    @Before
+    public void setUp() throws Exception {
+        ModuleManager moduleManager = mock(ModuleManager.class);
+        when(moduleManager.find(anyString())).then(invocation -> new MockModule());
+        networkAddressRegisterServiceHandler = new NetworkAddressRegisterServiceHandler(moduleManager);
+        Whitebox.setInternalState(networkAddressRegisterServiceHandler, "networkAddressIDService", networkAddressIDService);
+    }
+
+    @Test
+    public void batchRegister() {
+        NetworkAddresses networkAddresses = NetworkAddresses.newBuilder()
+                .addAddresses("127.0.0.1:6379")
+                .build();
+        when(networkAddressIDService.get(anyString())).thenReturn(1);
+        networkAddressRegisterServiceHandler.batchRegister(networkAddresses, new StreamObserver<NetworkAddressMappings>() {
+            @Override
+            public void onNext(NetworkAddressMappings networkAddressMappings) {
+                Assert.assertEquals(networkAddressMappings.getAddressIdsList().get(0).getValue(), 1);
+            }
+
+            @Override
+            public void onError(Throwable throwable) {
+
+            }
+
+            @Override
+            public void onCompleted() {
+
+            }
+        });
+    }
 }
\ No newline at end of file
diff --git a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/SegmentCounterTest.java b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/SegmentCounterTest.java
index 30f8191d3..dd7dfeeb5 100644
--- a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/SegmentCounterTest.java
+++ b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/SegmentCounterTest.java
@@ -1,38 +1,38 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.skywalking.apm.collector.agent.grpc.provider.handler;
-
-import org.junit.Assert;
-import org.junit.Test;
-import org.mockito.internal.util.reflection.Whitebox;
-
-import java.util.concurrent.atomic.AtomicLong;
-
-/**
- * @author lican
- */
-public class SegmentCounterTest {
-
-    @Test
-    public void incrementAndGet() {
-        //set default value in case in other test has increments
-        Whitebox.setInternalState(SegmentCounter.INSTANCE, "counter", new AtomicLong(0));
-        long l = SegmentCounter.INSTANCE.incrementAndGet();
-        Assert.assertEquals(1L, l);
-    }
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.skywalking.apm.collector.agent.grpc.provider.handler;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.mockito.internal.util.reflection.Whitebox;
+
+import java.util.concurrent.atomic.AtomicLong;
+
+/**
+ * @author lican
+ */
+public class SegmentCounterTest {
+
+    @Test
+    public void incrementAndGet() {
+        //set default value in case in other test has increments
+        Whitebox.setInternalState(SegmentCounter.INSTANCE, "counter", new AtomicLong(0));
+        long l = SegmentCounter.INSTANCE.incrementAndGet();
+        Assert.assertEquals(1L, l);
+    }
 }
\ No newline at end of file
diff --git a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/ServiceNameDiscoveryServiceHandlerTest.java b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/ServiceNameDiscoveryServiceHandlerTest.java
index cf91d47a0..6dbd9a9a8 100644
--- a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/ServiceNameDiscoveryServiceHandlerTest.java
+++ b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/ServiceNameDiscoveryServiceHandlerTest.java
@@ -1,89 +1,89 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.skywalking.apm.collector.agent.grpc.provider.handler;
-
-import io.grpc.stub.StreamObserver;
-import org.apache.skywalking.apm.collector.analysis.register.define.service.IServiceNameService;
-import org.apache.skywalking.apm.collector.core.module.MockModule;
-import org.apache.skywalking.apm.collector.core.module.ModuleManager;
-import org.apache.skywalking.apm.network.proto.*;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.internal.util.reflection.Whitebox;
-import org.mockito.runners.MockitoJUnitRunner;
-
-import static org.junit.Assert.*;
-import static org.mockito.Matchers.anyInt;
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Mockito.mock;
-import static org.powermock.api.mockito.PowerMockito.when;
-
-/**
- * @author lican
- */
-@RunWith(MockitoJUnitRunner.class)
-public class ServiceNameDiscoveryServiceHandlerTest {
-
-    @Mock
-    private IServiceNameService serviceNameService;
-
-    private ServiceNameDiscoveryServiceHandler serviceNameDiscoveryServiceHandler;
-
-    @Before
-    public void setUp() throws Exception {
-        ModuleManager moduleManager = mock(ModuleManager.class);
-        when(moduleManager.find(anyString())).then(invocation -> new MockModule());
-        serviceNameDiscoveryServiceHandler = new ServiceNameDiscoveryServiceHandler(moduleManager);
-        Whitebox.setInternalState(serviceNameDiscoveryServiceHandler, "serviceNameService", serviceNameService);
-
-    }
-
-    @Test
-    public void discovery() {
-        ServiceNameElement element = ServiceNameElement.newBuilder()
-                .setApplicationId(10)
-                .setServiceName("/hello/world")
-                .setSrcSpanType(SpanType.Entry)
-                .build();
-        ServiceNameCollection nameCollection = ServiceNameCollection.newBuilder()
-                .addElements(element)
-                .build();
-        when(serviceNameService.get(anyInt(), anyInt(), anyString())).thenReturn(1);
-        serviceNameDiscoveryServiceHandler.discovery(nameCollection, new StreamObserver<ServiceNameMappingCollection>() {
-            @Override
-            public void onNext(ServiceNameMappingCollection serviceNameMappingCollection) {
-                ServiceNameMappingElement mappingElement = serviceNameMappingCollection.getElementsList().get(0);
-                assertEquals(mappingElement.getElement(), element);
-                int serviceId = mappingElement.getServiceId();
-                assertEquals(serviceId, 1);
-            }
-
-            @Override
-            public void onError(Throwable throwable) {
-
-            }
-
-            @Override
-            public void onCompleted() {
-
-            }
-        });
-    }
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.skywalking.apm.collector.agent.grpc.provider.handler;
+
+import io.grpc.stub.StreamObserver;
+import org.apache.skywalking.apm.collector.analysis.register.define.service.IServiceNameService;
+import org.apache.skywalking.apm.collector.core.module.MockModule;
+import org.apache.skywalking.apm.collector.core.module.ModuleManager;
+import org.apache.skywalking.apm.network.proto.*;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.internal.util.reflection.Whitebox;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import static org.junit.Assert.*;
+import static org.mockito.Matchers.anyInt;
+import static org.mockito.Matchers.anyString;
+import static org.mockito.Mockito.mock;
+import static org.powermock.api.mockito.PowerMockito.when;
+
+/**
+ * @author lican
+ */
+@RunWith(MockitoJUnitRunner.class)
+public class ServiceNameDiscoveryServiceHandlerTest {
+
+    @Mock
+    private IServiceNameService serviceNameService;
+
+    private ServiceNameDiscoveryServiceHandler serviceNameDiscoveryServiceHandler;
+
+    @Before
+    public void setUp() throws Exception {
+        ModuleManager moduleManager = mock(ModuleManager.class);
+        when(moduleManager.find(anyString())).then(invocation -> new MockModule());
+        serviceNameDiscoveryServiceHandler = new ServiceNameDiscoveryServiceHandler(moduleManager);
+        Whitebox.setInternalState(serviceNameDiscoveryServiceHandler, "serviceNameService", serviceNameService);
+
+    }
+
+    @Test
+    public void discovery() {
+        ServiceNameElement element = ServiceNameElement.newBuilder()
+                .setApplicationId(10)
+                .setServiceName("/hello/world")
+                .setSrcSpanType(SpanType.Entry)
+                .build();
+        ServiceNameCollection nameCollection = ServiceNameCollection.newBuilder()
+                .addElements(element)
+                .build();
+        when(serviceNameService.get(anyInt(), anyInt(), anyString())).thenReturn(1);
+        serviceNameDiscoveryServiceHandler.discovery(nameCollection, new StreamObserver<ServiceNameMappingCollection>() {
+            @Override
+            public void onNext(ServiceNameMappingCollection serviceNameMappingCollection) {
+                ServiceNameMappingElement mappingElement = serviceNameMappingCollection.getElementsList().get(0);
+                assertEquals(mappingElement.getElement(), element);
+                int serviceId = mappingElement.getServiceId();
+                assertEquals(serviceId, 1);
+            }
+
+            @Override
+            public void onError(Throwable throwable) {
+
+            }
+
+            @Override
+            public void onCompleted() {
+
+            }
+        });
+    }
 }
\ No newline at end of file
diff --git a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/TraceSegmentServiceHandlerTest.java b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/TraceSegmentServiceHandlerTest.java
index 3a260c535..73aa98683 100644
--- a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/TraceSegmentServiceHandlerTest.java
+++ b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/TraceSegmentServiceHandlerTest.java
@@ -1,83 +1,83 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.skywalking.apm.collector.agent.grpc.provider.handler;
-
-import io.grpc.stub.StreamObserver;
-import org.apache.skywalking.apm.collector.analysis.segment.parser.define.service.ISegmentParseService;
-import org.apache.skywalking.apm.collector.core.module.MockModule;
-import org.apache.skywalking.apm.collector.core.module.ModuleManager;
-import org.apache.skywalking.apm.network.proto.Downstream;
-import org.apache.skywalking.apm.network.proto.UpstreamSegment;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.internal.util.reflection.Whitebox;
-import org.mockito.runners.MockitoJUnitRunner;
-
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Mockito.mock;
-import static org.powermock.api.mockito.PowerMockito.when;
-
-/**
- * @author lican
- */
-@RunWith(MockitoJUnitRunner.class)
-public class TraceSegmentServiceHandlerTest {
-
-    private TraceSegmentServiceHandler traceSegmentServiceHandler;
-
-    @Mock
-    private ISegmentParseService segmentParseService;
-
-    @Before
-    public void setUp() {
-        System.setProperty("debug", "true");
-        ModuleManager moduleManager = mock(ModuleManager.class);
-        when(moduleManager.find(anyString())).then(invocation -> new MockModule());
-        traceSegmentServiceHandler = new TraceSegmentServiceHandler(moduleManager);
-        Whitebox.setInternalState(traceSegmentServiceHandler, "segmentParseService", segmentParseService);
-
-    }
-
-    @Test
-    public void collect() {
-        StreamObserver<UpstreamSegment> upstreamSegmentStreamObserver = traceSegmentServiceHandler.collect(new StreamObserver<Downstream>() {
-            @Override
-            public void onNext(Downstream downstream) {
-                assertTrue(downstream.isInitialized());
-            }
-
-            @Override
-            public void onError(Throwable throwable) {
-                assertTrue(throwable instanceof IllegalArgumentException);
-            }
-
-            @Override
-            public void onCompleted() {
-
-
-            }
-        });
-        UpstreamSegment upstreamSegment = UpstreamSegment.newBuilder().build();
-        upstreamSegmentStreamObserver.onNext(upstreamSegment);
-        upstreamSegmentStreamObserver.onError(new IllegalArgumentException("exception"));
-        upstreamSegmentStreamObserver.onCompleted();
-    }
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.skywalking.apm.collector.agent.grpc.provider.handler;
+
+import io.grpc.stub.StreamObserver;
+import org.apache.skywalking.apm.collector.analysis.segment.parser.define.service.ISegmentParseService;
+import org.apache.skywalking.apm.collector.core.module.MockModule;
+import org.apache.skywalking.apm.collector.core.module.ModuleManager;
+import org.apache.skywalking.apm.network.proto.Downstream;
+import org.apache.skywalking.apm.network.proto.UpstreamSegment;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.internal.util.reflection.Whitebox;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Matchers.anyString;
+import static org.mockito.Mockito.mock;
+import static org.powermock.api.mockito.PowerMockito.when;
+
+/**
+ * @author lican
+ */
+@RunWith(MockitoJUnitRunner.class)
+public class TraceSegmentServiceHandlerTest {
+
+    private TraceSegmentServiceHandler traceSegmentServiceHandler;
+
+    @Mock
+    private ISegmentParseService segmentParseService;
+
+    @Before
+    public void setUp() {
+        System.setProperty("debug", "true");
+        ModuleManager moduleManager = mock(ModuleManager.class);
+        when(moduleManager.find(anyString())).then(invocation -> new MockModule());
+        traceSegmentServiceHandler = new TraceSegmentServiceHandler(moduleManager);
+        Whitebox.setInternalState(traceSegmentServiceHandler, "segmentParseService", segmentParseService);
+
+    }
+
+    @Test
+    public void collect() {
+        StreamObserver<UpstreamSegment> upstreamSegmentStreamObserver = traceSegmentServiceHandler.collect(new StreamObserver<Downstream>() {
+            @Override
+            public void onNext(Downstream downstream) {
+                assertTrue(downstream.isInitialized());
+            }
+
+            @Override
+            public void onError(Throwable throwable) {
+                assertTrue(throwable instanceof IllegalArgumentException);
+            }
+
+            @Override
+            public void onCompleted() {
+
+
+            }
+        });
+        UpstreamSegment upstreamSegment = UpstreamSegment.newBuilder().build();
+        upstreamSegmentStreamObserver.onNext(upstreamSegment);
+        upstreamSegmentStreamObserver.onError(new IllegalArgumentException("exception"));
+        upstreamSegmentStreamObserver.onCompleted();
+    }
 }
\ No newline at end of file
diff --git a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/AgentDataMock.java b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/AgentDataMock.java
index 728c024a7..15055591c 100644
--- a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/AgentDataMock.java
+++ b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/AgentDataMock.java
@@ -1,83 +1,83 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.agent.grpc.provider.handler.mock;
-
-import io.grpc.ManagedChannel;
-import io.grpc.ManagedChannelBuilder;
-import io.grpc.stub.StreamObserver;
-import java.util.LinkedList;
-import java.util.List;
-import org.apache.skywalking.apm.network.proto.Downstream;
-import org.apache.skywalking.apm.network.proto.TraceSegmentServiceGrpc;
-import org.apache.skywalking.apm.network.proto.UpstreamSegment;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author peng-yongsheng
- */
-public class AgentDataMock {
-
-    private static final Logger logger = LoggerFactory.getLogger(TraceSegmentMock.class);
-
-    public static void main(String[] args) throws InterruptedException {
-        ManagedChannel channel = ManagedChannelBuilder.forAddress("localhost", 11800).usePlaintext(true).build();
-
-        List<StreamObserver<UpstreamSegment>> upstreamSegments = new LinkedList<>();
-        upstreamSegments.add(createStreamObserver());
-        upstreamSegments.add(createStreamObserver());
-        upstreamSegments.add(createStreamObserver());
-        upstreamSegments.add(createStreamObserver());
-
-        RegisterMock registerMock = new RegisterMock();
-        registerMock.mock(channel);
-
-        TraceSegmentMock segmentMock = new TraceSegmentMock();
-        segmentMock.mock(upstreamSegments, new Long[] {System.currentTimeMillis()}, true);
-
-        Thread.sleep(30000);
-
-        Long[] times = TimeBuilder.INSTANCE.generateTimes();
-        logger.info("times size: {}", times.length);
-
-        segmentMock.mock(upstreamSegments, times, false);
-
-        JVMMetricMock jvmMetricMock = new JVMMetricMock();
-        jvmMetricMock.mock(channel, times);
-
-        Thread.sleep(60);
-    }
-
-    private static StreamObserver<UpstreamSegment> createStreamObserver() {
-        ManagedChannel channel = ManagedChannelBuilder.forAddress("localhost", 11800).usePlaintext(true).build();
-        TraceSegmentServiceGrpc.TraceSegmentServiceStub stub = TraceSegmentServiceGrpc.newStub(channel);
-        StreamObserver<UpstreamSegment> segmentStreamObserver = stub.collect(new StreamObserver<Downstream>() {
-            @Override public void onNext(Downstream downstream) {
-            }
-
-            @Override public void onError(Throwable throwable) {
-            }
-
-            @Override public void onCompleted() {
-            }
-        });
-
-        return segmentStreamObserver;
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.collector.agent.grpc.provider.handler.mock;
+
+import io.grpc.ManagedChannel;
+import io.grpc.ManagedChannelBuilder;
+import io.grpc.stub.StreamObserver;
+import java.util.LinkedList;
+import java.util.List;
+import org.apache.skywalking.apm.network.proto.Downstream;
+import org.apache.skywalking.apm.network.proto.TraceSegmentServiceGrpc;
+import org.apache.skywalking.apm.network.proto.UpstreamSegment;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author peng-yongsheng
+ */
+public class AgentDataMock {
+
+    private static final Logger logger = LoggerFactory.getLogger(TraceSegmentMock.class);
+
+    public static void main(String[] args) throws InterruptedException {
+        ManagedChannel channel = ManagedChannelBuilder.forAddress("localhost", 11800).usePlaintext(true).build();
+
+        List<StreamObserver<UpstreamSegment>> upstreamSegments = new LinkedList<>();
+        upstreamSegments.add(createStreamObserver());
+        upstreamSegments.add(createStreamObserver());
+        upstreamSegments.add(createStreamObserver());
+        upstreamSegments.add(createStreamObserver());
+
+        RegisterMock registerMock = new RegisterMock();
+        registerMock.mock(channel);
+
+        TraceSegmentMock segmentMock = new TraceSegmentMock();
+        segmentMock.mock(upstreamSegments, new Long[] {System.currentTimeMillis()}, true);
+
+        Thread.sleep(30000);
+
+        Long[] times = TimeBuilder.INSTANCE.generateTimes();
+        logger.info("times size: {}", times.length);
+
+        segmentMock.mock(upstreamSegments, times, false);
+
+        JVMMetricMock jvmMetricMock = new JVMMetricMock();
+        jvmMetricMock.mock(channel, times);
+
+        Thread.sleep(60);
+    }
+
+    private static StreamObserver<UpstreamSegment> createStreamObserver() {
+        ManagedChannel channel = ManagedChannelBuilder.forAddress("localhost", 11800).usePlaintext(true).build();
+        TraceSegmentServiceGrpc.TraceSegmentServiceStub stub = TraceSegmentServiceGrpc.newStub(channel);
+        StreamObserver<UpstreamSegment> segmentStreamObserver = stub.collect(new StreamObserver<Downstream>() {
+            @Override public void onNext(Downstream downstream) {
+            }
+
+            @Override public void onError(Throwable throwable) {
+            }
+
+            @Override public void onCompleted() {
+            }
+        });
+
+        return segmentStreamObserver;
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/ConsumerMock.java b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/ConsumerMock.java
index d83a6cd7b..d18490976 100644
--- a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/ConsumerMock.java
+++ b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/ConsumerMock.java
@@ -1,93 +1,93 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.agent.grpc.provider.handler.mock;
-
-import com.google.protobuf.ByteString;
-import io.grpc.stub.StreamObserver;
-import org.apache.skywalking.apm.network.proto.SpanLayer;
-import org.apache.skywalking.apm.network.proto.SpanObject;
-import org.apache.skywalking.apm.network.proto.SpanType;
-import org.apache.skywalking.apm.network.proto.TraceSegmentObject;
-import org.apache.skywalking.apm.network.proto.UniqueId;
-import org.apache.skywalking.apm.network.proto.UpstreamSegment;
-import org.apache.skywalking.apm.network.trace.component.ComponentsDefine;
-
-/**
- * @author peng-yongsheng
- */
-class ConsumerMock {
-
-    void mock(StreamObserver<UpstreamSegment> segmentStreamObserver, UniqueId.Builder globalTraceId,
-        UniqueId.Builder segmentId, long startTimestamp, boolean isPrepare) {
-        UpstreamSegment.Builder upstreamSegment = UpstreamSegment.newBuilder();
-        upstreamSegment.addGlobalTraceIds(globalTraceId);
-        upstreamSegment.setSegment(createSegment(startTimestamp, segmentId, isPrepare));
-
-        segmentStreamObserver.onNext(upstreamSegment.build());
-    }
-
-    private ByteString createSegment(long startTimestamp, UniqueId.Builder segmentId, boolean isPrepare) {
-        TraceSegmentObject.Builder segment = TraceSegmentObject.newBuilder();
-        segment.setTraceSegmentId(segmentId);
-        segment.setApplicationId(-1);
-        segment.setApplicationInstanceId(2);
-        segment.addSpans(createExitSpan(startTimestamp, isPrepare));
-        segment.addSpans(createEntrySpan(startTimestamp, isPrepare));
-
-        return segment.build().toByteString();
-    }
-
-    private SpanObject.Builder createExitSpan(long startTimestamp, boolean isPrepare) {
-        SpanObject.Builder span = SpanObject.newBuilder();
-        span.setSpanId(1);
-        span.setSpanType(SpanType.Exit);
-        span.setSpanLayer(SpanLayer.RPCFramework);
-        span.setParentSpanId(0);
-        span.setStartTime(startTimestamp + 10);
-        span.setEndTime(startTimestamp + 1990);
-        span.setComponentId(ComponentsDefine.DUBBO.getId());
-        if (isPrepare) {
-            span.setPeer("172.25.0.4:20880");
-            span.setOperationName("org.skywaking.apm.testcase.dubbo.services.GreetService.doBusiness()");
-        } else {
-            span.setOperationNameId(-1);
-            span.setPeerId(-1);
-        }
-        span.setIsError(false);
-        return span;
-    }
-
-    private SpanObject.Builder createEntrySpan(long startTimestamp, boolean isPrepare) {
-        SpanObject.Builder span = SpanObject.newBuilder();
-        span.setSpanId(0);
-        span.setSpanType(SpanType.Entry);
-        span.setSpanLayer(SpanLayer.Http);
-        span.setParentSpanId(-1);
-        span.setStartTime(startTimestamp);
-        span.setEndTime(startTimestamp + 2000);
-        span.setComponentId(ComponentsDefine.TOMCAT.getId());
-        if (isPrepare) {
-            span.setOperationName("/dubbox-case/case/dubbox-rest");
-        } else {
-            span.setOperationNameId(2);
-        }
-        span.setIsError(false);
-        return span;
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.collector.agent.grpc.provider.handler.mock;
+
+import com.google.protobuf.ByteString;
+import io.grpc.stub.StreamObserver;
+import org.apache.skywalking.apm.network.proto.SpanLayer;
+import org.apache.skywalking.apm.network.proto.SpanObject;
+import org.apache.skywalking.apm.network.proto.SpanType;
+import org.apache.skywalking.apm.network.proto.TraceSegmentObject;
+import org.apache.skywalking.apm.network.proto.UniqueId;
+import org.apache.skywalking.apm.network.proto.UpstreamSegment;
+import org.apache.skywalking.apm.network.trace.component.ComponentsDefine;
+
+/**
+ * @author peng-yongsheng
+ */
+class ConsumerMock {
+
+    void mock(StreamObserver<UpstreamSegment> segmentStreamObserver, UniqueId.Builder globalTraceId,
+        UniqueId.Builder segmentId, long startTimestamp, boolean isPrepare) {
+        UpstreamSegment.Builder upstreamSegment = UpstreamSegment.newBuilder();
+        upstreamSegment.addGlobalTraceIds(globalTraceId);
+        upstreamSegment.setSegment(createSegment(startTimestamp, segmentId, isPrepare));
+
+        segmentStreamObserver.onNext(upstreamSegment.build());
+    }
+
+    private ByteString createSegment(long startTimestamp, UniqueId.Builder segmentId, boolean isPrepare) {
+        TraceSegmentObject.Builder segment = TraceSegmentObject.newBuilder();
+        segment.setTraceSegmentId(segmentId);
+        segment.setApplicationId(-1);
+        segment.setApplicationInstanceId(2);
+        segment.addSpans(createExitSpan(startTimestamp, isPrepare));
+        segment.addSpans(createEntrySpan(startTimestamp, isPrepare));
+
+        return segment.build().toByteString();
+    }
+
+    private SpanObject.Builder createExitSpan(long startTimestamp, boolean isPrepare) {
+        SpanObject.Builder span = SpanObject.newBuilder();
+        span.setSpanId(1);
+        span.setSpanType(SpanType.Exit);
+        span.setSpanLayer(SpanLayer.RPCFramework);
+        span.setParentSpanId(0);
+        span.setStartTime(startTimestamp + 10);
+        span.setEndTime(startTimestamp + 1990);
+        span.setComponentId(ComponentsDefine.DUBBO.getId());
+        if (isPrepare) {
+            span.setPeer("172.25.0.4:20880");
+            span.setOperationName("org.skywaking.apm.testcase.dubbo.services.GreetService.doBusiness()");
+        } else {
+            span.setOperationNameId(-1);
+            span.setPeerId(-1);
+        }
+        span.setIsError(false);
+        return span;
+    }
+
+    private SpanObject.Builder createEntrySpan(long startTimestamp, boolean isPrepare) {
+        SpanObject.Builder span = SpanObject.newBuilder();
+        span.setSpanId(0);
+        span.setSpanType(SpanType.Entry);
+        span.setSpanLayer(SpanLayer.Http);
+        span.setParentSpanId(-1);
+        span.setStartTime(startTimestamp);
+        span.setEndTime(startTimestamp + 2000);
+        span.setComponentId(ComponentsDefine.TOMCAT.getId());
+        if (isPrepare) {
+            span.setOperationName("/dubbox-case/case/dubbox-rest");
+        } else {
+            span.setOperationNameId(2);
+        }
+        span.setIsError(false);
+        return span;
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/JVMMetricMock.java b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/JVMMetricMock.java
index 9368f2fc6..638f92823 100644
--- a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/JVMMetricMock.java
+++ b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/JVMMetricMock.java
@@ -1,161 +1,161 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.agent.grpc.provider.handler.mock;
-
-import io.grpc.ManagedChannel;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.concurrent.atomic.AtomicInteger;
-import org.apache.skywalking.apm.network.proto.CPU;
-import org.apache.skywalking.apm.network.proto.GC;
-import org.apache.skywalking.apm.network.proto.GCPhrase;
-import org.apache.skywalking.apm.network.proto.JVMMetric;
-import org.apache.skywalking.apm.network.proto.JVMMetrics;
-import org.apache.skywalking.apm.network.proto.JVMMetricsServiceGrpc;
-import org.apache.skywalking.apm.network.proto.Memory;
-import org.apache.skywalking.apm.network.proto.MemoryPool;
-import org.apache.skywalking.apm.network.proto.PoolType;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author peng-yongsheng
- */
-class JVMMetricMock {
-
-    private static final Logger logger = LoggerFactory.getLogger(JVMMetricMock.class);
-
-    void mock(ManagedChannel channel, Long[] times) {
-        JVMMetricsServiceGrpc.JVMMetricsServiceBlockingStub jvmMetricsServiceBlockingStub = JVMMetricsServiceGrpc.newBlockingStub(channel);
-
-        Set<Long> timeSet = new HashSet<>();
-        timeSet.addAll(Arrays.asList(times));
-
-        AtomicInteger increment = new AtomicInteger(0);
-        timeSet.forEach(timestamp -> {
-            JVMMetrics.Builder jvmMetrics = JVMMetrics.newBuilder();
-            jvmMetrics.setApplicationInstanceId(2);
-
-            JVMMetric.Builder jvmMetricBuilder = JVMMetric.newBuilder();
-            jvmMetricBuilder.setTime(timestamp);
-
-            buildCPUMetric(jvmMetricBuilder);
-            buildGCMetric(jvmMetricBuilder);
-            buildMemoryMetric(jvmMetricBuilder);
-            buildMemoryPoolMetric(jvmMetricBuilder);
-
-            jvmMetrics.addMetrics(jvmMetricBuilder.build());
-            jvmMetricsServiceBlockingStub.collect(jvmMetrics.build());
-
-            if (increment.incrementAndGet() % 100 == 0) {
-                logger.info("sending jvm metric number: {}", increment.get());
-            }
-        });
-        logger.info("sending jvm metric number: {}", increment.get());
-    }
-
-    private static void buildMemoryPoolMetric(JVMMetric.Builder metricBuilder) {
-        MemoryPool.Builder codeCache = MemoryPool.newBuilder();
-        codeCache.setInit(10);
-        codeCache.setMax(100);
-        codeCache.setCommited(10);
-        codeCache.setUsed(50);
-        codeCache.setType(PoolType.CODE_CACHE_USAGE);
-        metricBuilder.addMemoryPool(codeCache);
-
-        MemoryPool.Builder newGen = MemoryPool.newBuilder();
-        newGen.setInit(10);
-        newGen.setMax(100);
-        newGen.setCommited(10);
-        newGen.setUsed(50);
-        newGen.setType(PoolType.NEWGEN_USAGE);
-        metricBuilder.addMemoryPool(newGen);
-
-        MemoryPool.Builder oldGen = MemoryPool.newBuilder();
-        oldGen.setInit(10);
-        oldGen.setMax(100);
-        oldGen.setCommited(10);
-        oldGen.setUsed(50);
-        oldGen.setType(PoolType.OLDGEN_USAGE);
-        metricBuilder.addMemoryPool(oldGen);
-
-        MemoryPool.Builder survivor = MemoryPool.newBuilder();
-        survivor.setInit(10);
-        survivor.setMax(100);
-        survivor.setCommited(10);
-        survivor.setUsed(50);
-        survivor.setType(PoolType.SURVIVOR_USAGE);
-        metricBuilder.addMemoryPool(survivor);
-
-        MemoryPool.Builder permGen = MemoryPool.newBuilder();
-        permGen.setInit(10);
-        permGen.setMax(100);
-        permGen.setCommited(10);
-        permGen.setUsed(50);
-        permGen.setType(PoolType.PERMGEN_USAGE);
-        metricBuilder.addMemoryPool(permGen);
-
-        MemoryPool.Builder metaSpace = MemoryPool.newBuilder();
-        metaSpace.setInit(10);
-        metaSpace.setMax(100);
-        metaSpace.setCommited(10);
-        metaSpace.setUsed(50);
-        metaSpace.setType(PoolType.METASPACE_USAGE);
-        metricBuilder.addMemoryPool(metaSpace);
-    }
-
-    private static void buildMemoryMetric(JVMMetric.Builder metricBuilder) {
-        Memory.Builder isHeap = Memory.newBuilder();
-        isHeap.setInit(20);
-        isHeap.setMax(100);
-        isHeap.setCommitted(20);
-        isHeap.setUsed(60);
-        isHeap.setIsHeap(true);
-        metricBuilder.addMemory(isHeap);
-
-        Memory.Builder nonHeap = Memory.newBuilder();
-        nonHeap.setInit(20);
-        nonHeap.setMax(100);
-        nonHeap.setCommitted(20);
-        nonHeap.setUsed(60);
-        nonHeap.setIsHeap(false);
-        metricBuilder.addMemory(nonHeap);
-    }
-
-    private static void buildGCMetric(JVMMetric.Builder metricBuilder) {
-        GC.Builder newGC = GC.newBuilder();
-        newGC.setPhrase(GCPhrase.NEW);
-        newGC.setCount(2);
-        newGC.setTime(1000);
-        metricBuilder.addGc(newGC);
-
-        GC.Builder oldGC = GC.newBuilder();
-        oldGC.setPhrase(GCPhrase.OLD);
-        oldGC.setCount(4);
-        oldGC.setTime(49);
-        metricBuilder.addGc(oldGC);
-    }
-
-    private static void buildCPUMetric(JVMMetric.Builder metricBuilder) {
-        CPU.Builder cpu = CPU.newBuilder();
-        cpu.setUsagePercent(20);
-        metricBuilder.setCpu(cpu.build());
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.collector.agent.grpc.provider.handler.mock;
+
+import io.grpc.ManagedChannel;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicInteger;
+import org.apache.skywalking.apm.network.proto.CPU;
+import org.apache.skywalking.apm.network.proto.GC;
+import org.apache.skywalking.apm.network.proto.GCPhrase;
+import org.apache.skywalking.apm.network.proto.JVMMetric;
+import org.apache.skywalking.apm.network.proto.JVMMetrics;
+import org.apache.skywalking.apm.network.proto.JVMMetricsServiceGrpc;
+import org.apache.skywalking.apm.network.proto.Memory;
+import org.apache.skywalking.apm.network.proto.MemoryPool;
+import org.apache.skywalking.apm.network.proto.PoolType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author peng-yongsheng
+ */
+class JVMMetricMock {
+
+    private static final Logger logger = LoggerFactory.getLogger(JVMMetricMock.class);
+
+    void mock(ManagedChannel channel, Long[] times) {
+        JVMMetricsServiceGrpc.JVMMetricsServiceBlockingStub jvmMetricsServiceBlockingStub = JVMMetricsServiceGrpc.newBlockingStub(channel);
+
+        Set<Long> timeSet = new HashSet<>();
+        timeSet.addAll(Arrays.asList(times));
+
+        AtomicInteger increment = new AtomicInteger(0);
+        timeSet.forEach(timestamp -> {
+            JVMMetrics.Builder jvmMetrics = JVMMetrics.newBuilder();
+            jvmMetrics.setApplicationInstanceId(2);
+
+            JVMMetric.Builder jvmMetricBuilder = JVMMetric.newBuilder();
+            jvmMetricBuilder.setTime(timestamp);
+
+            buildCPUMetric(jvmMetricBuilder);
+            buildGCMetric(jvmMetricBuilder);
+            buildMemoryMetric(jvmMetricBuilder);
+            buildMemoryPoolMetric(jvmMetricBuilder);
+
+            jvmMetrics.addMetrics(jvmMetricBuilder.build());
+            jvmMetricsServiceBlockingStub.collect(jvmMetrics.build());
+
+            if (increment.incrementAndGet() % 100 == 0) {
+                logger.info("sending jvm metric number: {}", increment.get());
+            }
+        });
+        logger.info("sending jvm metric number: {}", increment.get());
+    }
+
+    private static void buildMemoryPoolMetric(JVMMetric.Builder metricBuilder) {
+        MemoryPool.Builder codeCache = MemoryPool.newBuilder();
+        codeCache.setInit(10);
+        codeCache.setMax(100);
+        codeCache.setCommited(10);
+        codeCache.setUsed(50);
+        codeCache.setType(PoolType.CODE_CACHE_USAGE);
+        metricBuilder.addMemoryPool(codeCache);
+
+        MemoryPool.Builder newGen = MemoryPool.newBuilder();
+        newGen.setInit(10);
+        newGen.setMax(100);
+        newGen.setCommited(10);
+        newGen.setUsed(50);
+        newGen.setType(PoolType.NEWGEN_USAGE);
+        metricBuilder.addMemoryPool(newGen);
+
+        MemoryPool.Builder oldGen = MemoryPool.newBuilder();
+        oldGen.setInit(10);
+        oldGen.setMax(100);
+        oldGen.setCommited(10);
+        oldGen.setUsed(50);
+        oldGen.setType(PoolType.OLDGEN_USAGE);
+        metricBuilder.addMemoryPool(oldGen);
+
+        MemoryPool.Builder survivor = MemoryPool.newBuilder();
+        survivor.setInit(10);
+        survivor.setMax(100);
+        survivor.setCommited(10);
+        survivor.setUsed(50);
+        survivor.setType(PoolType.SURVIVOR_USAGE);
+        metricBuilder.addMemoryPool(survivor);
+
+        MemoryPool.Builder permGen = MemoryPool.newBuilder();
+        permGen.setInit(10);
+        permGen.setMax(100);
+        permGen.setCommited(10);
+        permGen.setUsed(50);
+        permGen.setType(PoolType.PERMGEN_USAGE);
+        metricBuilder.addMemoryPool(permGen);
+
+        MemoryPool.Builder metaSpace = MemoryPool.newBuilder();
+        metaSpace.setInit(10);
+        metaSpace.setMax(100);
+        metaSpace.setCommited(10);
+        metaSpace.setUsed(50);
+        metaSpace.setType(PoolType.METASPACE_USAGE);
+        metricBuilder.addMemoryPool(metaSpace);
+    }
+
+    private static void buildMemoryMetric(JVMMetric.Builder metricBuilder) {
+        Memory.Builder isHeap = Memory.newBuilder();
+        isHeap.setInit(20);
+        isHeap.setMax(100);
+        isHeap.setCommitted(20);
+        isHeap.setUsed(60);
+        isHeap.setIsHeap(true);
+        metricBuilder.addMemory(isHeap);
+
+        Memory.Builder nonHeap = Memory.newBuilder();
+        nonHeap.setInit(20);
+        nonHeap.setMax(100);
+        nonHeap.setCommitted(20);
+        nonHeap.setUsed(60);
+        nonHeap.setIsHeap(false);
+        metricBuilder.addMemory(nonHeap);
+    }
+
+    private static void buildGCMetric(JVMMetric.Builder metricBuilder) {
+        GC.Builder newGC = GC.newBuilder();
+        newGC.setPhrase(GCPhrase.NEW);
+        newGC.setCount(2);
+        newGC.setTime(1000);
+        metricBuilder.addGc(newGC);
+
+        GC.Builder oldGC = GC.newBuilder();
+        oldGC.setPhrase(GCPhrase.OLD);
+        oldGC.setCount(4);
+        oldGC.setTime(49);
+        metricBuilder.addGc(oldGC);
+    }
+
+    private static void buildCPUMetric(JVMMetric.Builder metricBuilder) {
+        CPU.Builder cpu = CPU.newBuilder();
+        cpu.setUsagePercent(20);
+        metricBuilder.setCpu(cpu.build());
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/ProviderMock.java b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/ProviderMock.java
index ec46bd743..74f2cf9e0 100644
--- a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/ProviderMock.java
+++ b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/ProviderMock.java
@@ -1,119 +1,119 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.agent.grpc.provider.handler.mock;
-
-import com.google.protobuf.ByteString;
-import io.grpc.stub.StreamObserver;
-import org.apache.skywalking.apm.network.proto.RefType;
-import org.apache.skywalking.apm.network.proto.SpanLayer;
-import org.apache.skywalking.apm.network.proto.SpanObject;
-import org.apache.skywalking.apm.network.proto.SpanType;
-import org.apache.skywalking.apm.network.proto.TraceSegmentObject;
-import org.apache.skywalking.apm.network.proto.TraceSegmentReference;
-import org.apache.skywalking.apm.network.proto.UniqueId;
-import org.apache.skywalking.apm.network.proto.UpstreamSegment;
-import org.apache.skywalking.apm.network.trace.component.ComponentsDefine;
-
-/**
- * @author peng-yongsheng
- */
-class ProviderMock {
-
-    void mock(StreamObserver<UpstreamSegment> segmentStreamObserver, UniqueId.Builder globalTraceId,
-        UniqueId.Builder segmentId, UniqueId.Builder parentTraceSegmentId, long startTimestamp, boolean isPrepare) {
-        UpstreamSegment.Builder upstreamSegment = UpstreamSegment.newBuilder();
-        upstreamSegment.addGlobalTraceIds(globalTraceId);
-        upstreamSegment.setSegment(createSegment(startTimestamp, segmentId, parentTraceSegmentId, isPrepare));
-
-        segmentStreamObserver.onNext(upstreamSegment.build());
-    }
-
-    private ByteString createSegment(long startTimestamp, UniqueId.Builder segmentId,
-        UniqueId.Builder parentTraceSegmentId, boolean isPrepare) {
-        TraceSegmentObject.Builder segment = TraceSegmentObject.newBuilder();
-        segment.setTraceSegmentId(segmentId);
-        segment.setApplicationId(2);
-        segment.setApplicationInstanceId(3);
-        segment.addSpans(createExitSpan(startTimestamp, isPrepare));
-        segment.addSpans(createEntrySpan(startTimestamp, parentTraceSegmentId, isPrepare));
-
-        return segment.build().toByteString();
-    }
-
-    private TraceSegmentReference.Builder createReference(UniqueId.Builder parentTraceSegmentId, boolean isPrepare) {
-        TraceSegmentReference.Builder reference = TraceSegmentReference.newBuilder();
-        reference.setParentTraceSegmentId(parentTraceSegmentId);
-        reference.setParentApplicationInstanceId(2);
-        reference.setParentSpanId(1);
-        reference.setEntryApplicationInstanceId(2);
-        reference.setRefType(RefType.CrossProcess);
-
-        if (isPrepare) {
-            reference.setParentServiceName("/dubbox-case/case/dubbox-rest");
-            reference.setNetworkAddress("172.25.0.4:20880");
-            reference.setEntryServiceName("/dubbox-case/case/dubbox-rest");
-        } else {
-            reference.setParentServiceId(2);
-            reference.setNetworkAddressId(-1);
-            reference.setEntryServiceId(2);
-        }
-        return reference;
-    }
-
-    private SpanObject.Builder createExitSpan(long startTimestamp, boolean isPrepare) {
-        SpanObject.Builder span = SpanObject.newBuilder();
-        span.setSpanId(1);
-        span.setSpanType(SpanType.Exit);
-        span.setSpanLayer(SpanLayer.Database);
-        span.setParentSpanId(0);
-        span.setStartTime(startTimestamp + 510);
-        span.setEndTime(startTimestamp + 1490);
-        span.setComponentId(ComponentsDefine.MONGODB.getId());
-        span.setIsError(true);
-
-        if (isPrepare) {
-            span.setOperationName("mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]]");
-            span.setPeer("localhost:27017");
-        } else {
-            span.setOperationNameId(-2);
-            span.setPeerId(1);
-        }
-        return span;
-    }
-
-    private SpanObject.Builder createEntrySpan(long startTimestamp, UniqueId.Builder uniqueId, boolean isPrepare) {
-        SpanObject.Builder span = SpanObject.newBuilder();
-        span.setSpanId(0);
-        span.setSpanType(SpanType.Entry);
-        span.setSpanLayer(SpanLayer.RPCFramework);
-        span.setParentSpanId(-1);
-        span.setStartTime(startTimestamp + 500);
-        span.setEndTime(startTimestamp + 1500);
-        span.setComponentId(ComponentsDefine.DUBBO.getId());
-        span.setIsError(false);
-        span.addRefs(createReference(uniqueId, isPrepare));
-
-        if (isPrepare) {
-            span.setOperationName("org.skywaking.apm.testcase.dubbo.services.GreetService.doBusiness()");
-        } else {
-            span.setOperationNameId(3);
-        }
-        return span;
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.collector.agent.grpc.provider.handler.mock;
+
+import com.google.protobuf.ByteString;
+import io.grpc.stub.StreamObserver;
+import org.apache.skywalking.apm.network.proto.RefType;
+import org.apache.skywalking.apm.network.proto.SpanLayer;
+import org.apache.skywalking.apm.network.proto.SpanObject;
+import org.apache.skywalking.apm.network.proto.SpanType;
+import org.apache.skywalking.apm.network.proto.TraceSegmentObject;
+import org.apache.skywalking.apm.network.proto.TraceSegmentReference;
+import org.apache.skywalking.apm.network.proto.UniqueId;
+import org.apache.skywalking.apm.network.proto.UpstreamSegment;
+import org.apache.skywalking.apm.network.trace.component.ComponentsDefine;
+
+/**
+ * @author peng-yongsheng
+ */
+class ProviderMock {
+
+    void mock(StreamObserver<UpstreamSegment> segmentStreamObserver, UniqueId.Builder globalTraceId,
+        UniqueId.Builder segmentId, UniqueId.Builder parentTraceSegmentId, long startTimestamp, boolean isPrepare) {
+        UpstreamSegment.Builder upstreamSegment = UpstreamSegment.newBuilder();
+        upstreamSegment.addGlobalTraceIds(globalTraceId);
+        upstreamSegment.setSegment(createSegment(startTimestamp, segmentId, parentTraceSegmentId, isPrepare));
+
+        segmentStreamObserver.onNext(upstreamSegment.build());
+    }
+
+    private ByteString createSegment(long startTimestamp, UniqueId.Builder segmentId,
+        UniqueId.Builder parentTraceSegmentId, boolean isPrepare) {
+        TraceSegmentObject.Builder segment = TraceSegmentObject.newBuilder();
+        segment.setTraceSegmentId(segmentId);
+        segment.setApplicationId(2);
+        segment.setApplicationInstanceId(3);
+        segment.addSpans(createExitSpan(startTimestamp, isPrepare));
+        segment.addSpans(createEntrySpan(startTimestamp, parentTraceSegmentId, isPrepare));
+
+        return segment.build().toByteString();
+    }
+
+    private TraceSegmentReference.Builder createReference(UniqueId.Builder parentTraceSegmentId, boolean isPrepare) {
+        TraceSegmentReference.Builder reference = TraceSegmentReference.newBuilder();
+        reference.setParentTraceSegmentId(parentTraceSegmentId);
+        reference.setParentApplicationInstanceId(2);
+        reference.setParentSpanId(1);
+        reference.setEntryApplicationInstanceId(2);
+        reference.setRefType(RefType.CrossProcess);
+
+        if (isPrepare) {
+            reference.setParentServiceName("/dubbox-case/case/dubbox-rest");
+            reference.setNetworkAddress("172.25.0.4:20880");
+            reference.setEntryServiceName("/dubbox-case/case/dubbox-rest");
+        } else {
+            reference.setParentServiceId(2);
+            reference.setNetworkAddressId(-1);
+            reference.setEntryServiceId(2);
+        }
+        return reference;
+    }
+
+    private SpanObject.Builder createExitSpan(long startTimestamp, boolean isPrepare) {
+        SpanObject.Builder span = SpanObject.newBuilder();
+        span.setSpanId(1);
+        span.setSpanType(SpanType.Exit);
+        span.setSpanLayer(SpanLayer.Database);
+        span.setParentSpanId(0);
+        span.setStartTime(startTimestamp + 510);
+        span.setEndTime(startTimestamp + 1490);
+        span.setComponentId(ComponentsDefine.MONGODB.getId());
+        span.setIsError(true);
+
+        if (isPrepare) {
+            span.setOperationName("mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]]");
+            span.setPeer("localhost:27017");
+        } else {
+            span.setOperationNameId(-2);
+            span.setPeerId(1);
+        }
+        return span;
+    }
+
+    private SpanObject.Builder createEntrySpan(long startTimestamp, UniqueId.Builder uniqueId, boolean isPrepare) {
+        SpanObject.Builder span = SpanObject.newBuilder();
+        span.setSpanId(0);
+        span.setSpanType(SpanType.Entry);
+        span.setSpanLayer(SpanLayer.RPCFramework);
+        span.setParentSpanId(-1);
+        span.setStartTime(startTimestamp + 500);
+        span.setEndTime(startTimestamp + 1500);
+        span.setComponentId(ComponentsDefine.DUBBO.getId());
+        span.setIsError(false);
+        span.addRefs(createReference(uniqueId, isPrepare));
+
+        if (isPrepare) {
+            span.setOperationName("org.skywaking.apm.testcase.dubbo.services.GreetService.doBusiness()");
+        } else {
+            span.setOperationNameId(3);
+        }
+        return span;
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/RegisterMock.java b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/RegisterMock.java
index 00ab6c805..a1fde9ed1 100644
--- a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/RegisterMock.java
+++ b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/RegisterMock.java
@@ -1,180 +1,180 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.agent.grpc.provider.handler.mock;
-
-import io.grpc.ManagedChannel;
-import java.util.UUID;
-import java.util.concurrent.Executors;
-import java.util.concurrent.TimeUnit;
-import org.apache.skywalking.apm.network.proto.Application;
-import org.apache.skywalking.apm.network.proto.ApplicationInstance;
-import org.apache.skywalking.apm.network.proto.ApplicationInstanceHeartbeat;
-import org.apache.skywalking.apm.network.proto.ApplicationInstanceMapping;
-import org.apache.skywalking.apm.network.proto.ApplicationMapping;
-import org.apache.skywalking.apm.network.proto.ApplicationRegisterServiceGrpc;
-import org.apache.skywalking.apm.network.proto.InstanceDiscoveryServiceGrpc;
-import org.apache.skywalking.apm.network.proto.OSInfo;
-import org.apache.skywalking.apm.network.proto.ServiceNameCollection;
-import org.apache.skywalking.apm.network.proto.ServiceNameDiscoveryServiceGrpc;
-import org.apache.skywalking.apm.network.proto.ServiceNameElement;
-import org.apache.skywalking.apm.network.proto.ServiceNameMappingCollection;
-import org.apache.skywalking.apm.network.proto.SpanType;
-import org.apache.skywalking.apm.util.RunnableWithExceptionProtection;
-import org.joda.time.DateTime;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author peng-yongsheng
- */
-class RegisterMock {
-
-    private static final Logger logger = LoggerFactory.getLogger(RegisterMock.class);
-
-    private ApplicationRegisterServiceGrpc.ApplicationRegisterServiceBlockingStub applicationRegisterServiceBlockingStub;
-    private InstanceDiscoveryServiceGrpc.InstanceDiscoveryServiceBlockingStub instanceDiscoveryServiceBlockingStub;
-    private ServiceNameDiscoveryServiceGrpc.ServiceNameDiscoveryServiceBlockingStub serviceNameDiscoveryServiceBlockingStub;
-
-    void mock(ManagedChannel channel) throws InterruptedException {
-        applicationRegisterServiceBlockingStub = ApplicationRegisterServiceGrpc.newBlockingStub(channel);
-        instanceDiscoveryServiceBlockingStub = InstanceDiscoveryServiceGrpc.newBlockingStub(channel);
-        serviceNameDiscoveryServiceBlockingStub = ServiceNameDiscoveryServiceGrpc.newBlockingStub(channel);
-        registerConsumer();
-        registerProvider();
-    }
-
-    private void registerConsumer() throws InterruptedException {
-        Application.Builder application = Application.newBuilder();
-        application.setApplicationCode("dubbox-consumer");
-
-        ApplicationMapping applicationMapping;
-        do {
-            applicationMapping = applicationRegisterServiceBlockingStub.applicationCodeRegister(application.build());
-            logger.debug("application id: {}", applicationMapping.getApplication().getValue());
-            Thread.sleep(20);
-        }
-        while (applicationMapping.getApplication().getValue() == 0);
-
-        ApplicationInstance.Builder instance = ApplicationInstance.newBuilder();
-        instance.setApplicationId(applicationMapping.getApplication().getValue());
-        instance.setAgentUUID(UUID.randomUUID().toString());
-        instance.setRegisterTime(new DateTime("2017-01-01T00:01:01.001").getMillis());
-
-        OSInfo.Builder osInfo = OSInfo.newBuilder();
-        osInfo.setHostname("pengys");
-        osInfo.setOsName("MacOS XX");
-        osInfo.setProcessNo(1001);
-        osInfo.addIpv4S("10.0.0.3");
-        osInfo.addIpv4S("10.0.0.4");
-        instance.setOsinfo(osInfo);
-
-        ApplicationInstanceMapping instanceMapping;
-        do {
-            instanceMapping = instanceDiscoveryServiceBlockingStub.registerInstance(instance.build());
-            logger.debug("instance id: {}", instanceMapping.getApplicationInstanceId());
-            Thread.sleep(20);
-        }
-        while (instanceMapping.getApplicationInstanceId() == 0);
-
-        ServiceNameCollection.Builder serviceNameCollection = ServiceNameCollection.newBuilder();
-        ServiceNameElement.Builder serviceNameElement = ServiceNameElement.newBuilder();
-        serviceNameElement.setApplicationId(applicationMapping.getApplication().getValue());
-        serviceNameElement.setServiceName("org.skywaking.apm.testcase.dubbo.services.GreetService.doBusiness()");
-        serviceNameElement.setSrcSpanType(SpanType.Exit);
-        serviceNameCollection.addElements(serviceNameElement);
-
-//        registerServiceName(serviceNameCollection);
-
-        heartBeatScheduled(instanceMapping.getApplicationInstanceId());
-    }
-
-    private void registerProvider() throws InterruptedException {
-        Application.Builder application = Application.newBuilder();
-        application.setApplicationCode("dubbox-provider");
-
-        ApplicationMapping applicationMapping;
-        do {
-            applicationMapping = applicationRegisterServiceBlockingStub.applicationCodeRegister(application.build());
-            logger.debug("application id: {}", applicationMapping.getApplication().getValue());
-            Thread.sleep(20);
-        }
-        while (applicationMapping.getApplication().getValue() == 0);
-
-        ApplicationInstance.Builder instance = ApplicationInstance.newBuilder();
-        instance.setApplicationId(applicationMapping.getApplication().getValue());
-        instance.setAgentUUID(UUID.randomUUID().toString());
-        instance.setRegisterTime(new DateTime("2017-01-01T00:01:01.001").getMillis());
-
-        OSInfo.Builder osInfo = OSInfo.newBuilder();
-        osInfo.setHostname("peng-yongsheng");
-        osInfo.setOsName("MacOS X");
-        osInfo.setProcessNo(1000);
-        osInfo.addIpv4S("10.0.0.1");
-        osInfo.addIpv4S("10.0.0.2");
-        instance.setOsinfo(osInfo);
-
-        ApplicationInstanceMapping instanceMapping;
-        do {
-            instanceMapping = instanceDiscoveryServiceBlockingStub.registerInstance(instance.build());
-            logger.debug("instance id: {}", instanceMapping.getApplicationInstanceId());
-            Thread.sleep(20);
-        }
-        while (instanceMapping.getApplicationInstanceId() == 0);
-
-        ServiceNameCollection.Builder serviceNameCollection = ServiceNameCollection.newBuilder();
-        ServiceNameElement.Builder serviceNameElement = ServiceNameElement.newBuilder();
-        serviceNameElement.setApplicationId(applicationMapping.getApplication().getValue());
-        serviceNameElement.setServiceName("org.skywaking.apm.testcase.dubbo.services.GreetService.doBusiness()");
-        serviceNameElement.setSrcSpanType(SpanType.Entry);
-        serviceNameCollection.addElements(serviceNameElement);
-
-//        registerServiceName(serviceNameCollection);
-
-        heartBeatScheduled(instanceMapping.getApplicationInstanceId());
-    }
-
-    private void registerServiceName(ServiceNameCollection.Builder serviceNameCollection) throws InterruptedException {
-        ServiceNameMappingCollection serviceNameMappingCollection;
-        do {
-            logger.debug("register service name: {}", serviceNameCollection.getElements(0).getServiceName());
-            serviceNameMappingCollection = serviceNameDiscoveryServiceBlockingStub.discovery(serviceNameCollection.build());
-            logger.debug("service name mapping collection size: {}", serviceNameMappingCollection.getElementsCount());
-            if (serviceNameMappingCollection.getElementsCount() > 0) {
-                logger.debug("service id: {}", serviceNameMappingCollection.getElements(0).getServiceId());
-            }
-            Thread.sleep(20);
-        }
-        while (serviceNameMappingCollection.getElementsCount() == 0 || serviceNameMappingCollection.getElements(0).getServiceId() == 0);
-    }
-
-    private void heartBeatScheduled(int instanceId) {
-        Executors.newSingleThreadScheduledExecutor().scheduleAtFixedRate(
-            new RunnableWithExceptionProtection(() -> heartBeat(instanceId),
-                t -> logger.error("instance heart beat scheduled error.", t)), 4, 1, TimeUnit.SECONDS);
-    }
-
-    private void heartBeat(int instanceId) {
-        long now = System.currentTimeMillis();
-        logger.debug("instance heart beat, instance id: {}, time: {}", instanceId, now);
-        ApplicationInstanceHeartbeat.Builder heartbeat = ApplicationInstanceHeartbeat.newBuilder();
-        heartbeat.setApplicationInstanceId(instanceId);
-        heartbeat.setHeartbeatTime(now);
-        instanceDiscoveryServiceBlockingStub.heartbeat(heartbeat.build());
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.collector.agent.grpc.provider.handler.mock;
+
+import io.grpc.ManagedChannel;
+import java.util.UUID;
+import java.util.concurrent.Executors;
+import java.util.concurrent.TimeUnit;
+import org.apache.skywalking.apm.network.proto.Application;
+import org.apache.skywalking.apm.network.proto.ApplicationInstance;
+import org.apache.skywalking.apm.network.proto.ApplicationInstanceHeartbeat;
+import org.apache.skywalking.apm.network.proto.ApplicationInstanceMapping;
+import org.apache.skywalking.apm.network.proto.ApplicationMapping;
+import org.apache.skywalking.apm.network.proto.ApplicationRegisterServiceGrpc;
+import org.apache.skywalking.apm.network.proto.InstanceDiscoveryServiceGrpc;
+import org.apache.skywalking.apm.network.proto.OSInfo;
+import org.apache.skywalking.apm.network.proto.ServiceNameCollection;
+import org.apache.skywalking.apm.network.proto.ServiceNameDiscoveryServiceGrpc;
+import org.apache.skywalking.apm.network.proto.ServiceNameElement;
+import org.apache.skywalking.apm.network.proto.ServiceNameMappingCollection;
+import org.apache.skywalking.apm.network.proto.SpanType;
+import org.apache.skywalking.apm.util.RunnableWithExceptionProtection;
+import org.joda.time.DateTime;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author peng-yongsheng
+ */
+class RegisterMock {
+
+    private static final Logger logger = LoggerFactory.getLogger(RegisterMock.class);
+
+    private ApplicationRegisterServiceGrpc.ApplicationRegisterServiceBlockingStub applicationRegisterServiceBlockingStub;
+    private InstanceDiscoveryServiceGrpc.InstanceDiscoveryServiceBlockingStub instanceDiscoveryServiceBlockingStub;
+    private ServiceNameDiscoveryServiceGrpc.ServiceNameDiscoveryServiceBlockingStub serviceNameDiscoveryServiceBlockingStub;
+
+    void mock(ManagedChannel channel) throws InterruptedException {
+        applicationRegisterServiceBlockingStub = ApplicationRegisterServiceGrpc.newBlockingStub(channel);
+        instanceDiscoveryServiceBlockingStub = InstanceDiscoveryServiceGrpc.newBlockingStub(channel);
+        serviceNameDiscoveryServiceBlockingStub = ServiceNameDiscoveryServiceGrpc.newBlockingStub(channel);
+        registerConsumer();
+        registerProvider();
+    }
+
+    private void registerConsumer() throws InterruptedException {
+        Application.Builder application = Application.newBuilder();
+        application.setApplicationCode("dubbox-consumer");
+
+        ApplicationMapping applicationMapping;
+        do {
+            applicationMapping = applicationRegisterServiceBlockingStub.applicationCodeRegister(application.build());
+            logger.debug("application id: {}", applicationMapping.getApplication().getValue());
+            Thread.sleep(20);
+        }
+        while (applicationMapping.getApplication().getValue() == 0);
+
+        ApplicationInstance.Builder instance = ApplicationInstance.newBuilder();
+        instance.setApplicationId(applicationMapping.getApplication().getValue());
+        instance.setAgentUUID(UUID.randomUUID().toString());
+        instance.setRegisterTime(new DateTime("2017-01-01T00:01:01.001").getMillis());
+
+        OSInfo.Builder osInfo = OSInfo.newBuilder();
+        osInfo.setHostname("pengys");
+        osInfo.setOsName("MacOS XX");
+        osInfo.setProcessNo(1001);
+        osInfo.addIpv4S("10.0.0.3");
+        osInfo.addIpv4S("10.0.0.4");
+        instance.setOsinfo(osInfo);
+
+        ApplicationInstanceMapping instanceMapping;
+        do {
+            instanceMapping = instanceDiscoveryServiceBlockingStub.registerInstance(instance.build());
+            logger.debug("instance id: {}", instanceMapping.getApplicationInstanceId());
+            Thread.sleep(20);
+        }
+        while (instanceMapping.getApplicationInstanceId() == 0);
+
+        ServiceNameCollection.Builder serviceNameCollection = ServiceNameCollection.newBuilder();
+        ServiceNameElement.Builder serviceNameElement = ServiceNameElement.newBuilder();
+        serviceNameElement.setApplicationId(applicationMapping.getApplication().getValue());
+        serviceNameElement.setServiceName("org.skywaking.apm.testcase.dubbo.services.GreetService.doBusiness()");
+        serviceNameElement.setSrcSpanType(SpanType.Exit);
+        serviceNameCollection.addElements(serviceNameElement);
+
+//        registerServiceName(serviceNameCollection);
+
+        heartBeatScheduled(instanceMapping.getApplicationInstanceId());
+    }
+
+    private void registerProvider() throws InterruptedException {
+        Application.Builder application = Application.newBuilder();
+        application.setApplicationCode("dubbox-provider");
+
+        ApplicationMapping applicationMapping;
+        do {
+            applicationMapping = applicationRegisterServiceBlockingStub.applicationCodeRegister(application.build());
+            logger.debug("application id: {}", applicationMapping.getApplication().getValue());
+            Thread.sleep(20);
+        }
+        while (applicationMapping.getApplication().getValue() == 0);
+
+        ApplicationInstance.Builder instance = ApplicationInstance.newBuilder();
+        instance.setApplicationId(applicationMapping.getApplication().getValue());
+        instance.setAgentUUID(UUID.randomUUID().toString());
+        instance.setRegisterTime(new DateTime("2017-01-01T00:01:01.001").getMillis());
+
+        OSInfo.Builder osInfo = OSInfo.newBuilder();
+        osInfo.setHostname("peng-yongsheng");
+        osInfo.setOsName("MacOS X");
+        osInfo.setProcessNo(1000);
+        osInfo.addIpv4S("10.0.0.1");
+        osInfo.addIpv4S("10.0.0.2");
+        instance.setOsinfo(osInfo);
+
+        ApplicationInstanceMapping instanceMapping;
+        do {
+            instanceMapping = instanceDiscoveryServiceBlockingStub.registerInstance(instance.build());
+            logger.debug("instance id: {}", instanceMapping.getApplicationInstanceId());
+            Thread.sleep(20);
+        }
+        while (instanceMapping.getApplicationInstanceId() == 0);
+
+        ServiceNameCollection.Builder serviceNameCollection = ServiceNameCollection.newBuilder();
+        ServiceNameElement.Builder serviceNameElement = ServiceNameElement.newBuilder();
+        serviceNameElement.setApplicationId(applicationMapping.getApplication().getValue());
+        serviceNameElement.setServiceName("org.skywaking.apm.testcase.dubbo.services.GreetService.doBusiness()");
+        serviceNameElement.setSrcSpanType(SpanType.Entry);
+        serviceNameCollection.addElements(serviceNameElement);
+
+//        registerServiceName(serviceNameCollection);
+
+        heartBeatScheduled(instanceMapping.getApplicationInstanceId());
+    }
+
+    private void registerServiceName(ServiceNameCollection.Builder serviceNameCollection) throws InterruptedException {
+        ServiceNameMappingCollection serviceNameMappingCollection;
+        do {
+            logger.debug("register service name: {}", serviceNameCollection.getElements(0).getServiceName());
+            serviceNameMappingCollection = serviceNameDiscoveryServiceBlockingStub.discovery(serviceNameCollection.build());
+            logger.debug("service name mapping collection size: {}", serviceNameMappingCollection.getElementsCount());
+            if (serviceNameMappingCollection.getElementsCount() > 0) {
+                logger.debug("service id: {}", serviceNameMappingCollection.getElements(0).getServiceId());
+            }
+            Thread.sleep(20);
+        }
+        while (serviceNameMappingCollection.getElementsCount() == 0 || serviceNameMappingCollection.getElements(0).getServiceId() == 0);
+    }
+
+    private void heartBeatScheduled(int instanceId) {
+        Executors.newSingleThreadScheduledExecutor().scheduleAtFixedRate(
+            new RunnableWithExceptionProtection(() -> heartBeat(instanceId),
+                t -> logger.error("instance heart beat scheduled error.", t)), 4, 1, TimeUnit.SECONDS);
+    }
+
+    private void heartBeat(int instanceId) {
+        long now = System.currentTimeMillis();
+        logger.debug("instance heart beat, instance id: {}, time: {}", instanceId, now);
+        ApplicationInstanceHeartbeat.Builder heartbeat = ApplicationInstanceHeartbeat.newBuilder();
+        heartbeat.setApplicationInstanceId(instanceId);
+        heartbeat.setHeartbeatTime(now);
+        instanceDiscoveryServiceBlockingStub.heartbeat(heartbeat.build());
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/TimeBuilder.java b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/TimeBuilder.java
index a1eaca7c4..fb6af0949 100644
--- a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/TimeBuilder.java
+++ b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/TimeBuilder.java
@@ -1,104 +1,104 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.agent.grpc.provider.handler.mock;
-
-import java.util.LinkedList;
-import java.util.List;
-import org.joda.time.DateTime;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author peng-yongsheng
- */
-public enum TimeBuilder {
-    INSTANCE;
-
-    private static final Logger logger = LoggerFactory.getLogger(TimeBuilder.class);
-
-    private Duration[] durations = {
-        new Duration("2017-01-01T00:02:01.001", "2017-01-01T00:05:01.001", 20),
-        new Duration("2017-02-01T00:02:01.001", "2017-02-01T00:05:01.001", 20),
-        new Duration("2017-03-01T00:02:01.001", "2017-03-01T00:05:01.001", 20),
-
-        new Duration("2017-04-01T00:02:01.001", "2017-04-01T00:05:01.001", 20),
-        new Duration("2017-04-02T00:02:01.001", "2017-04-02T00:05:01.001", 20),
-        new Duration("2017-04-03T00:02:01.001", "2017-04-03T00:05:01.001", 20),
-
-        new Duration("2017-05-01T08:02:01.001", "2017-05-01T08:05:01.001", 20),
-        new Duration("2017-05-01T09:02:01.001", "2017-05-01T09:05:01.001", 20),
-        new Duration("2017-05-01T10:02:01.001", "2017-05-01T10:05:01.001", 20),
-
-        new Duration("2017-06-01T1:02:01.001", "2017-06-01T11:02:01.001", 100),
-    };
-
-    public Long[] generateTimes() {
-        List<Long> times = new LinkedList<>();
-
-        for (Duration duration : durations) {
-            DateTime start = new DateTime(duration.getStart());
-            DateTime end = new DateTime(duration.getEnd());
-
-            while (!start.isAfter(end)) {
-                for (int i = 0; i < duration.getTps(); i++) {
-                    times.add(start.getMillis());
-                }
-                start = start.plusSeconds(1);
-            }
-        }
-
-        return times.toArray(new Long[0]);
-    }
-
-    class Duration {
-        private String start;
-        private String end;
-        private int tps;
-
-        Duration(String start, String end, int tps) {
-            this.start = start;
-            this.end = end;
-            this.tps = tps;
-        }
-
-        String getStart() {
-            return start;
-        }
-
-        String getEnd() {
-            return end;
-        }
-
-        int getTps() {
-            return tps;
-        }
-    }
-
-    public static void main(String[] args) {
-        Long[] times = TimeBuilder.INSTANCE.generateTimes();
-
-        for (Long time : times) {
-            DateTime dateTime = new DateTime(time);
-            logger.debug("{}-{}-{} {}:{}:{} {}", dateTime.year().getAsText(), dateTime.monthOfYear().getAsString(),
-                dateTime.dayOfMonth().getAsText(), dateTime.hourOfDay().getAsText(),
-                dateTime.minuteOfHour().getAsText(), dateTime.secondOfMinute().getAsText(),
-                dateTime.millisOfSecond().getAsText());
-        }
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.collector.agent.grpc.provider.handler.mock;
+
+import java.util.LinkedList;
+import java.util.List;
+import org.joda.time.DateTime;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author peng-yongsheng
+ */
+public enum TimeBuilder {
+    INSTANCE;
+
+    private static final Logger logger = LoggerFactory.getLogger(TimeBuilder.class);
+
+    private Duration[] durations = {
+        new Duration("2017-01-01T00:02:01.001", "2017-01-01T00:05:01.001", 20),
+        new Duration("2017-02-01T00:02:01.001", "2017-02-01T00:05:01.001", 20),
+        new Duration("2017-03-01T00:02:01.001", "2017-03-01T00:05:01.001", 20),
+
+        new Duration("2017-04-01T00:02:01.001", "2017-04-01T00:05:01.001", 20),
+        new Duration("2017-04-02T00:02:01.001", "2017-04-02T00:05:01.001", 20),
+        new Duration("2017-04-03T00:02:01.001", "2017-04-03T00:05:01.001", 20),
+
+        new Duration("2017-05-01T08:02:01.001", "2017-05-01T08:05:01.001", 20),
+        new Duration("2017-05-01T09:02:01.001", "2017-05-01T09:05:01.001", 20),
+        new Duration("2017-05-01T10:02:01.001", "2017-05-01T10:05:01.001", 20),
+
+        new Duration("2017-06-01T1:02:01.001", "2017-06-01T11:02:01.001", 100),
+    };
+
+    public Long[] generateTimes() {
+        List<Long> times = new LinkedList<>();
+
+        for (Duration duration : durations) {
+            DateTime start = new DateTime(duration.getStart());
+            DateTime end = new DateTime(duration.getEnd());
+
+            while (!start.isAfter(end)) {
+                for (int i = 0; i < duration.getTps(); i++) {
+                    times.add(start.getMillis());
+                }
+                start = start.plusSeconds(1);
+            }
+        }
+
+        return times.toArray(new Long[0]);
+    }
+
+    class Duration {
+        private String start;
+        private String end;
+        private int tps;
+
+        Duration(String start, String end, int tps) {
+            this.start = start;
+            this.end = end;
+            this.tps = tps;
+        }
+
+        String getStart() {
+            return start;
+        }
+
+        String getEnd() {
+            return end;
+        }
+
+        int getTps() {
+            return tps;
+        }
+    }
+
+    public static void main(String[] args) {
+        Long[] times = TimeBuilder.INSTANCE.generateTimes();
+
+        for (Long time : times) {
+            DateTime dateTime = new DateTime(time);
+            logger.debug("{}-{}-{} {}:{}:{} {}", dateTime.year().getAsText(), dateTime.monthOfYear().getAsString(),
+                dateTime.dayOfMonth().getAsText(), dateTime.hourOfDay().getAsText(),
+                dateTime.minuteOfHour().getAsText(), dateTime.secondOfMinute().getAsText(),
+                dateTime.millisOfSecond().getAsText());
+        }
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/TraceSegmentMock.java b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/TraceSegmentMock.java
index 1e14e2119..14b7ae5eb 100644
--- a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/TraceSegmentMock.java
+++ b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/TraceSegmentMock.java
@@ -1,87 +1,87 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.agent.grpc.provider.handler.mock;
-
-import io.grpc.stub.StreamObserver;
-import java.util.List;
-import org.apache.skywalking.apm.network.proto.UniqueId;
-import org.apache.skywalking.apm.network.proto.UpstreamSegment;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author peng-yongsheng
- */
-class TraceSegmentMock {
-
-    private static final Logger logger = LoggerFactory.getLogger(TraceSegmentMock.class);
-
-    void mock(List<StreamObserver<UpstreamSegment>> upstreamSegments, Long[] times, boolean isPrepare) {
-        long startTime = System.currentTimeMillis();
-        long lastTime = System.currentTimeMillis();
-        for (int i = 0; i < times.length; i++) {
-            long startTimestamp = times[i];
-
-            UniqueId.Builder globalTraceId = UniqueIdBuilder.INSTANCE.create();
-
-            ConsumerMock consumerMock = new ConsumerMock();
-            UniqueId.Builder consumerSegmentId = UniqueIdBuilder.INSTANCE.create();
-            consumerMock.mock(upstreamSegments.get(i % 4), globalTraceId, consumerSegmentId, startTimestamp, isPrepare);
-
-            ProviderMock providerMock = new ProviderMock();
-            UniqueId.Builder providerSegmentId = UniqueIdBuilder.INSTANCE.create();
-            providerMock.mock(upstreamSegments.get(i % 4), globalTraceId, providerSegmentId, consumerSegmentId, startTimestamp, isPrepare);
-
-            if (i % 10000 == 0) {
-                logger.info("sending segment number: {}", i);
-            }
-
-            if (i % 10000 == 0) {
-                long endTime = System.currentTimeMillis();
-                if (endTime - startTime > 0) {
-                    logger.info("tps: {}", ((long)i * 2 * 1000) / (endTime - startTime));
-                }
-            }
-
-            if (i % 5000 == 0) {
-                long endTime = System.currentTimeMillis();
-                long duration = endTime - lastTime;
-                if (duration > 0 && duration < 1000) {
-                    try {
-                        logger.info("begin sleeping...");
-                        Thread.sleep(1000 - duration + 100);
-                        logger.info("sleep: {}", 1000 - duration + 100);
-                    } catch (InterruptedException e) {
-                        logger.error(e.getMessage(), e);
-                    }
-                } else {
-                    try {
-                        logger.info("begin sleeping...");
-                        Thread.sleep(duration);
-                        logger.info("sleep: {}", duration);
-                    } catch (InterruptedException e) {
-                        logger.error(e.getMessage(), e);
-                    }
-                }
-                lastTime = System.currentTimeMillis();
-            }
-        }
-        logger.info("sending segment number: {}", times.length);
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.collector.agent.grpc.provider.handler.mock;
+
+import io.grpc.stub.StreamObserver;
+import java.util.List;
+import org.apache.skywalking.apm.network.proto.UniqueId;
+import org.apache.skywalking.apm.network.proto.UpstreamSegment;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author peng-yongsheng
+ */
+class TraceSegmentMock {
+
+    private static final Logger logger = LoggerFactory.getLogger(TraceSegmentMock.class);
+
+    void mock(List<StreamObserver<UpstreamSegment>> upstreamSegments, Long[] times, boolean isPrepare) {
+        long startTime = System.currentTimeMillis();
+        long lastTime = System.currentTimeMillis();
+        for (int i = 0; i < times.length; i++) {
+            long startTimestamp = times[i];
+
+            UniqueId.Builder globalTraceId = UniqueIdBuilder.INSTANCE.create();
+
+            ConsumerMock consumerMock = new ConsumerMock();
+            UniqueId.Builder consumerSegmentId = UniqueIdBuilder.INSTANCE.create();
+            consumerMock.mock(upstreamSegments.get(i % 4), globalTraceId, consumerSegmentId, startTimestamp, isPrepare);
+
+            ProviderMock providerMock = new ProviderMock();
+            UniqueId.Builder providerSegmentId = UniqueIdBuilder.INSTANCE.create();
+            providerMock.mock(upstreamSegments.get(i % 4), globalTraceId, providerSegmentId, consumerSegmentId, startTimestamp, isPrepare);
+
+            if (i % 10000 == 0) {
+                logger.info("sending segment number: {}", i);
+            }
+
+            if (i % 10000 == 0) {
+                long endTime = System.currentTimeMillis();
+                if (endTime - startTime > 0) {
+                    logger.info("tps: {}", ((long)i * 2 * 1000) / (endTime - startTime));
+                }
+            }
+
+            if (i % 5000 == 0) {
+                long endTime = System.currentTimeMillis();
+                long duration = endTime - lastTime;
+                if (duration > 0 && duration < 1000) {
+                    try {
+                        logger.info("begin sleeping...");
+                        Thread.sleep(1000 - duration + 100);
+                        logger.info("sleep: {}", 1000 - duration + 100);
+                    } catch (InterruptedException e) {
+                        logger.error(e.getMessage(), e);
+                    }
+                } else {
+                    try {
+                        logger.info("begin sleeping...");
+                        Thread.sleep(duration);
+                        logger.info("sleep: {}", duration);
+                    } catch (InterruptedException e) {
+                        logger.error(e.getMessage(), e);
+                    }
+                }
+                lastTime = System.currentTimeMillis();
+            }
+        }
+        logger.info("sending segment number: {}", times.length);
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/UniqueIdBuilder.java b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/UniqueIdBuilder.java
index 2fb040bfa..da2700f30 100644
--- a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/UniqueIdBuilder.java
+++ b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/mock/UniqueIdBuilder.java
@@ -1,39 +1,39 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.agent.grpc.provider.handler.mock;
-
-import java.util.concurrent.atomic.AtomicLong;
-import org.apache.skywalking.apm.network.proto.UniqueId;
-
-/**
- * @author peng-yongsheng
- */
-public enum UniqueIdBuilder {
-    INSTANCE;
-
-    private AtomicLong idPart = new AtomicLong(1);
-
-    UniqueId.Builder create() {
-        UniqueId.Builder uniqueId = UniqueId.newBuilder();
-        uniqueId.addIdParts(idPart.getAndIncrement());
-        uniqueId.addIdParts(idPart.getAndIncrement());
-        uniqueId.addIdParts(idPart.getAndIncrement());
-        return uniqueId;
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.collector.agent.grpc.provider.handler.mock;
+
+import java.util.concurrent.atomic.AtomicLong;
+import org.apache.skywalking.apm.network.proto.UniqueId;
+
+/**
+ * @author peng-yongsheng
+ */
+public enum UniqueIdBuilder {
+    INSTANCE;
+
+    private AtomicLong idPart = new AtomicLong(1);
+
+    UniqueId.Builder create() {
+        UniqueId.Builder uniqueId = UniqueId.newBuilder();
+        uniqueId.addIdParts(idPart.getAndIncrement());
+        uniqueId.addIdParts(idPart.getAndIncrement());
+        uniqueId.addIdParts(idPart.getAndIncrement());
+        return uniqueId;
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/naming/AgentGRPCNamingHandlerTest.java b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/naming/AgentGRPCNamingHandlerTest.java
index 4db8a54b1..233d8fe56 100644
--- a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/naming/AgentGRPCNamingHandlerTest.java
+++ b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/naming/AgentGRPCNamingHandlerTest.java
@@ -1,65 +1,65 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.skywalking.apm.collector.agent.grpc.provider.handler.naming;
-
-import com.google.gson.JsonArray;
-import com.google.gson.JsonElement;
-import org.apache.skywalking.apm.collector.server.jetty.ArgumentsParseException;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.Mock;
-
-import javax.servlet.http.HttpServletRequest;
-
-import static org.junit.Assert.assertEquals;
-
-/**
- * @author lican
- */
-public class AgentGRPCNamingHandlerTest {
-
-    private AgentGRPCNamingHandler handler;
-
-    @Mock
-    private HttpServletRequest request;
-
-    @Before
-    public void setUp() throws Exception {
-        AgentGRPCNamingListener listener = new AgentGRPCNamingListener();
-        listener.addAddress("127.0.0.1:10080");
-        handler = new AgentGRPCNamingHandler(listener);
-
-    }
-
-    @Test
-    public void pathSpec() {
-        assertEquals(handler.pathSpec(), "/agent/gRPC");
-    }
-
-    @Test
-    public void doGet() throws ArgumentsParseException {
-        JsonElement jsonElement = handler.doGet(request);
-        String s = ((JsonArray) jsonElement).get(0).getAsString();
-        assertEquals(s, "127.0.0.1:10080");
-    }
-
-    @Test(expected = UnsupportedOperationException.class)
-    public void doPost() throws ArgumentsParseException {
-        handler.doPost(request);
-    }
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.skywalking.apm.collector.agent.grpc.provider.handler.naming;
+
+import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
+import org.apache.skywalking.apm.collector.server.jetty.ArgumentsParseException;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mock;
+
+import javax.servlet.http.HttpServletRequest;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ * @author lican
+ */
+public class AgentGRPCNamingHandlerTest {
+
+    private AgentGRPCNamingHandler handler;
+
+    @Mock
+    private HttpServletRequest request;
+
+    @Before
+    public void setUp() throws Exception {
+        AgentGRPCNamingListener listener = new AgentGRPCNamingListener();
+        listener.addAddress("127.0.0.1:10080");
+        handler = new AgentGRPCNamingHandler(listener);
+
+    }
+
+    @Test
+    public void pathSpec() {
+        assertEquals(handler.pathSpec(), "/agent/gRPC");
+    }
+
+    @Test
+    public void doGet() throws ArgumentsParseException {
+        JsonElement jsonElement = handler.doGet(request);
+        String s = ((JsonArray) jsonElement).get(0).getAsString();
+        assertEquals(s, "127.0.0.1:10080");
+    }
+
+    @Test(expected = UnsupportedOperationException.class)
+    public void doPost() throws ArgumentsParseException {
+        handler.doPost(request);
+    }
 }
\ No newline at end of file
diff --git a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/naming/AgentGRPCNamingListenerTest.java b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/naming/AgentGRPCNamingListenerTest.java
index 997ac4872..4d2985cfe 100644
--- a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/naming/AgentGRPCNamingListenerTest.java
+++ b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/naming/AgentGRPCNamingListenerTest.java
@@ -1,51 +1,51 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.skywalking.apm.collector.agent.grpc.provider.handler.naming;
-
-import org.junit.Before;
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-/**
- * @author lican
- */
-public class AgentGRPCNamingListenerTest {
-
-    private AgentGRPCNamingListener listener;
-
-    @Before
-    public void setUp() throws Exception {
-        listener = new AgentGRPCNamingListener();
-    }
-
-    @Test
-    public void path() {
-        assertEquals(listener.path(), "/agent_gRPC/gRPC");
-    }
-
-    @Test
-    public void serverJoinNotify() {
-        listener.serverJoinNotify(null);
-    }
-
-    @Test
-    public void serverQuitNotify() {
-        listener.serverQuitNotify(null);
-    }
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.skywalking.apm.collector.agent.grpc.provider.handler.naming;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+/**
+ * @author lican
+ */
+public class AgentGRPCNamingListenerTest {
+
+    private AgentGRPCNamingListener listener;
+
+    @Before
+    public void setUp() throws Exception {
+        listener = new AgentGRPCNamingListener();
+    }
+
+    @Test
+    public void path() {
+        assertEquals(listener.path(), "/agent_gRPC/gRPC");
+    }
+
+    @Test
+    public void serverJoinNotify() {
+        listener.serverJoinNotify(null);
+    }
+
+    @Test
+    public void serverQuitNotify() {
+        listener.serverQuitNotify(null);
+    }
 }
\ No newline at end of file
diff --git a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/core/module/MockModule.java b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/core/module/MockModule.java
index a6cc0bcd4..de8c42fdb 100644
--- a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/core/module/MockModule.java
+++ b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/core/module/MockModule.java
@@ -1,66 +1,66 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.skywalking.apm.collector.core.module;
-
-import com.google.common.collect.Lists;
-import org.apache.skywalking.apm.collector.grpc.manager.service.GRPCManagerService;
-import org.apache.skywalking.apm.collector.server.grpc.GRPCServer;
-import org.mockito.Mockito;
-import org.mockito.internal.util.reflection.Whitebox;
-
-import java.util.LinkedList;
-
-import static org.mockito.Matchers.*;
-import static org.mockito.Mockito.when;
-
-/**
- * @author lican
- */
-public class MockModule extends ModuleDefine {
-
-    public MockModule() throws ServiceNotProvidedException {
-        ModuleProvider moduleProvider = Mockito.mock(ModuleProvider.class);
-        LinkedList<ModuleProvider> linkedList = Lists.newLinkedList();
-        linkedList.add(moduleProvider);
-        Whitebox.setInternalState(this, "loadedProviders", linkedList);
-        when(moduleProvider.getService(any())).then(invocation -> {
-            Class argumentAt = invocation.getArgumentAt(0, Class.class);
-            Object mock = Mockito.mock(argumentAt);
-            if (mock instanceof GRPCManagerService) {
-                when(((GRPCManagerService) mock).createIfAbsent(anyString(), anyInt())).then(invocation1 -> {
-                    GRPCServer grpcServer = new GRPCServer("127.0.0.1", 18098);
-                    grpcServer.initialize();
-                    return grpcServer;
-                });
-            }
-            return mock;
-        });
-    }
-
-    @Override
-    public String name() {
-        return null;
-    }
-
-    @Override
-    public Class[] services() {
-        return new Class[0];
-    }
-
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.skywalking.apm.collector.core.module;
+
+import com.google.common.collect.Lists;
+import org.apache.skywalking.apm.collector.grpc.manager.service.GRPCManagerService;
+import org.apache.skywalking.apm.collector.server.grpc.GRPCServer;
+import org.mockito.Mockito;
+import org.mockito.internal.util.reflection.Whitebox;
+
+import java.util.LinkedList;
+
+import static org.mockito.Matchers.*;
+import static org.mockito.Mockito.when;
+
+/**
+ * @author lican
+ */
+public class MockModule extends ModuleDefine {
+
+    public MockModule() throws ServiceNotProvidedException {
+        ModuleProvider moduleProvider = Mockito.mock(ModuleProvider.class);
+        LinkedList<ModuleProvider> linkedList = Lists.newLinkedList();
+        linkedList.add(moduleProvider);
+        Whitebox.setInternalState(this, "loadedProviders", linkedList);
+        when(moduleProvider.getService(any())).then(invocation -> {
+            Class argumentAt = invocation.getArgumentAt(0, Class.class);
+            Object mock = Mockito.mock(argumentAt);
+            if (mock instanceof GRPCManagerService) {
+                when(((GRPCManagerService) mock).createIfAbsent(anyString(), anyInt())).then(invocation1 -> {
+                    GRPCServer grpcServer = new GRPCServer("127.0.0.1", 18098);
+                    grpcServer.initialize();
+                    return grpcServer;
+                });
+            }
+            return mock;
+        });
+    }
+
+    @Override
+    public String name() {
+        return null;
+    }
+
+    @Override
+    public Class[] services() {
+        return new Class[0];
+    }
+
+
+}
diff --git a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/resources/log4j2.xml b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/resources/log4j2.xml
index 92f26c585..ec95aae62 100644
--- a/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/resources/log4j2.xml
+++ b/apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/resources/log4j2.xml
@@ -1,37 +1,37 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You 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.
-  ~
-  -->
-
-<Configuration status="debug">
-    <Appenders>
-        <Console name="Console" target="SYSTEM_OUT">
-            <PatternLayout charset="UTF-8" pattern="%d - %c -%-4r [%t] %-5p %x - %m%n"/>
-        </Console>
-    </Appenders>
-    <Loggers>
-        <logger name="org.eclipse.jetty" level="INFO"/>
-        <logger name="org.apache.zookeeper" level="INFO"/>
-        <logger name="org.elasticsearch.common.network.IfConfig" level="INFO"/>
-        <logger name="org.apache.skywalking.apm.collector.agent.grpc.provider.handler.JVMMetricsServiceHandler" level="INFO"/>
-        <logger name="org.apache.skywalking.apm.collector.analysis.worker.timer.PersistenceTimer" level="INFO"/>
-        <logger name="io.grpc.netty" level="INFO"/>
-        <Root level="debug">
-            <AppenderRef ref="Console"/>
-        </Root>
-    </Loggers>
-</Configuration>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You 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.
+  ~
+  -->
+
+<Configuration status="debug">
+    <Appenders>
+        <Console name="Console" target="SYSTEM_OUT">
+            <PatternLayout charset="UTF-8" pattern="%d - %c -%-4r [%t] %-5p %x - %m%n"/>
+        </Console>
+    </Appenders>
+    <Loggers>
+        <logger name="org.eclipse.jetty" level="INFO"/>
+        <logger name="org.apache.zookeeper" level="INFO"/>
+        <logger name="org.elasticsearch.common.network.IfConfig" level="INFO"/>
+        <logger name="org.apache.skywalking.apm.collector.agent.grpc.provider.handler.JVMMetricsServiceHandler" level="INFO"/>
+        <logger name="org.apache.skywalking.apm.collector.analysis.worker.timer.PersistenceTimer" level="INFO"/>
+        <logger name="io.grpc.netty" level="INFO"/>
+        <Root level="debug">
+            <AppenderRef ref="Console"/>
+        </Root>
+    </Loggers>
+</Configuration>
diff --git a/apm-collector/apm-collector-agent/agent-grpc/pom.xml b/apm-collector/apm-collector-agent/agent-grpc/pom.xml
index 0c1af60b7..9aef4c881 100644
--- a/apm-collector/apm-collector-agent/agent-grpc/pom.xml
+++ b/apm-collector/apm-collector-agent/agent-grpc/pom.xml
@@ -1,35 +1,35 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You 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.
-  ~
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>apm-collector-agent</artifactId>
-        <groupId>org.apache.skywalking</groupId>
-        <version>5.0.0-beta2-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>agent-grpc</artifactId>
-    <packaging>pom</packaging>
-    <modules>
-        <module>agent-grpc-define</module>
-        <module>agent-grpc-provider</module>
-    </modules>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You 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.
+  ~
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>apm-collector-agent</artifactId>
+        <groupId>org.apache.skywalking</groupId>
+        <version>5.0.0-beta2-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>agent-grpc</artifactId>
+    <packaging>pom</packaging>
+    <modules>
+        <module>agent-grpc-define</module>
+        <module>agent-grpc-provider</module>
+    </modules>
 </project>
\ No newline at end of file
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-define/pom.xml b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-define/pom.xml
index bd17d9c96..91fc34112 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-define/pom.xml
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-define/pom.xml
@@ -1,30 +1,30 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You 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.
-  ~
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>agent-jetty</artifactId>
-        <groupId>org.apache.skywalking</groupId>
-        <version>5.0.0-beta2-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>agent-jetty-define</artifactId>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You 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.
+  ~
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>agent-jetty</artifactId>
+        <groupId>org.apache.skywalking</groupId>
+        <version>5.0.0-beta2-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>agent-jetty-define</artifactId>
 </project>
\ No newline at end of file
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-define/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/define/AgentJettyModule.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-define/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/define/AgentJettyModule.java
index 4adc66427..35c4657d0 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-define/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/define/AgentJettyModule.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-define/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/define/AgentJettyModule.java
@@ -1,37 +1,37 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.agent.jetty.define;
-
-import org.apache.skywalking.apm.collector.core.module.ModuleDefine;
-
-/**
- * @author peng-yongsheng
- */
-public class AgentJettyModule extends ModuleDefine {
-
-    public static final String NAME = "agent_jetty";
-
-    @Override public String name() {
-        return NAME;
-    }
-
-    @Override public Class[] services() {
-        return new Class[0];
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.collector.agent.jetty.define;
+
+import org.apache.skywalking.apm.collector.core.module.ModuleDefine;
+
+/**
+ * @author peng-yongsheng
+ */
+public class AgentJettyModule extends ModuleDefine {
+
+    public static final String NAME = "agent_jetty";
+
+    @Override public String name() {
+        return NAME;
+    }
+
+    @Override public Class[] services() {
+        return new Class[0];
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-define/src/main/resources/META-INF/services/org.apache.skywalking.apm.collector.core.module.ModuleDefine b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-define/src/main/resources/META-INF/services/org.apache.skywalking.apm.collector.core.module.ModuleDefine
index 24ac5122e..e46566acf 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-define/src/main/resources/META-INF/services/org.apache.skywalking.apm.collector.core.module.ModuleDefine
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-define/src/main/resources/META-INF/services/org.apache.skywalking.apm.collector.core.module.ModuleDefine
@@ -1,19 +1,19 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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.
-#
-#
-
-org.apache.skywalking.apm.collector.agent.jetty.define.AgentJettyModule
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+#
+#
+
+org.apache.skywalking.apm.collector.agent.jetty.define.AgentJettyModule
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/pom.xml b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/pom.xml
index 0220db32b..4281f7311 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/pom.xml
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/pom.xml
@@ -1,74 +1,74 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You 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.
-  ~
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>agent-jetty</artifactId>
-        <groupId>org.apache.skywalking</groupId>
-        <version>5.0.0-beta2-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>agent-jetty-provider</artifactId>
-    <packaging>jar</packaging>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.skywalking</groupId>
-            <artifactId>agent-jetty-define</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.skywalking</groupId>
-            <artifactId>collector-cluster-define</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.skywalking</groupId>
-            <artifactId>collector-naming-define</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.skywalking</groupId>
-            <artifactId>collector-jetty-manager-define</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.skywalking</groupId>
-            <artifactId>register-define</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.skywalking</groupId>
-            <artifactId>segment-parser-define</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.skywalking</groupId>
-            <artifactId>jvm-define</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.skywalking</groupId>
-            <artifactId>metric-define</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-    </dependencies>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You 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.
+  ~
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>agent-jetty</artifactId>
+        <groupId>org.apache.skywalking</groupId>
+        <version>5.0.0-beta2-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>agent-jetty-provider</artifactId>
+    <packaging>jar</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.skywalking</groupId>
+            <artifactId>agent-jetty-define</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.skywalking</groupId>
+            <artifactId>collector-cluster-define</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.skywalking</groupId>
+            <artifactId>collector-naming-define</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.skywalking</groupId>
+            <artifactId>collector-jetty-manager-define</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.skywalking</groupId>
+            <artifactId>register-define</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.skywalking</groupId>
+            <artifactId>segment-parser-define</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.skywalking</groupId>
+            <artifactId>jvm-define</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.skywalking</groupId>
+            <artifactId>metric-define</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
 </project>
\ No newline at end of file
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/AgentModuleJettyConfig.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/AgentModuleJettyConfig.java
index d6c86c32b..750f51170 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/AgentModuleJettyConfig.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/AgentModuleJettyConfig.java
@@ -1,27 +1,27 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.agent.jetty.provider;
-
-import org.apache.skywalking.apm.collector.server.jetty.JettyServerConfig;
-
-/**
- * @author peng-yongsheng
- */
-class AgentModuleJettyConfig extends JettyServerConfig {
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.collector.agent.jetty.provider;
+
+import org.apache.skywalking.apm.collector.server.jetty.JettyServerConfig;
+
+/**
+ * @author peng-yongsheng
+ */
+class AgentModuleJettyConfig extends JettyServerConfig {
+}
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/AgentModuleJettyProvider.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/AgentModuleJettyProvider.java
index 4e7cdbbef..a331b6d9f 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/AgentModuleJettyProvider.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/AgentModuleJettyProvider.java
@@ -1,98 +1,98 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.agent.jetty.provider;
-
-import org.apache.skywalking.apm.collector.agent.jetty.define.AgentJettyModule;
-import org.apache.skywalking.apm.collector.agent.jetty.provider.handler.ApplicationRegisterServletHandler;
-import org.apache.skywalking.apm.collector.agent.jetty.provider.handler.InstanceDiscoveryServletHandler;
-import org.apache.skywalking.apm.collector.agent.jetty.provider.handler.NetworkAddressRegisterServletHandler;
-import org.apache.skywalking.apm.collector.agent.jetty.provider.handler.ServiceNameDiscoveryServiceHandler;
-import org.apache.skywalking.apm.collector.agent.jetty.provider.handler.TraceSegmentServletHandler;
-import org.apache.skywalking.apm.collector.agent.jetty.provider.handler.naming.AgentJettyNamingHandler;
-import org.apache.skywalking.apm.collector.agent.jetty.provider.handler.naming.AgentJettyNamingListener;
-import org.apache.skywalking.apm.collector.cluster.ClusterModule;
-import org.apache.skywalking.apm.collector.cluster.service.ModuleListenerService;
-import org.apache.skywalking.apm.collector.cluster.service.ModuleRegisterService;
-import org.apache.skywalking.apm.collector.core.module.*;
-import org.apache.skywalking.apm.collector.core.module.ModuleDefine;
-import org.apache.skywalking.apm.collector.jetty.manager.JettyManagerModule;
-import org.apache.skywalking.apm.collector.jetty.manager.service.JettyManagerService;
-import org.apache.skywalking.apm.collector.naming.NamingModule;
-import org.apache.skywalking.apm.collector.naming.service.NamingHandlerRegisterService;
-import org.apache.skywalking.apm.collector.server.jetty.JettyServer;
-
-/**
- * @author peng-yongsheng
- */
-public class AgentModuleJettyProvider extends ModuleProvider {
-
-    public static final String NAME = "jetty";
-    private final AgentModuleJettyConfig config;
-
-    public AgentModuleJettyProvider() {
-        super();
-        this.config = new AgentModuleJettyConfig();
-    }
-
-    @Override public String name() {
-        return NAME;
-    }
-
-    @Override public Class<? extends ModuleDefine> module() {
-        return AgentJettyModule.class;
-    }
-
-    @Override public ModuleConfig createConfigBeanIfAbsent() {
-        return config;
-    }
-
-    @Override public void prepare() {
-    }
-
-    @Override public void start() {
-        ModuleRegisterService moduleRegisterService = getManager().find(ClusterModule.NAME).getService(ModuleRegisterService.class);
-        moduleRegisterService.register(AgentJettyModule.NAME, this.name(), new AgentModuleJettyRegistration(config.getHost(), config.getPort(), config.getContextPath()));
-
-        AgentJettyNamingListener namingListener = new AgentJettyNamingListener();
-        ModuleListenerService moduleListenerService = getManager().find(ClusterModule.NAME).getService(ModuleListenerService.class);
-        moduleListenerService.addListener(namingListener);
-
-        NamingHandlerRegisterService namingHandlerRegisterService = getManager().find(NamingModule.NAME).getService(NamingHandlerRegisterService.class);
-        namingHandlerRegisterService.register(new AgentJettyNamingHandler(namingListener));
-
-        JettyManagerService managerService = getManager().find(JettyManagerModule.NAME).getService(JettyManagerService.class);
-        JettyServer jettyServer = managerService.createIfAbsent(config.getHost(), config.getPort(), config.getContextPath());
-        addHandlers(jettyServer);
-    }
-
-    @Override public void notifyAfterCompleted() {
-    }
-
-    @Override public String[] requiredModules() {
-        return new String[] {ClusterModule.NAME, NamingModule.NAME, JettyManagerModule.NAME};
-    }
-
-    private void addHandlers(JettyServer jettyServer) {
-        jettyServer.addHandler(new TraceSegmentServletHandler(getManager()));
-        jettyServer.addHandler(new ApplicationRegisterServletHandler(getManager()));
-        jettyServer.addHandler(new InstanceDiscoveryServletHandler(getManager()));
-        jettyServer.addHandler(new ServiceNameDiscoveryServiceHandler(getManager()));
-        jettyServer.addHandler(new NetworkAddressRegisterServletHandler(getManager()));
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.collector.agent.jetty.provider;
+
+import org.apache.skywalking.apm.collector.agent.jetty.define.AgentJettyModule;
+import org.apache.skywalking.apm.collector.agent.jetty.provider.handler.ApplicationRegisterServletHandler;
+import org.apache.skywalking.apm.collector.agent.jetty.provider.handler.InstanceDiscoveryServletHandler;
+import org.apache.skywalking.apm.collector.agent.jetty.provider.handler.NetworkAddressRegisterServletHandler;
+import org.apache.skywalking.apm.collector.agent.jetty.provider.handler.ServiceNameDiscoveryServiceHandler;
+import org.apache.skywalking.apm.collector.agent.jetty.provider.handler.TraceSegmentServletHandler;
+import org.apache.skywalking.apm.collector.agent.jetty.provider.handler.naming.AgentJettyNamingHandler;
+import org.apache.skywalking.apm.collector.agent.jetty.provider.handler.naming.AgentJettyNamingListener;
+import org.apache.skywalking.apm.collector.cluster.ClusterModule;
+import org.apache.skywalking.apm.collector.cluster.service.ModuleListenerService;
+import org.apache.skywalking.apm.collector.cluster.service.ModuleRegisterService;
+import org.apache.skywalking.apm.collector.core.module.*;
+import org.apache.skywalking.apm.collector.core.module.ModuleDefine;
+import org.apache.skywalking.apm.collector.jetty.manager.JettyManagerModule;
+import org.apache.skywalking.apm.collector.jetty.manager.service.JettyManagerService;
+import org.apache.skywalking.apm.collector.naming.NamingModule;
+import org.apache.skywalking.apm.collector.naming.service.NamingHandlerRegisterService;
+import org.apache.skywalking.apm.collector.server.jetty.JettyServer;
+
+/**
+ * @author peng-yongsheng
+ */
+public class AgentModuleJettyProvider extends ModuleProvider {
+
+    public static final String NAME = "jetty";
+    private final AgentModuleJettyConfig config;
+
+    public AgentModuleJettyProvider() {
+        super();
+        this.config = new AgentModuleJettyConfig();
+    }
+
+    @Override public String name() {
+        return NAME;
+    }
+
+    @Override public Class<? extends ModuleDefine> module() {
+        return AgentJettyModule.class;
+    }
+
+    @Override public ModuleConfig createConfigBeanIfAbsent() {
+        return config;
+    }
+
+    @Override public void prepare() {
+    }
+
+    @Override public void start() {
+        ModuleRegisterService moduleRegisterService = getManager().find(ClusterModule.NAME).getService(ModuleRegisterService.class);
+        moduleRegisterService.register(AgentJettyModule.NAME, this.name(), new AgentModuleJettyRegistration(config.getHost(), config.getPort(), config.getContextPath()));
+
+        AgentJettyNamingListener namingListener = new AgentJettyNamingListener();
+        ModuleListenerService moduleListenerService = getManager().find(ClusterModule.NAME).getService(ModuleListenerService.class);
+        moduleListenerService.addListener(namingListener);
+
+        NamingHandlerRegisterService namingHandlerRegisterService = getManager().find(NamingModule.NAME).getService(NamingHandlerRegisterService.class);
+        namingHandlerRegisterService.register(new AgentJettyNamingHandler(namingListener));
+
+        JettyManagerService managerService = getManager().find(JettyManagerModule.NAME).getService(JettyManagerService.class);
+        JettyServer jettyServer = managerService.createIfAbsent(config.getHost(), config.getPort(), config.getContextPath());
+        addHandlers(jettyServer);
+    }
+
+    @Override public void notifyAfterCompleted() {
+    }
+
+    @Override public String[] requiredModules() {
+        return new String[] {ClusterModule.NAME, NamingModule.NAME, JettyManagerModule.NAME};
+    }
+
+    private void addHandlers(JettyServer jettyServer) {
+        jettyServer.addHandler(new TraceSegmentServletHandler(getManager()));
+        jettyServer.addHandler(new ApplicationRegisterServletHandler(getManager()));
+        jettyServer.addHandler(new InstanceDiscoveryServletHandler(getManager()));
+        jettyServer.addHandler(new ServiceNameDiscoveryServiceHandler(getManager()));
+        jettyServer.addHandler(new NetworkAddressRegisterServletHandler(getManager()));
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/AgentModuleJettyRegistration.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/AgentModuleJettyRegistration.java
index 5dac3275d..162597eca 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/AgentModuleJettyRegistration.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/AgentModuleJettyRegistration.java
@@ -1,41 +1,41 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.agent.jetty.provider;
-
-import org.apache.skywalking.apm.collector.cluster.ModuleRegistration;
-
-/**
- * @author peng-yongsheng
- */
-public class AgentModuleJettyRegistration extends ModuleRegistration {
-
-    private final String host;
-    private final int port;
-    private final String contextPath;
-
-    public AgentModuleJettyRegistration(String host, int port, String contextPath) {
-        this.host = host;
-        this.port = port;
-        this.contextPath = contextPath;
-    }
-
-    @Override public Value buildValue() {
-        return new Value(host, port, contextPath);
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.collector.agent.jetty.provider;
+
+import org.apache.skywalking.apm.collector.cluster.ModuleRegistration;
+
+/**
+ * @author peng-yongsheng
+ */
+public class AgentModuleJettyRegistration extends ModuleRegistration {
+
+    private final String host;
+    private final int port;
+    private final String contextPath;
+
+    public AgentModuleJettyRegistration(String host, int port, String contextPath) {
+        this.host = host;
+        this.port = port;
+        this.contextPath = contextPath;
+    }
+
+    @Override public Value buildValue() {
+        return new Value(host, port, contextPath);
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/ApplicationRegisterServletHandler.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/ApplicationRegisterServletHandler.java
index c60f4b631..806b8b8b3 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/ApplicationRegisterServletHandler.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/ApplicationRegisterServletHandler.java
@@ -1,76 +1,76 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.agent.jetty.provider.handler;
-
-import com.google.gson.Gson;
-import com.google.gson.JsonArray;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonObject;
-import java.io.IOException;
-import javax.servlet.http.HttpServletRequest;
-import org.apache.skywalking.apm.collector.analysis.register.define.AnalysisRegisterModule;
-import org.apache.skywalking.apm.collector.analysis.register.define.service.IApplicationIDService;
-import org.apache.skywalking.apm.collector.core.module.ModuleManager;
-import org.apache.skywalking.apm.collector.server.jetty.ArgumentsParseException;
-import org.apache.skywalking.apm.collector.server.jetty.JettyHandler;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author peng-yongsheng
- */
-public class ApplicationRegisterServletHandler extends JettyHandler {
-
-    private static final Logger logger = LoggerFactory.getLogger(ApplicationRegisterServletHandler.class);
-
-    private final IApplicationIDService applicationIDService;
-    private Gson gson = new Gson();
-    private static final String APPLICATION_CODE = "c";
-    private static final String APPLICATION_ID = "i";
-
-    public ApplicationRegisterServletHandler(ModuleManager moduleManager) {
-        this.applicationIDService = moduleManager.find(AnalysisRegisterModule.NAME).getService(IApplicationIDService.class);
-    }
-
-    @Override public String pathSpec() {
-        return "/application/register";
-    }
-
-    @Override protected JsonElement doGet(HttpServletRequest req) throws ArgumentsParseException {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override protected JsonElement doPost(HttpServletRequest req) throws ArgumentsParseException {
-        JsonArray responseArray = new JsonArray();
-        try {
-            JsonArray applicationCodes = gson.fromJson(req.getReader(), JsonArray.class);
-            for (int i = 0; i < applicationCodes.size(); i++) {
-                String applicationCode = applicationCodes.get(i).getAsString();
-                int applicationId = applicationIDService.getOrCreateForApplicationCode(applicationCode);
-                JsonObject mapping = new JsonObject();
-                mapping.addProperty(APPLICATION_CODE, applicationCode);
-                mapping.addProperty(APPLICATION_ID, applicationId);
-                responseArray.add(mapping);
-            }
-        } catch (IOException e) {
-            logger.error(e.getMessage(), e);
-        }
-        return responseArray;
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.collector.agent.jetty.provider.handler;
+
+import com.google.gson.Gson;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import java.io.IOException;
+import javax.servlet.http.HttpServletRequest;
+import org.apache.skywalking.apm.collector.analysis.register.define.AnalysisRegisterModule;
+import org.apache.skywalking.apm.collector.analysis.register.define.service.IApplicationIDService;
+import org.apache.skywalking.apm.collector.core.module.ModuleManager;
+import org.apache.skywalking.apm.collector.server.jetty.ArgumentsParseException;
+import org.apache.skywalking.apm.collector.server.jetty.JettyHandler;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author peng-yongsheng
+ */
+public class ApplicationRegisterServletHandler extends JettyHandler {
+
+    private static final Logger logger = LoggerFactory.getLogger(ApplicationRegisterServletHandler.class);
+
+    private final IApplicationIDService applicationIDService;
+    private Gson gson = new Gson();
+    private static final String APPLICATION_CODE = "c";
+    private static final String APPLICATION_ID = "i";
+
+    public ApplicationRegisterServletHandler(ModuleManager moduleManager) {
+        this.applicationIDService = moduleManager.find(AnalysisRegisterModule.NAME).getService(IApplicationIDService.class);
+    }
+
+    @Override public String pathSpec() {
+        return "/application/register";
+    }
+
+    @Override protected JsonElement doGet(HttpServletRequest req) throws ArgumentsParseException {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override protected JsonElement doPost(HttpServletRequest req) throws ArgumentsParseException {
+        JsonArray responseArray = new JsonArray();
+        try {
+            JsonArray applicationCodes = gson.fromJson(req.getReader(), JsonArray.class);
+            for (int i = 0; i < applicationCodes.size(); i++) {
+                String applicationCode = applicationCodes.get(i).getAsString();
+                int applicationId = applicationIDService.getOrCreateForApplicationCode(applicationCode);
+                JsonObject mapping = new JsonObject();
+                mapping.addProperty(APPLICATION_CODE, applicationCode);
+                mapping.addProperty(APPLICATION_ID, applicationId);
+                responseArray.add(mapping);
+            }
+        } catch (IOException e) {
+            logger.error(e.getMessage(), e);
+        }
+        return responseArray;
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/InstanceDiscoveryServletHandler.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/InstanceDiscoveryServletHandler.java
index d88d86c81..1a4f77bf8 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/InstanceDiscoveryServletHandler.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/InstanceDiscoveryServletHandler.java
@@ -1,79 +1,79 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.agent.jetty.provider.handler;
-
-import com.google.gson.Gson;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonObject;
-import java.io.IOException;
-import javax.servlet.http.HttpServletRequest;
-import org.apache.skywalking.apm.collector.analysis.register.define.AnalysisRegisterModule;
-import org.apache.skywalking.apm.collector.analysis.register.define.service.IInstanceIDService;
-import org.apache.skywalking.apm.collector.core.module.ModuleManager;
-import org.apache.skywalking.apm.collector.server.jetty.ArgumentsParseException;
-import org.apache.skywalking.apm.collector.server.jetty.JettyHandler;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author peng-yongsheng
- */
-public class InstanceDiscoveryServletHandler extends JettyHandler {
-
-    private static final Logger logger = LoggerFactory.getLogger(InstanceDiscoveryServletHandler.class);
-
-    private final IInstanceIDService instanceIDService;
-    private final Gson gson = new Gson();
-
-    private static final String APPLICATION_ID = "ai";
-    private static final String AGENT_UUID = "au";
-    private static final String REGISTER_TIME = "rt";
-    private static final String INSTANCE_ID = "ii";
-    private static final String OS_INFO = "oi";
-
-    public InstanceDiscoveryServletHandler(ModuleManager moduleManager) {
-        this.instanceIDService = moduleManager.find(AnalysisRegisterModule.NAME).getService(IInstanceIDService.class);
-    }
-
-    @Override public String pathSpec() {
-        return "/instance/register";
-    }
-
-    @Override protected JsonElement doGet(HttpServletRequest req) throws ArgumentsParseException {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override protected JsonElement doPost(HttpServletRequest req) throws ArgumentsParseException {
-        JsonObject responseJson = new JsonObject();
-        try {
-            JsonObject instance = gson.fromJson(req.getReader(), JsonObject.class);
-            int applicationId = instance.get(APPLICATION_ID).getAsInt();
-            String agentUUID = instance.get(AGENT_UUID).getAsString();
-            long registerTime = instance.get(REGISTER_TIME).getAsLong();
-            JsonObject osInfo = instance.get(OS_INFO).getAsJsonObject();
-
-            int instanceId = instanceIDService.getOrCreateByAgentUUID(applicationId, agentUUID, registerTime, osInfo.toString());
-            responseJson.addProperty(APPLICATION_ID, applicationId);
-            responseJson.addProperty(INSTANCE_ID, instanceId);
-        } catch (IOException e) {
-            logger.error(e.getMessage(), e);
-        }
-        return responseJson;
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.collector.agent.jetty.provider.handler;
+
+import com.google.gson.Gson;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import java.io.IOException;
+import javax.servlet.http.HttpServletRequest;
+import org.apache.skywalking.apm.collector.analysis.register.define.AnalysisRegisterModule;
+import org.apache.skywalking.apm.collector.analysis.register.define.service.IInstanceIDService;
+import org.apache.skywalking.apm.collector.core.module.ModuleManager;
+import org.apache.skywalking.apm.collector.server.jetty.ArgumentsParseException;
+import org.apache.skywalking.apm.collector.server.jetty.JettyHandler;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author peng-yongsheng
+ */
+public class InstanceDiscoveryServletHandler extends JettyHandler {
+
+    private static final Logger logger = LoggerFactory.getLogger(InstanceDiscoveryServletHandler.class);
+
+    private final IInstanceIDService instanceIDService;
+    private final Gson gson = new Gson();
+
+    private static final String APPLICATION_ID = "ai";
+    private static final String AGENT_UUID = "au";
+    private static final String REGISTER_TIME = "rt";
+    private static final String INSTANCE_ID = "ii";
+    private static final String OS_INFO = "oi";
+
+    public InstanceDiscoveryServletHandler(ModuleManager moduleManager) {
+        this.instanceIDService = moduleManager.find(AnalysisRegisterModule.NAME).getService(IInstanceIDService.class);
+    }
+
+    @Override public String pathSpec() {
+        return "/instance/register";
+    }
+
+    @Override protected JsonElement doGet(HttpServletRequest req) throws ArgumentsParseException {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override protected JsonElement doPost(HttpServletRequest req) throws ArgumentsParseException {
+        JsonObject responseJson = new JsonObject();
+        try {
+            JsonObject instance = gson.fromJson(req.getReader(), JsonObject.class);
+            int applicationId = instance.get(APPLICATION_ID).getAsInt();
+            String agentUUID = instance.get(AGENT_UUID).getAsString();
+            long registerTime = instance.get(REGISTER_TIME).getAsLong();
+            JsonObject osInfo = instance.get(OS_INFO).getAsJsonObject();
+
+            int instanceId = instanceIDService.getOrCreateByAgentUUID(applicationId, agentUUID, registerTime, osInfo.toString());
+            responseJson.addProperty(APPLICATION_ID, applicationId);
+            responseJson.addProperty(INSTANCE_ID, instanceId);
+        } catch (IOException e) {
+            logger.error(e.getMessage(), e);
+        }
+        return responseJson;
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/InstanceHeartBeatServletHandler.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/InstanceHeartBeatServletHandler.java
index acc479ab6..8cc839b99 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/InstanceHeartBeatServletHandler.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/InstanceHeartBeatServletHandler.java
@@ -1,72 +1,72 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.agent.jetty.provider.handler;
-
-import com.google.gson.Gson;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonObject;
-import java.io.IOException;
-import javax.servlet.http.HttpServletRequest;
-import org.apache.skywalking.apm.collector.analysis.metric.define.AnalysisMetricModule;
-import org.apache.skywalking.apm.collector.analysis.metric.define.service.IInstanceHeartBeatService;
-import org.apache.skywalking.apm.collector.core.module.ModuleManager;
-import org.apache.skywalking.apm.collector.server.jetty.ArgumentsParseException;
-import org.apache.skywalking.apm.collector.server.jetty.JettyHandler;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author peng-yongsheng
- */
-public class InstanceHeartBeatServletHandler extends JettyHandler {
-
-    private static final Logger logger = LoggerFactory.getLogger(InstanceHeartBeatServletHandler.class);
-
-    private final IInstanceHeartBeatService instanceHeartBeatService;
-    private final Gson gson = new Gson();
-
-    private static final String INSTANCE_ID = "ii";
-    private static final String HEARTBEAT_TIME = "ht";
-
-    public InstanceHeartBeatServletHandler(ModuleManager moduleManager) {
-        this.instanceHeartBeatService = moduleManager.find(AnalysisMetricModule.NAME).getService(IInstanceHeartBeatService.class);
-    }
-
-    @Override public String pathSpec() {
-        return "/instance/heartbeat";
-    }
-
-    @Override protected JsonElement doGet(HttpServletRequest req) throws ArgumentsParseException {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override protected JsonElement doPost(HttpServletRequest req) throws ArgumentsParseException, IOException {
-        JsonObject responseJson = new JsonObject();
-        try {
-            JsonObject heartBeat = gson.fromJson(req.getReader(), JsonObject.class);
-            int instanceId = heartBeat.get(INSTANCE_ID).getAsInt();
-            long heartBeatTime = heartBeat.get(HEARTBEAT_TIME).getAsLong();
-
-            instanceHeartBeatService.heartBeat(instanceId, heartBeatTime);
-        } catch (IOException e) {
-            logger.error(e.getMessage(), e);
-        }
-        return responseJson;
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.collector.agent.jetty.provider.handler;
+
+import com.google.gson.Gson;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import java.io.IOException;
+import javax.servlet.http.HttpServletRequest;
+import org.apache.skywalking.apm.collector.analysis.metric.define.AnalysisMetricModule;
+import org.apache.skywalking.apm.collector.analysis.metric.define.service.IInstanceHeartBeatService;
+import org.apache.skywalking.apm.collector.core.module.ModuleManager;
+import org.apache.skywalking.apm.collector.server.jetty.ArgumentsParseException;
+import org.apache.skywalking.apm.collector.server.jetty.JettyHandler;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author peng-yongsheng
+ */
+public class InstanceHeartBeatServletHandler extends JettyHandler {
+
+    private static final Logger logger = LoggerFactory.getLogger(InstanceHeartBeatServletHandler.class);
+
+    private final IInstanceHeartBeatService instanceHeartBeatService;
+    private final Gson gson = new Gson();
+
+    private static final String INSTANCE_ID = "ii";
+    private static final String HEARTBEAT_TIME = "ht";
+
+    public InstanceHeartBeatServletHandler(ModuleManager moduleManager) {
+        this.instanceHeartBeatService = moduleManager.find(AnalysisMetricModule.NAME).getService(IInstanceHeartBeatService.class);
+    }
+
+    @Override public String pathSpec() {
+        return "/instance/heartbeat";
+    }
+
+    @Override protected JsonElement doGet(HttpServletRequest req) throws ArgumentsParseException {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override protected JsonElement doPost(HttpServletRequest req) throws ArgumentsParseException, IOException {
+        JsonObject responseJson = new JsonObject();
+        try {
+            JsonObject heartBeat = gson.fromJson(req.getReader(), JsonObject.class);
+            int instanceId = heartBeat.get(INSTANCE_ID).getAsInt();
+            long heartBeatTime = heartBeat.get(HEARTBEAT_TIME).getAsLong();
+
+            instanceHeartBeatService.heartBeat(instanceId, heartBeatTime);
+        } catch (IOException e) {
+            logger.error(e.getMessage(), e);
+        }
+        return responseJson;
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/NetworkAddressRegisterServletHandler.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/NetworkAddressRegisterServletHandler.java
index 318c3fe8c..ddf925f5e 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/NetworkAddressRegisterServletHandler.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/NetworkAddressRegisterServletHandler.java
@@ -1,77 +1,77 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.agent.jetty.provider.handler;
-
-import com.google.gson.Gson;
-import com.google.gson.JsonArray;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonObject;
-import java.io.IOException;
-import javax.servlet.http.HttpServletRequest;
-import org.apache.skywalking.apm.collector.analysis.register.define.AnalysisRegisterModule;
-import org.apache.skywalking.apm.collector.analysis.register.define.service.INetworkAddressIDService;
-import org.apache.skywalking.apm.collector.core.module.ModuleManager;
-import org.apache.skywalking.apm.collector.server.jetty.ArgumentsParseException;
-import org.apache.skywalking.apm.collector.server.jetty.JettyHandler;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author peng-yongsheng
- */
-public class NetworkAddressRegisterServletHandler extends JettyHandler {
-
-    private static final Logger logger = LoggerFactory.getLogger(NetworkAddressRegisterServletHandler.class);
-
-    private final INetworkAddressIDService networkAddressIDService;
-    private Gson gson = new Gson();
-    private static final String NETWORK_ADDRESS = "n";
-    private static final String ADDRESS_ID = "i";
-
-    public NetworkAddressRegisterServletHandler(ModuleManager moduleManager) {
-        this.networkAddressIDService = moduleManager.find(AnalysisRegisterModule.NAME).getService(INetworkAddressIDService.class);
-    }
-
-    @Override public String pathSpec() {
-        return "/networkAddress/register";
-    }
-
-    @Override protected JsonElement doGet(HttpServletRequest req) throws ArgumentsParseException {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override protected JsonElement doPost(HttpServletRequest req) throws ArgumentsParseException {
-        JsonArray responseArray = new JsonArray();
-        try {
-            JsonArray networkAddresses = gson.fromJson(req.getReader(), JsonArray.class);
-            for (int i = 0; i < networkAddresses.size(); i++) {
-                String networkAddress = networkAddresses.get(i).getAsString();
-                logger.debug("network address register, network address: {}", networkAddress);
-                int addressId = networkAddressIDService.get(networkAddress);
-                JsonObject mapping = new JsonObject();
-                mapping.addProperty(ADDRESS_ID, addressId);
-                mapping.addProperty(NETWORK_ADDRESS, networkAddress);
-                responseArray.add(mapping);
-            }
-        } catch (IOException e) {
-            logger.error(e.getMessage(), e);
-        }
-        return responseArray;
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.collector.agent.jetty.provider.handler;
+
+import com.google.gson.Gson;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import java.io.IOException;
+import javax.servlet.http.HttpServletRequest;
+import org.apache.skywalking.apm.collector.analysis.register.define.AnalysisRegisterModule;
+import org.apache.skywalking.apm.collector.analysis.register.define.service.INetworkAddressIDService;
+import org.apache.skywalking.apm.collector.core.module.ModuleManager;
+import org.apache.skywalking.apm.collector.server.jetty.ArgumentsParseException;
+import org.apache.skywalking.apm.collector.server.jetty.JettyHandler;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author peng-yongsheng
+ */
+public class NetworkAddressRegisterServletHandler extends JettyHandler {
+
+    private static final Logger logger = LoggerFactory.getLogger(NetworkAddressRegisterServletHandler.class);
+
+    private final INetworkAddressIDService networkAddressIDService;
+    private Gson gson = new Gson();
+    private static final String NETWORK_ADDRESS = "n";
+    private static final String ADDRESS_ID = "i";
+
+    public NetworkAddressRegisterServletHandler(ModuleManager moduleManager) {
+        this.networkAddressIDService = moduleManager.find(AnalysisRegisterModule.NAME).getService(INetworkAddressIDService.class);
+    }
+
+    @Override public String pathSpec() {
+        return "/networkAddress/register";
+    }
+
+    @Override protected JsonElement doGet(HttpServletRequest req) throws ArgumentsParseException {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override protected JsonElement doPost(HttpServletRequest req) throws ArgumentsParseException {
+        JsonArray responseArray = new JsonArray();
+        try {
+            JsonArray networkAddresses = gson.fromJson(req.getReader(), JsonArray.class);
+            for (int i = 0; i < networkAddresses.size(); i++) {
+                String networkAddress = networkAddresses.get(i).getAsString();
+                logger.debug("network address register, network address: {}", networkAddress);
+                int addressId = networkAddressIDService.get(networkAddress);
+                JsonObject mapping = new JsonObject();
+                mapping.addProperty(ADDRESS_ID, addressId);
+                mapping.addProperty(NETWORK_ADDRESS, networkAddress);
+                responseArray.add(mapping);
+            }
+        } catch (IOException e) {
+            logger.error(e.getMessage(), e);
+        }
+        return responseArray;
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/ServiceNameDiscoveryServiceHandler.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/ServiceNameDiscoveryServiceHandler.java
index 6ddce7907..3704c233e 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/ServiceNameDiscoveryServiceHandler.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/ServiceNameDiscoveryServiceHandler.java
@@ -1,85 +1,85 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.agent.jetty.provider.handler;
-
-import com.google.gson.Gson;
-import com.google.gson.JsonArray;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonObject;
-import java.io.IOException;
-import javax.servlet.http.HttpServletRequest;
-import org.apache.skywalking.apm.collector.analysis.register.define.AnalysisRegisterModule;
-import org.apache.skywalking.apm.collector.analysis.register.define.service.IServiceNameService;
-import org.apache.skywalking.apm.collector.core.module.ModuleManager;
-import org.apache.skywalking.apm.collector.server.jetty.ArgumentsParseException;
-import org.apache.skywalking.apm.collector.server.jetty.JettyHandler;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author peng-yongsheng
- */
-public class ServiceNameDiscoveryServiceHandler extends JettyHandler {
-
-    private static final Logger logger = LoggerFactory.getLogger(ServiceNameDiscoveryServiceHandler.class);
-
-    private final IServiceNameService serviceNameService;
-    private final Gson gson = new Gson();
-
-    private static final String APPLICATION_ID = "ai";
-    private static final String SERVICE_NAME = "sn";
-    private static final String SRC_SPAN_TYPE = "st";
-    private static final String SERVICE_ID = "si";
-    private static final String ELEMENT = "el";
-
-    public ServiceNameDiscoveryServiceHandler(ModuleManager moduleManager) {
-        this.serviceNameService = moduleManager.find(AnalysisRegisterModule.NAME).getService(IServiceNameService.class);
-    }
-
-    @Override public String pathSpec() {
-        return "/servicename/discovery";
-    }
-
-    @Override protected JsonElement doGet(HttpServletRequest req) throws ArgumentsParseException {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override protected JsonElement doPost(HttpServletRequest req) throws ArgumentsParseException {
-        JsonArray responseArray = new JsonArray();
-        try {
-            JsonArray services = gson.fromJson(req.getReader(), JsonArray.class);
-            for (JsonElement service : services) {
-                int applicationId = service.getAsJsonObject().get(APPLICATION_ID).getAsInt();
-                String serviceName = service.getAsJsonObject().get(SERVICE_NAME).getAsString();
-                int srcSpanType = service.getAsJsonObject().get(SRC_SPAN_TYPE).getAsInt();
-
-                int serviceId = serviceNameService.getOrCreate(applicationId, srcSpanType, serviceName);
-                if (serviceId != 0) {
-                    JsonObject responseJson = new JsonObject();
-                    responseJson.addProperty(SERVICE_ID, serviceId);
-                    responseJson.add(ELEMENT, service);
-                    responseArray.add(responseJson);
-                }
-            }
-        } catch (IOException e) {
-            logger.error(e.getMessage(), e);
-        }
-        return responseArray;
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.collector.agent.jetty.provider.handler;
+
+import com.google.gson.Gson;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import java.io.IOException;
+import javax.servlet.http.HttpServletRequest;
+import org.apache.skywalking.apm.collector.analysis.register.define.AnalysisRegisterModule;
+import org.apache.skywalking.apm.collector.analysis.register.define.service.IServiceNameService;
+import org.apache.skywalking.apm.collector.core.module.ModuleManager;
+import org.apache.skywalking.apm.collector.server.jetty.ArgumentsParseException;
+import org.apache.skywalking.apm.collector.server.jetty.JettyHandler;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author peng-yongsheng
+ */
+public class ServiceNameDiscoveryServiceHandler extends JettyHandler {
+
+    private static final Logger logger = LoggerFactory.getLogger(ServiceNameDiscoveryServiceHandler.class);
+
+    private final IServiceNameService serviceNameService;
+    private final Gson gson = new Gson();
+
+    private static final String APPLICATION_ID = "ai";
+    private static final String SERVICE_NAME = "sn";
+    private static final String SRC_SPAN_TYPE = "st";
+    private static final String SERVICE_ID = "si";
+    private static final String ELEMENT = "el";
+
+    public ServiceNameDiscoveryServiceHandler(ModuleManager moduleManager) {
+        this.serviceNameService = moduleManager.find(AnalysisRegisterModule.NAME).getService(IServiceNameService.class);
+    }
+
+    @Override public String pathSpec() {
+        return "/servicename/discovery";
+    }
+
+    @Override protected JsonElement doGet(HttpServletRequest req) throws ArgumentsParseException {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override protected JsonElement doPost(HttpServletRequest req) throws ArgumentsParseException {
+        JsonArray responseArray = new JsonArray();
+        try {
+            JsonArray services = gson.fromJson(req.getReader(), JsonArray.class);
+            for (JsonElement service : services) {
+                int applicationId = service.getAsJsonObject().get(APPLICATION_ID).getAsInt();
+                String serviceName = service.getAsJsonObject().get(SERVICE_NAME).getAsString();
+                int srcSpanType = service.getAsJsonObject().get(SRC_SPAN_TYPE).getAsInt();
+
+                int serviceId = serviceNameService.getOrCreate(applicationId, srcSpanType, serviceName);
+                if (serviceId != 0) {
+                    JsonObject responseJson = new JsonObject();
+                    responseJson.addProperty(SERVICE_ID, serviceId);
+                    responseJson.add(ELEMENT, service);
+                    responseArray.add(responseJson);
+                }
+            }
+        } catch (IOException e) {
+            logger.error(e.getMessage(), e);
+        }
+        return responseArray;
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/TraceSegmentServletHandler.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/TraceSegmentServletHandler.java
index fec68ef9e..307e8ffb4 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/TraceSegmentServletHandler.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/TraceSegmentServletHandler.java
@@ -1,80 +1,80 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.agent.jetty.provider.handler;
-
-import com.google.gson.JsonElement;
-import com.google.gson.stream.JsonReader;
-import java.io.BufferedReader;
-import java.io.IOException;
-import javax.servlet.http.HttpServletRequest;
-import org.apache.skywalking.apm.collector.agent.jetty.provider.handler.reader.TraceSegment;
-import org.apache.skywalking.apm.collector.agent.jetty.provider.handler.reader.TraceSegmentJsonReader;
-import org.apache.skywalking.apm.collector.analysis.segment.parser.define.AnalysisSegmentParserModule;
-import org.apache.skywalking.apm.collector.analysis.segment.parser.define.service.ISegmentParseService;
-import org.apache.skywalking.apm.collector.core.module.ModuleManager;
-import org.apache.skywalking.apm.collector.server.jetty.ArgumentsParseException;
-import org.apache.skywalking.apm.collector.server.jetty.JettyHandler;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author peng-yongsheng
- */
-public class TraceSegmentServletHandler extends JettyHandler {
-
-    private static final Logger logger = LoggerFactory.getLogger(TraceSegmentServletHandler.class);
-
-    private final ISegmentParseService segmentParseService;
-
-    public TraceSegmentServletHandler(ModuleManager moduleManager) {
-        this.segmentParseService = moduleManager.find(AnalysisSegmentParserModule.NAME).getService(ISegmentParseService.class);
-    }
-
-    @Override public String pathSpec() {
-        return "/segments";
-    }
-
-    @Override protected JsonElement doGet(HttpServletRequest req) throws ArgumentsParseException {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override protected JsonElement doPost(HttpServletRequest req) throws ArgumentsParseException {
-        logger.debug("receive stream segment");
-        try {
-            BufferedReader bufferedReader = req.getReader();
-            read(bufferedReader);
-        } catch (IOException e) {
-            logger.error(e.getMessage(), e);
-        }
-        return null;
-    }
-
-    private TraceSegmentJsonReader jsonReader = new TraceSegmentJsonReader();
-
-    private void read(BufferedReader bufferedReader) throws IOException {
-        JsonReader reader = new JsonReader(bufferedReader);
-
-        reader.beginArray();
-        while (reader.hasNext()) {
-            TraceSegment traceSegment = jsonReader.read(reader);
-            segmentParseService.parse(traceSegment.getUpstreamSegment(), ISegmentParseService.Source.Agent);
-        }
-        reader.endArray();
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.collector.agent.jetty.provider.handler;
+
+import com.google.gson.JsonElement;
+import com.google.gson.stream.JsonReader;
+import java.io.BufferedReader;
+import java.io.IOException;
+import javax.servlet.http.HttpServletRequest;
+import org.apache.skywalking.apm.collector.agent.jetty.provider.handler.reader.TraceSegment;
+import org.apache.skywalking.apm.collector.agent.jetty.provider.handler.reader.TraceSegmentJsonReader;
+import org.apache.skywalking.apm.collector.analysis.segment.parser.define.AnalysisSegmentParserModule;
+import org.apache.skywalking.apm.collector.analysis.segment.parser.define.service.ISegmentParseService;
+import org.apache.skywalking.apm.collector.core.module.ModuleManager;
+import org.apache.skywalking.apm.collector.server.jetty.ArgumentsParseException;
+import org.apache.skywalking.apm.collector.server.jetty.JettyHandler;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author peng-yongsheng
+ */
+public class TraceSegmentServletHandler extends JettyHandler {
+
+    private static final Logger logger = LoggerFactory.getLogger(TraceSegmentServletHandler.class);
+
+    private final ISegmentParseService segmentParseService;
+
+    public TraceSegmentServletHandler(ModuleManager moduleManager) {
+        this.segmentParseService = moduleManager.find(AnalysisSegmentParserModule.NAME).getService(ISegmentParseService.class);
+    }
+
+    @Override public String pathSpec() {
+        return "/segments";
+    }
+
+    @Override protected JsonElement doGet(HttpServletRequest req) throws ArgumentsParseException {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override protected JsonElement doPost(HttpServletRequest req) throws ArgumentsParseException {
+        logger.debug("receive stream segment");
+        try {
+            BufferedReader bufferedReader = req.getReader();
+            read(bufferedReader);
+        } catch (IOException e) {
+            logger.error(e.getMessage(), e);
+        }
+        return null;
+    }
+
+    private TraceSegmentJsonReader jsonReader = new TraceSegmentJsonReader();
+
+    private void read(BufferedReader bufferedReader) throws IOException {
+        JsonReader reader = new JsonReader(bufferedReader);
+
+        reader.beginArray();
+        while (reader.hasNext()) {
+            TraceSegment traceSegment = jsonReader.read(reader);
+            segmentParseService.parse(traceSegment.getUpstreamSegment(), ISegmentParseService.Source.Agent);
+        }
+        reader.endArray();
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/naming/AgentJettyNamingHandler.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/naming/AgentJettyNamingHandler.java
index cf6335002..0362c4161 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/naming/AgentJettyNamingHandler.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/naming/AgentJettyNamingHandler.java
@@ -1,54 +1,54 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-
-package org.apache.skywalking.apm.collector.agent.jetty.provider.handler.naming;
-
-import com.google.gson.JsonArray;
-import com.google.gson.JsonElement;
-import java.util.Set;
-import javax.servlet.http.HttpServletRequest;
-import org.apache.skywalking.apm.collector.server.jetty.ArgumentsParseException;
-import org.apache.skywalking.apm.collector.server.jetty.JettyHandler;
-
-/**
- * @author peng-yongsheng
- */
-public class AgentJettyNamingHandler extends JettyHandler {
-
-    private final AgentJettyNamingListener namingListener;
-
-    public AgentJettyNamingHandler(AgentJettyNamingListener namingListener) {
-        this.namingListener = namingListener;
-    }
-
-    @Override public String pathSpec() {
-        return "/agent/jetty";
-    }
-
-    @Override protected JsonElement doGet(HttpServletRequest req) throws ArgumentsParseException {
-        Set<String> servers = namingListener.getAddresses();
-        JsonArray serverArray = new JsonArray();
-        servers.forEach(serverArray::add);
-        return serverArray;
-    }
-
-    @Override protected JsonElement doPost(HttpServletRequest req) throws ArgumentsParseException {
-        throw new UnsupportedOperationException();
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+package org.apache.skywalking.apm.collector.agent.jetty.provider.handler.naming;
+
+import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
+import java.util.Set;
+import javax.servlet.http.HttpServletRequest;
+import org.apache.skywalking.apm.collector.server.jetty.ArgumentsParseException;
+import org.apache.skywalking.apm.collector.server.jetty.JettyHandler;
+
+/**
+ * @author peng-yongsheng
+ */
+public class AgentJettyNamingHandler extends JettyHandler {
+
+    private final AgentJettyNamingListener namingListener;
+
+    public AgentJettyNamingHandler(AgentJettyNamingListener namingListener) {
+        this.namingListener = namingListener;
+    }
+
+    @Override public String pathSpec() {
+        return "/agent/jetty";
+    }
+
+    @Override protected JsonElement doGet(HttpServletRequest req) throws ArgumentsParseException {
+        Set<String> servers = namingListener.getAddresses();
+        JsonArray serverArray = new JsonArray();
+        servers.forEach(serverArray::add);
+        return serverArray;
+    }
+
+    @Override protected JsonElement doPost(HttpServletRequest req) throws ArgumentsParseException {
+        throw new UnsupportedOperationException();
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/naming/AgentJettyNamingListener.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/naming/AgentJettyNamingListener.java
index 863569045..67fb15a9c 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/naming/AgentJettyNamingListener.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/naming/AgentJettyNamingListener.java
@@ -1,43 +1,43 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.agent.jetty.provider.handler.naming;
-
-import org.apache.skywalking.apm.collector.agent.jetty.define.AgentJettyModule;
-import org.apache.skywalking.apm.collector.agent.jetty.provider.AgentModuleJettyProvider;
-import org.apache.skywalking.apm.collector.cluster.ClusterModuleListener;
-
-/**
- * @author peng-yongsheng
- */
-public class AgentJettyNamingListener extends ClusterModuleListener {
-
-    public static final String PATH = "/" + AgentJettyModule.NAME + "/" + AgentModuleJettyProvider.NAME;
-
-    @Override public String path() {
-        return PATH;
-    }
-
-    @Override public void serverJoinNotify(String serverAddress) {
-
-    }
-
-    @Override public void serverQuitNotify(String serverAddress) {
-
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.collector.agent.jetty.provider.handler.naming;
+
+import org.apache.skywalking.apm.collector.agent.jetty.define.AgentJettyModule;
+import org.apache.skywalking.apm.collector.agent.jetty.provider.AgentModuleJettyProvider;
+import org.apache.skywalking.apm.collector.cluster.ClusterModuleListener;
+
+/**
+ * @author peng-yongsheng
+ */
+public class AgentJettyNamingListener extends ClusterModuleListener {
+
+    public static final String PATH = "/" + AgentJettyModule.NAME + "/" + AgentModuleJettyProvider.NAME;
+
+    @Override public String path() {
+        return PATH;
+    }
+
+    @Override public void serverJoinNotify(String serverAddress) {
+
+    }
+
+    @Override public void serverQuitNotify(String serverAddress) {
+
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/KeyWithStringValueJsonReader.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/KeyWithStringValueJsonReader.java
index f2b129791..81b8a9ebe 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/KeyWithStringValueJsonReader.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/KeyWithStringValueJsonReader.java
@@ -1,55 +1,55 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-
-package org.apache.skywalking.apm.collector.agent.jetty.provider.handler.reader;
-
-import com.google.gson.stream.JsonReader;
-import java.io.IOException;
-import org.apache.skywalking.apm.network.proto.KeyWithStringValue;
-
-/**
- * @author peng-yongsheng
- */
-public class KeyWithStringValueJsonReader implements StreamJsonReader<KeyWithStringValue> {
-
-    private static final String KEY = "k";
-    private static final String VALUE = "v";
-
-    @Override public KeyWithStringValue read(JsonReader reader) throws IOException {
-        KeyWithStringValue.Builder builder = KeyWithStringValue.newBuilder();
-
-        reader.beginObject();
-        while (reader.hasNext()) {
-            switch (reader.nextName()) {
-                case KEY:
-                    builder.setKey(reader.nextString());
-                    break;
-                case VALUE:
-                    builder.setValue(reader.nextString());
-                    break;
-                default:
-                    reader.skipValue();
-                    break;
-            }
-        }
-        reader.endObject();
-
-        return builder.build();
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+package org.apache.skywalking.apm.collector.agent.jetty.provider.handler.reader;
+
+import com.google.gson.stream.JsonReader;
+import java.io.IOException;
+import org.apache.skywalking.apm.network.proto.KeyWithStringValue;
+
+/**
+ * @author peng-yongsheng
+ */
+public class KeyWithStringValueJsonReader implements StreamJsonReader<KeyWithStringValue> {
+
+    private static final String KEY = "k";
+    private static final String VALUE = "v";
+
+    @Override public KeyWithStringValue read(JsonReader reader) throws IOException {
+        KeyWithStringValue.Builder builder = KeyWithStringValue.newBuilder();
+
+        reader.beginObject();
+        while (reader.hasNext()) {
+            switch (reader.nextName()) {
+                case KEY:
+                    builder.setKey(reader.nextString());
+                    break;
+                case VALUE:
+                    builder.setValue(reader.nextString());
+                    break;
+                default:
+                    reader.skipValue();
+                    break;
+            }
+        }
+        reader.endObject();
+
+        return builder.build();
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/LogJsonReader.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/LogJsonReader.java
index 150fa83fc..c11f86d54 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/LogJsonReader.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/LogJsonReader.java
@@ -1,61 +1,61 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-
-package org.apache.skywalking.apm.collector.agent.jetty.provider.handler.reader;
-
-import com.google.gson.stream.JsonReader;
-import java.io.IOException;
-import org.apache.skywalking.apm.network.proto.LogMessage;
-
-/**
- * @author peng-yongsheng
- */
-public class LogJsonReader implements StreamJsonReader<LogMessage> {
-
-    private KeyWithStringValueJsonReader keyWithStringValueJsonReader = new KeyWithStringValueJsonReader();
-
-    private static final String TIME = "ti";
-    private static final String LOG_DATA = "ld";
-
-    @Override public LogMessage read(JsonReader reader) throws IOException {
-        LogMessage.Builder builder = LogMessage.newBuilder();
-
-        reader.beginObject();
-        while (reader.hasNext()) {
-            switch (reader.nextName()) {
-                case TIME:
-                    builder.setTime(reader.nextLong());
-                    break;
-                case LOG_DATA:
-                    reader.beginArray();
-                    while (reader.hasNext()) {
-                        builder.addData(keyWithStringValueJsonReader.read(reader));
-                    }
-                    reader.endArray();
-                    break;
-                default:
-                    reader.skipValue();
-                    break;
-            }
-        }
-        reader.endObject();
-
-        return builder.build();
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+package org.apache.skywalking.apm.collector.agent.jetty.provider.handler.reader;
+
+import com.google.gson.stream.JsonReader;
+import java.io.IOException;
+import org.apache.skywalking.apm.network.proto.LogMessage;
+
+/**
+ * @author peng-yongsheng
+ */
+public class LogJsonReader implements StreamJsonReader<LogMessage> {
+
+    private KeyWithStringValueJsonReader keyWithStringValueJsonReader = new KeyWithStringValueJsonReader();
+
+    private static final String TIME = "ti";
+    private static final String LOG_DATA = "ld";
+
+    @Override public LogMessage read(JsonReader reader) throws IOException {
+        LogMessage.Builder builder = LogMessage.newBuilder();
+
+        reader.beginObject();
+        while (reader.hasNext()) {
+            switch (reader.nextName()) {
+                case TIME:
+                    builder.setTime(reader.nextLong());
+                    break;
+                case LOG_DATA:
+                    reader.beginArray();
+                    while (reader.hasNext()) {
+                        builder.addData(keyWithStringValueJsonReader.read(reader));
+                    }
+                    reader.endArray();
+                    break;
+                default:
+                    reader.skipValue();
+                    break;
+            }
+        }
+        reader.endObject();
+
+        return builder.build();
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/ReferenceJsonReader.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/ReferenceJsonReader.java
index b7dc32921..7ce6d101c 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/ReferenceJsonReader.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/ReferenceJsonReader.java
@@ -1,92 +1,92 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.agent.jetty.provider.handler.reader;
-
-import com.google.gson.stream.JsonReader;
-import java.io.IOException;
-import org.apache.skywalking.apm.network.proto.TraceSegmentReference;
-
-/**
- * @author peng-yongsheng
- */
-public class ReferenceJsonReader implements StreamJsonReader<TraceSegmentReference> {
-
-    private UniqueIdJsonReader uniqueIdJsonReader = new UniqueIdJsonReader();
-
-    private static final String PARENT_TRACE_SEGMENT_ID = "pts";
-    private static final String PARENT_APPLICATION_INSTANCE_ID = "pii";
-    private static final String PARENT_SPAN_ID = "psp";
-    private static final String PARENT_SERVICE_ID = "psi";
-    private static final String PARENT_SERVICE_NAME = "psn";
-    private static final String NETWORK_ADDRESS_ID = "ni";
-    private static final String NETWORK_ADDRESS = "nn";
-    private static final String ENTRY_APPLICATION_INSTANCE_ID = "eii";
-    private static final String ENTRY_SERVICE_ID = "esi";
-    private static final String ENTRY_SERVICE_NAME = "esn";
-    private static final String REF_TYPE_VALUE = "rv";
-
-    @Override public TraceSegmentReference read(JsonReader reader) throws IOException {
-        TraceSegmentReference.Builder builder = TraceSegmentReference.newBuilder();
-
-        reader.beginObject();
-        while (reader.hasNext()) {
-            switch (reader.nextName()) {
-                case PARENT_TRACE_SEGMENT_ID:
-                    builder.setParentTraceSegmentId(uniqueIdJsonReader.read(reader));
-                    break;
-                case PARENT_APPLICATION_INSTANCE_ID:
-                    builder.setParentApplicationInstanceId(reader.nextInt());
-                    break;
-                case PARENT_SPAN_ID:
-                    builder.setParentSpanId(reader.nextInt());
-                    break;
-                case PARENT_SERVICE_ID:
-                    builder.setParentServiceId(reader.nextInt());
-                    break;
-                case PARENT_SERVICE_NAME:
-                    builder.setParentServiceName(reader.nextString());
-                    break;
-                case NETWORK_ADDRESS_ID:
-                    builder.setNetworkAddressId(reader.nextInt());
-                    break;
-                case NETWORK_ADDRESS:
-                    builder.setNetworkAddress(reader.nextString());
-                    break;
-                case ENTRY_APPLICATION_INSTANCE_ID:
-                    builder.setEntryApplicationInstanceId(reader.nextInt());
-                    break;
-                case ENTRY_SERVICE_ID:
-                    builder.setEntryServiceId(reader.nextInt());
-                    break;
-                case ENTRY_SERVICE_NAME:
-                    builder.setEntryServiceName(reader.nextString());
-                    break;
-                case REF_TYPE_VALUE:
-                    builder.setRefTypeValue(reader.nextInt());
-                    break;
-                default:
-                    reader.skipValue();
-                    break;
-            }
-        }
-        reader.endObject();
-
-        return builder.build();
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.collector.agent.jetty.provider.handler.reader;
+
+import com.google.gson.stream.JsonReader;
+import java.io.IOException;
+import org.apache.skywalking.apm.network.proto.TraceSegmentReference;
+
+/**
+ * @author peng-yongsheng
+ */
+public class ReferenceJsonReader implements StreamJsonReader<TraceSegmentReference> {
+
+    private UniqueIdJsonReader uniqueIdJsonReader = new UniqueIdJsonReader();
+
+    private static final String PARENT_TRACE_SEGMENT_ID = "pts";
+    private static final String PARENT_APPLICATION_INSTANCE_ID = "pii";
+    private static final String PARENT_SPAN_ID = "psp";
+    private static final String PARENT_SERVICE_ID = "psi";
+    private static final String PARENT_SERVICE_NAME = "psn";
+    private static final String NETWORK_ADDRESS_ID = "ni";
+    private static final String NETWORK_ADDRESS = "nn";
+    private static final String ENTRY_APPLICATION_INSTANCE_ID = "eii";
+    private static final String ENTRY_SERVICE_ID = "esi";
+    private static final String ENTRY_SERVICE_NAME = "esn";
+    private static final String REF_TYPE_VALUE = "rv";
+
+    @Override public TraceSegmentReference read(JsonReader reader) throws IOException {
+        TraceSegmentReference.Builder builder = TraceSegmentReference.newBuilder();
+
+        reader.beginObject();
+        while (reader.hasNext()) {
+            switch (reader.nextName()) {
+                case PARENT_TRACE_SEGMENT_ID:
+                    builder.setParentTraceSegmentId(uniqueIdJsonReader.read(reader));
+                    break;
+                case PARENT_APPLICATION_INSTANCE_ID:
+                    builder.setParentApplicationInstanceId(reader.nextInt());
+                    break;
+                case PARENT_SPAN_ID:
+                    builder.setParentSpanId(reader.nextInt());
+                    break;
+                case PARENT_SERVICE_ID:
+                    builder.setParentServiceId(reader.nextInt());
+                    break;
+                case PARENT_SERVICE_NAME:
+                    builder.setParentServiceName(reader.nextString());
+                    break;
+                case NETWORK_ADDRESS_ID:
+                    builder.setNetworkAddressId(reader.nextInt());
+                    break;
+                case NETWORK_ADDRESS:
+                    builder.setNetworkAddress(reader.nextString());
+                    break;
+                case ENTRY_APPLICATION_INSTANCE_ID:
+                    builder.setEntryApplicationInstanceId(reader.nextInt());
+                    break;
+                case ENTRY_SERVICE_ID:
+                    builder.setEntryServiceId(reader.nextInt());
+                    break;
+                case ENTRY_SERVICE_NAME:
+                    builder.setEntryServiceName(reader.nextString());
+                    break;
+                case REF_TYPE_VALUE:
+                    builder.setRefTypeValue(reader.nextInt());
+                    break;
+                default:
+                    reader.skipValue();
+                    break;
+            }
+        }
+        reader.endObject();
+
+        return builder.build();
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/SegmentJsonReader.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/SegmentJsonReader.java
index 489886408..b18c1fa5a 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/SegmentJsonReader.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/SegmentJsonReader.java
@@ -1,78 +1,78 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.agent.jetty.provider.handler.reader;
-
-import com.google.gson.stream.JsonReader;
-import java.io.IOException;
-import org.apache.skywalking.apm.network.proto.TraceSegmentObject;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author peng-yongsheng
- */
-public class SegmentJsonReader implements StreamJsonReader<TraceSegmentObject.Builder> {
-
-    private static final Logger logger = LoggerFactory.getLogger(SegmentJsonReader.class);
-
-    private UniqueIdJsonReader uniqueIdJsonReader = new UniqueIdJsonReader();
-    private SpanJsonReader spanJsonReader = new SpanJsonReader();
-
-    private static final String TRACE_SEGMENT_ID = "ts";
-    private static final String APPLICATION_ID = "ai";
-    private static final String APPLICATION_INSTANCE_ID = "ii";
-    private static final String SPANS = "ss";
-
-    @Override public TraceSegmentObject.Builder read(JsonReader reader) throws IOException {
-        TraceSegmentObject.Builder builder = TraceSegmentObject.newBuilder();
-
-        reader.beginObject();
-        while (reader.hasNext()) {
-            switch (reader.nextName()) {
-                case TRACE_SEGMENT_ID:
-                    builder.setTraceSegmentId(uniqueIdJsonReader.read(reader));
-                    if (logger.isDebugEnabled()) {
-                        StringBuilder segmentId = new StringBuilder();
-                        builder.getTraceSegmentId().getIdPartsList().forEach(idPart -> segmentId.append(idPart));
-                        logger.debug("segment id: {}", segmentId);
-                    }
-                    break;
-                case APPLICATION_ID:
-                    builder.setApplicationId(reader.nextInt());
-                    break;
-                case APPLICATION_INSTANCE_ID:
-                    builder.setApplicationInstanceId(reader.nextInt());
-                    break;
-                case SPANS:
-                    reader.beginArray();
-                    while (reader.hasNext()) {
-                        builder.addSpans(spanJsonReader.read(reader));
-                    }
-                    reader.endArray();
-                    break;
-                default:
-                    reader.skipValue();
-                    break;
-            }
-        }
-        reader.endObject();
-
-        return builder;
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.collector.agent.jetty.provider.handler.reader;
+
+import com.google.gson.stream.JsonReader;
+import java.io.IOException;
+import org.apache.skywalking.apm.network.proto.TraceSegmentObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author peng-yongsheng
+ */
+public class SegmentJsonReader implements StreamJsonReader<TraceSegmentObject.Builder> {
+
+    private static final Logger logger = LoggerFactory.getLogger(SegmentJsonReader.class);
+
+    private UniqueIdJsonReader uniqueIdJsonReader = new UniqueIdJsonReader();
+    private SpanJsonReader spanJsonReader = new SpanJsonReader();
+
+    private static final String TRACE_SEGMENT_ID = "ts";
+    private static final String APPLICATION_ID = "ai";
+    private static final String APPLICATION_INSTANCE_ID = "ii";
+    private static final String SPANS = "ss";
+
+    @Override public TraceSegmentObject.Builder read(JsonReader reader) throws IOException {
+        TraceSegmentObject.Builder builder = TraceSegmentObject.newBuilder();
+
+        reader.beginObject();
+        while (reader.hasNext()) {
+            switch (reader.nextName()) {
+                case TRACE_SEGMENT_ID:
+                    builder.setTraceSegmentId(uniqueIdJsonReader.read(reader));
+                    if (logger.isDebugEnabled()) {
+                        StringBuilder segmentId = new StringBuilder();
+                        builder.getTraceSegmentId().getIdPartsList().forEach(idPart -> segmentId.append(idPart));
+                        logger.debug("segment id: {}", segmentId);
+                    }
+                    break;
+                case APPLICATION_ID:
+                    builder.setApplicationId(reader.nextInt());
+                    break;
+                case APPLICATION_INSTANCE_ID:
+                    builder.setApplicationInstanceId(reader.nextInt());
+                    break;
+                case SPANS:
+                    reader.beginArray();
+                    while (reader.hasNext()) {
+                        builder.addSpans(spanJsonReader.read(reader));
+                    }
+                    reader.endArray();
+                    break;
+                default:
+                    reader.skipValue();
+                    break;
+            }
+        }
+        reader.endObject();
+
+        return builder;
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/SpanJsonReader.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/SpanJsonReader.java
index 111ea1a72..92eb18e63 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/SpanJsonReader.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/SpanJsonReader.java
@@ -1,127 +1,127 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-
-package org.apache.skywalking.apm.collector.agent.jetty.provider.handler.reader;
-
-import com.google.gson.stream.JsonReader;
-import java.io.IOException;
-import org.apache.skywalking.apm.network.proto.SpanObject;
-
-/**
- * @author peng-yongsheng
- */
-public class SpanJsonReader implements StreamJsonReader<SpanObject> {
-
-    private KeyWithStringValueJsonReader keyWithStringValueJsonReader = new KeyWithStringValueJsonReader();
-    private LogJsonReader logJsonReader = new LogJsonReader();
-    private ReferenceJsonReader referenceJsonReader = new ReferenceJsonReader();
-
-    private static final String SPAN_ID = "si";
-    private static final String SPAN_TYPE_VALUE = "tv";
-    private static final String SPAN_LAYER_VALUE = "lv";
-    private static final String PARENT_SPAN_ID = "ps";
-    private static final String START_TIME = "st";
-    private static final String END_TIME = "et";
-    private static final String COMPONENT_ID = "ci";
-    private static final String COMPONENT_NAME = "cn";
-    private static final String OPERATION_NAME_ID = "oi";
-    private static final String OPERATION_NAME = "on";
-    private static final String PEER_ID = "pi";
-    private static final String PEER = "pn";
-    private static final String IS_ERROR = "ie";
-    private static final String TRACE_SEGMENT_REFERENCE = "rs";
-    private static final String TAGS = "to";
-    private static final String LOGS = "lo";
-
-    @Override public SpanObject read(JsonReader reader) throws IOException {
-        SpanObject.Builder builder = SpanObject.newBuilder();
-
-        reader.beginObject();
-        while (reader.hasNext()) {
-            switch (reader.nextName()) {
-                case SPAN_ID:
-                    builder.setSpanId(reader.nextInt());
-                    break;
-                case SPAN_TYPE_VALUE:
-                    builder.setSpanTypeValue(reader.nextInt());
-                    break;
-                case SPAN_LAYER_VALUE:
-                    builder.setSpanLayerValue(reader.nextInt());
-                    break;
-                case PARENT_SPAN_ID:
-                    builder.setParentSpanId(reader.nextInt());
-                    break;
-                case START_TIME:
-                    builder.setStartTime(reader.nextLong());
-                    break;
-                case END_TIME:
-                    builder.setEndTime(reader.nextLong());
-                    break;
-                case COMPONENT_ID:
-                    builder.setComponentId(reader.nextInt());
-                    break;
-                case COMPONENT_NAME:
-                    builder.setComponent(reader.nextString());
-                    break;
-                case OPERATION_NAME_ID:
-                    builder.setOperationNameId(reader.nextInt());
-                    break;
-                case OPERATION_NAME:
-                    builder.setOperationName(reader.nextString());
-                    break;
-                case PEER_ID:
-                    builder.setPeerId(reader.nextInt());
-                    break;
-                case PEER:
-                    builder.setPeer(reader.nextString());
-                    break;
-                case IS_ERROR:
-                    builder.setIsError(reader.nextBoolean());
-                    break;
-                case TRACE_SEGMENT_REFERENCE:
-                    reader.beginArray();
-                    while (reader.hasNext()) {
-                        builder.addRefs(referenceJsonReader.read(reader));
-                    }
-                    reader.endArray();
-                    break;
-                case TAGS:
-                    reader.beginArray();
-                    while (reader.hasNext()) {
-                        builder.addTags(keyWithStringValueJsonReader.read(reader));
-                    }
-                    reader.endArray();
-                    break;
-                case LOGS:
-                    reader.beginArray();
-                    while (reader.hasNext()) {
-                        builder.addLogs(logJsonReader.read(reader));
-                    }
-                    reader.endArray();
-                    break;
-                default:
-                    reader.skipValue();
-                    break;
-            }
-        }
-        reader.endObject();
-
-        return builder.build();
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+package org.apache.skywalking.apm.collector.agent.jetty.provider.handler.reader;
+
+import com.google.gson.stream.JsonReader;
+import java.io.IOException;
+import org.apache.skywalking.apm.network.proto.SpanObject;
+
+/**
+ * @author peng-yongsheng
+ */
+public class SpanJsonReader implements StreamJsonReader<SpanObject> {
+
+    private KeyWithStringValueJsonReader keyWithStringValueJsonReader = new KeyWithStringValueJsonReader();
+    private LogJsonReader logJsonReader = new LogJsonReader();
+    private ReferenceJsonReader referenceJsonReader = new ReferenceJsonReader();
+
+    private static final String SPAN_ID = "si";
+    private static final String SPAN_TYPE_VALUE = "tv";
+    private static final String SPAN_LAYER_VALUE = "lv";
+    private static final String PARENT_SPAN_ID = "ps";
+    private static final String START_TIME = "st";
+    private static final String END_TIME = "et";
+    private static final String COMPONENT_ID = "ci";
+    private static final String COMPONENT_NAME = "cn";
+    private static final String OPERATION_NAME_ID = "oi";
+    private static final String OPERATION_NAME = "on";
+    private static final String PEER_ID = "pi";
+    private static final String PEER = "pn";
+    private static final String IS_ERROR = "ie";
+    private static final String TRACE_SEGMENT_REFERENCE = "rs";
+    private static final String TAGS = "to";
+    private static final String LOGS = "lo";
+
+    @Override public SpanObject read(JsonReader reader) throws IOException {
+        SpanObject.Builder builder = SpanObject.newBuilder();
+
+        reader.beginObject();
+        while (reader.hasNext()) {
+            switch (reader.nextName()) {
+                case SPAN_ID:
+                    builder.setSpanId(reader.nextInt());
+                    break;
+                case SPAN_TYPE_VALUE:
+                    builder.setSpanTypeValue(reader.nextInt());
+                    break;
+                case SPAN_LAYER_VALUE:
+                    builder.setSpanLayerValue(reader.nextInt());
+                    break;
+                case PARENT_SPAN_ID:
+                    builder.setParentSpanId(reader.nextInt());
+                    break;
+                case START_TIME:
+                    builder.setStartTime(reader.nextLong());
+                    break;
+                case END_TIME:
+                    builder.setEndTime(reader.nextLong());
+                    break;
+                case COMPONENT_ID:
+                    builder.setComponentId(reader.nextInt());
+                    break;
+                case COMPONENT_NAME:
+                    builder.setComponent(reader.nextString());
+                    break;
+                case OPERATION_NAME_ID:
+                    builder.setOperationNameId(reader.nextInt());
+                    break;
+                case OPERATION_NAME:
+                    builder.setOperationName(reader.nextString());
+                    break;
+                case PEER_ID:
+                    builder.setPeerId(reader.nextInt());
+                    break;
+                case PEER:
+                    builder.setPeer(reader.nextString());
+                    break;
+                case IS_ERROR:
+                    builder.setIsError(reader.nextBoolean());
+                    break;
+                case TRACE_SEGMENT_REFERENCE:
+                    reader.beginArray();
+                    while (reader.hasNext()) {
+                        builder.addRefs(referenceJsonReader.read(reader));
+                    }
+                    reader.endArray();
+                    break;
+                case TAGS:
+                    reader.beginArray();
+                    while (reader.hasNext()) {
+                        builder.addTags(keyWithStringValueJsonReader.read(reader));
+                    }
+                    reader.endArray();
+                    break;
+                case LOGS:
+                    reader.beginArray();
+                    while (reader.hasNext()) {
+                        builder.addLogs(logJsonReader.read(reader));
+                    }
+                    reader.endArray();
+                    break;
+                default:
+                    reader.skipValue();
+                    break;
+            }
+        }
+        reader.endObject();
+
+        return builder.build();
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/StreamJsonReader.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/StreamJsonReader.java
index 0b757c4ce..822035a6e 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/StreamJsonReader.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/StreamJsonReader.java
@@ -1,30 +1,30 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-
-package org.apache.skywalking.apm.collector.agent.jetty.provider.handler.reader;
-
-import com.google.gson.stream.JsonReader;
-import java.io.IOException;
-
-/**
- * @author peng-yongsheng
- */
-public interface StreamJsonReader<T> {
-    T read(JsonReader reader) throws IOException;
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+package org.apache.skywalking.apm.collector.agent.jetty.provider.handler.reader;
+
+import com.google.gson.stream.JsonReader;
+import java.io.IOException;
+
+/**
+ * @author peng-yongsheng
+ */
+public interface StreamJsonReader<T> {
+    T read(JsonReader reader) throws IOException;
+}
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/TraceSegment.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/TraceSegment.java
index c53c4b642..0f8624a18 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/TraceSegment.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/TraceSegment.java
@@ -1,48 +1,48 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-
-package org.apache.skywalking.apm.collector.agent.jetty.provider.handler.reader;
-
-import org.apache.skywalking.apm.network.proto.TraceSegmentObject;
-import org.apache.skywalking.apm.network.proto.UniqueId;
-import org.apache.skywalking.apm.network.proto.UpstreamSegment;
-
-/**
- * @author peng-yongsheng
- */
-public class TraceSegment {
-
-    private UpstreamSegment.Builder builder;
-
-    public TraceSegment() {
-        builder = UpstreamSegment.newBuilder();
-    }
-
-    public void addGlobalTraceId(UniqueId.Builder globalTraceId) {
-        builder.addGlobalTraceIds(globalTraceId);
-    }
-
-    public void setTraceSegmentBuilder(TraceSegmentObject.Builder traceSegmentBuilder) {
-        builder.setSegment(traceSegmentBuilder.build().toByteString());
-    }
-
-    public UpstreamSegment getUpstreamSegment() {
-        return builder.build();
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+package org.apache.skywalking.apm.collector.agent.jetty.provider.handler.reader;
+
+import org.apache.skywalking.apm.network.proto.TraceSegmentObject;
+import org.apache.skywalking.apm.network.proto.UniqueId;
+import org.apache.skywalking.apm.network.proto.UpstreamSegment;
+
+/**
+ * @author peng-yongsheng
+ */
+public class TraceSegment {
+
+    private UpstreamSegment.Builder builder;
+
+    public TraceSegment() {
+        builder = UpstreamSegment.newBuilder();
+    }
+
+    public void addGlobalTraceId(UniqueId.Builder globalTraceId) {
+        builder.addGlobalTraceIds(globalTraceId);
+    }
+
+    public void setTraceSegmentBuilder(TraceSegmentObject.Builder traceSegmentBuilder) {
+        builder.setSegment(traceSegmentBuilder.build().toByteString());
+    }
+
+    public UpstreamSegment getUpstreamSegment() {
+        return builder.build();
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/TraceSegmentJsonReader.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/TraceSegmentJsonReader.java
index c2a64c142..312f63498 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/TraceSegmentJsonReader.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/TraceSegmentJsonReader.java
@@ -1,65 +1,65 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.agent.jetty.provider.handler.reader;
-
-import com.google.gson.stream.JsonReader;
-import java.io.IOException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author peng-yongsheng
- */
-public class TraceSegmentJsonReader implements StreamJsonReader<TraceSegment> {
-
-    private static final Logger logger = LoggerFactory.getLogger(TraceSegmentJsonReader.class);
-
-    private UniqueIdJsonReader uniqueIdJsonReader = new UniqueIdJsonReader();
-    private SegmentJsonReader segmentJsonReader = new SegmentJsonReader();
-
-    private static final String GLOBAL_TRACE_IDS = "gt";
-    private static final String SEGMENT = "sg";
-
-    @Override public TraceSegment read(JsonReader reader) throws IOException {
-        TraceSegment traceSegment = new TraceSegment();
-
-        reader.beginObject();
-        while (reader.hasNext()) {
-            switch (reader.nextName()) {
-                case GLOBAL_TRACE_IDS:
-                    reader.beginArray();
-                    while (reader.hasNext()) {
-                        traceSegment.addGlobalTraceId(uniqueIdJsonReader.read(reader));
-                    }
-                    reader.endArray();
-
-                    break;
-                case SEGMENT:
-                    traceSegment.setTraceSegmentBuilder(segmentJsonReader.read(reader));
-                    break;
-                default:
-                    reader.skipValue();
-                    break;
-            }
-        }
-        reader.endObject();
-
-        return traceSegment;
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.collector.agent.jetty.provider.handler.reader;
+
+import com.google.gson.stream.JsonReader;
+import java.io.IOException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author peng-yongsheng
+ */
+public class TraceSegmentJsonReader implements StreamJsonReader<TraceSegment> {
+
+    private static final Logger logger = LoggerFactory.getLogger(TraceSegmentJsonReader.class);
+
+    private UniqueIdJsonReader uniqueIdJsonReader = new UniqueIdJsonReader();
+    private SegmentJsonReader segmentJsonReader = new SegmentJsonReader();
+
+    private static final String GLOBAL_TRACE_IDS = "gt";
+    private static final String SEGMENT = "sg";
+
+    @Override public TraceSegment read(JsonReader reader) throws IOException {
+        TraceSegment traceSegment = new TraceSegment();
+
+        reader.beginObject();
+        while (reader.hasNext()) {
+            switch (reader.nextName()) {
+                case GLOBAL_TRACE_IDS:
+                    reader.beginArray();
+                    while (reader.hasNext()) {
+                        traceSegment.addGlobalTraceId(uniqueIdJsonReader.read(reader));
+                    }
+                    reader.endArray();
+
+                    break;
+                case SEGMENT:
+                    traceSegment.setTraceSegmentBuilder(segmentJsonReader.read(reader));
+                    break;
+                default:
+                    reader.skipValue();
+                    break;
+            }
+        }
+        reader.endObject();
+
+        return traceSegment;
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/UniqueIdJsonReader.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/UniqueIdJsonReader.java
index 54d0c32dc..c715ddf44 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/UniqueIdJsonReader.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/UniqueIdJsonReader.java
@@ -1,41 +1,41 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-
-package org.apache.skywalking.apm.collector.agent.jetty.provider.handler.reader;
-
-import com.google.gson.stream.JsonReader;
-import java.io.IOException;
-import org.apache.skywalking.apm.network.proto.UniqueId;
-
-/**
- * @author peng-yongsheng
- */
-public class UniqueIdJsonReader implements StreamJsonReader<UniqueId.Builder> {
-
-    @Override public UniqueId.Builder read(JsonReader reader) throws IOException {
-        UniqueId.Builder builder = UniqueId.newBuilder();
-
-        reader.beginArray();
-        while (reader.hasNext()) {
-            builder.addIdParts(reader.nextLong());
-        }
-        reader.endArray();
-        return builder;
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+package org.apache.skywalking.apm.collector.agent.jetty.provider.handler.reader;
+
+import com.google.gson.stream.JsonReader;
+import java.io.IOException;
+import org.apache.skywalking.apm.network.proto.UniqueId;
+
+/**
+ * @author peng-yongsheng
+ */
+public class UniqueIdJsonReader implements StreamJsonReader<UniqueId.Builder> {
+
+    @Override public UniqueId.Builder read(JsonReader reader) throws IOException {
+        UniqueId.Builder builder = UniqueId.newBuilder();
+
+        reader.beginArray();
+        while (reader.hasNext()) {
+            builder.addIdParts(reader.nextLong());
+        }
+        reader.endArray();
+        return builder;
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/resources/META-INF/services/org.apache.skywalking.apm.collector.core.module.ModuleProvider b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/resources/META-INF/services/org.apache.skywalking.apm.collector.core.module.ModuleProvider
index d481e10a6..80696575c 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/resources/META-INF/services/org.apache.skywalking.apm.collector.core.module.ModuleProvider
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/main/resources/META-INF/services/org.apache.skywalking.apm.collector.core.module.ModuleProvider
@@ -1,19 +1,19 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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.
-#
-#
-
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+#
+#
+
 org.apache.skywalking.apm.collector.agent.jetty.provider.AgentModuleJettyProvider
\ No newline at end of file
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/DelegatingServletInputStream.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/DelegatingServletInputStream.java
index c88b1613f..03e4220e8 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/DelegatingServletInputStream.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/DelegatingServletInputStream.java
@@ -1,75 +1,75 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.skywalking.apm.collector;
-
-import org.junit.Assert;
-
-import javax.servlet.ReadListener;
-import javax.servlet.ServletInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * @author lican
- */
-public class DelegatingServletInputStream extends ServletInputStream {
-
-    private final InputStream sourceStream;
-
-
-    /**
-     * Create a DelegatingServletInputStream for the given source stream.
-     * @param sourceStream the source stream (never <code>null</code>)
-     */
-    public DelegatingServletInputStream(InputStream sourceStream) {
-        Assert.assertNotNull("Source InputStream must not be null",sourceStream);
-        this.sourceStream = sourceStream;
-    }
-
-    /**
-     * Return the underlying source stream (never <code>null</code>).
-     */
-    public final InputStream getSourceStream() {
-        return this.sourceStream;
-    }
-
-
-    public int read() throws IOException {
-        return this.sourceStream.read();
-    }
-
-    public void close() throws IOException {
-        super.close();
-        this.sourceStream.close();
-    }
-
-    @Override
-    public boolean isFinished() {
-        return false;
-    }
-
-    @Override
-    public boolean isReady() {
-        return false;
-    }
-
-    @Override
-    public void setReadListener(ReadListener readListener) {
-
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.skywalking.apm.collector;
+
+import org.junit.Assert;
+
+import javax.servlet.ReadListener;
+import javax.servlet.ServletInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * @author lican
+ */
+public class DelegatingServletInputStream extends ServletInputStream {
+
+    private final InputStream sourceStream;
+
+
+    /**
+     * Create a DelegatingServletInputStream for the given source stream.
+     * @param sourceStream the source stream (never <code>null</code>)
+     */
+    public DelegatingServletInputStream(InputStream sourceStream) {
+        Assert.assertNotNull("Source InputStream must not be null",sourceStream);
+        this.sourceStream = sourceStream;
+    }
+
+    /**
+     * Return the underlying source stream (never <code>null</code>).
+     */
+    public final InputStream getSourceStream() {
+        return this.sourceStream;
+    }
+
+
+    public int read() throws IOException {
+        return this.sourceStream.read();
+    }
+
+    public void close() throws IOException {
+        super.close();
+        this.sourceStream.close();
+    }
+
+    @Override
+    public boolean isFinished() {
+        return false;
+    }
+
+    @Override
+    public boolean isReady() {
+        return false;
+    }
+
+    @Override
+    public void setReadListener(ReadListener readListener) {
+
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/AgentModuleJettyProviderTest.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/AgentModuleJettyProviderTest.java
index f09acca70..c24aba133 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/AgentModuleJettyProviderTest.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/AgentModuleJettyProviderTest.java
@@ -1,92 +1,92 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.skywalking.apm.collector.agent.jetty.provider;
-
-import org.apache.skywalking.apm.collector.agent.jetty.define.AgentJettyModule;
-import org.apache.skywalking.apm.collector.core.module.MockModule;
-import org.apache.skywalking.apm.collector.core.module.ModuleManager;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.internal.util.reflection.Whitebox;
-import org.mockito.runners.MockitoJUnitRunner;
-
-import static org.junit.Assert.*;
-import static org.mockito.Matchers.anyString;
-import static org.powermock.api.mockito.PowerMockito.when;
-
-/**
- * @author lican
- */
-@RunWith(MockitoJUnitRunner.class)
-public class AgentModuleJettyProviderTest {
-
-
-    @Mock
-    private ModuleManager moduleManager;
-
-    @Mock
-    private AgentModuleJettyConfig config;
-
-    private AgentModuleJettyProvider provider;
-
-    @Before
-    public void setUp() throws Exception {
-        when(moduleManager.find(anyString())).then(invocation -> new MockModule());
-        provider = new AgentModuleJettyProvider();
-        Whitebox.setInternalState(provider, "manager", moduleManager);
-        Whitebox.setInternalState(provider, "config", config);
-
-    }
-
-    @Test
-    public void name() {
-        assertEquals(provider.name(), "jetty");
-    }
-
-    @Test
-    public void module() {
-        assertEquals(provider.module(), AgentJettyModule.class);
-    }
-
-    @Test
-    public void createConfigBeanIfAbsent() {
-        assertEquals(provider.createConfigBeanIfAbsent(), config);
-    }
-
-    @Test
-    public void prepare() {
-        provider.prepare();
-    }
-
-    @Test
-    public void start() {
-        provider.start();
-    }
-
-    @Test
-    public void notifyAfterCompleted() {
-        provider.notifyAfterCompleted();
-    }
-
-    @Test
-    public void requiredModules() {
-        assertTrue(provider.requiredModules().length > 0);
-    }
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.skywalking.apm.collector.agent.jetty.provider;
+
+import org.apache.skywalking.apm.collector.agent.jetty.define.AgentJettyModule;
+import org.apache.skywalking.apm.collector.core.module.MockModule;
+import org.apache.skywalking.apm.collector.core.module.ModuleManager;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.internal.util.reflection.Whitebox;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import static org.junit.Assert.*;
+import static org.mockito.Matchers.anyString;
+import static org.powermock.api.mockito.PowerMockito.when;
+
+/**
+ * @author lican
+ */
+@RunWith(MockitoJUnitRunner.class)
+public class AgentModuleJettyProviderTest {
+
+
+    @Mock
+    private ModuleManager moduleManager;
+
+    @Mock
+    private AgentModuleJettyConfig config;
+
+    private AgentModuleJettyProvider provider;
+
+    @Before
+    public void setUp() throws Exception {
+        when(moduleManager.find(anyString())).then(invocation -> new MockModule());
+        provider = new AgentModuleJettyProvider();
+        Whitebox.setInternalState(provider, "manager", moduleManager);
+        Whitebox.setInternalState(provider, "config", config);
+
+    }
+
+    @Test
+    public void name() {
+        assertEquals(provider.name(), "jetty");
+    }
+
+    @Test
+    public void module() {
+        assertEquals(provider.module(), AgentJettyModule.class);
+    }
+
+    @Test
+    public void createConfigBeanIfAbsent() {
+        assertEquals(provider.createConfigBeanIfAbsent(), config);
+    }
+
+    @Test
+    public void prepare() {
+        provider.prepare();
+    }
+
+    @Test
+    public void start() {
+        provider.start();
+    }
+
+    @Test
+    public void notifyAfterCompleted() {
+        provider.notifyAfterCompleted();
+    }
+
+    @Test
+    public void requiredModules() {
+        assertTrue(provider.requiredModules().length > 0);
+    }
 }
\ No newline at end of file
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/AgentModuleJettyRegistrationTest.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/AgentModuleJettyRegistrationTest.java
index 1524eca9c..1cf707da3 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/AgentModuleJettyRegistrationTest.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/AgentModuleJettyRegistrationTest.java
@@ -1,48 +1,48 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.skywalking.apm.collector.agent.jetty.provider;
-
-import org.apache.skywalking.apm.collector.cluster.ModuleRegistration;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.runners.MockitoJUnitRunner;
-
-import static org.junit.Assert.*;
-
-/**
- * @author lican
- */
-@RunWith(MockitoJUnitRunner.class)
-public class AgentModuleJettyRegistrationTest {
-
-    private AgentModuleJettyRegistration registration;
-
-    @Before
-    public void setUp() throws Exception {
-        registration = new AgentModuleJettyRegistration("127.0.0.1", 8080, "/");
-    }
-
-    @Test
-    public void buildValue() {
-        ModuleRegistration.Value value = registration.buildValue();
-        Assert.assertEquals(value.getHostPort(), "127.0.0.1:8080");
-        assertEquals(value.getContextPath(), "/");
-    }
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.skywalking.apm.collector.agent.jetty.provider;
+
+import org.apache.skywalking.apm.collector.cluster.ModuleRegistration;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import static org.junit.Assert.*;
+
+/**
+ * @author lican
+ */
+@RunWith(MockitoJUnitRunner.class)
+public class AgentModuleJettyRegistrationTest {
+
+    private AgentModuleJettyRegistration registration;
+
+    @Before
+    public void setUp() throws Exception {
+        registration = new AgentModuleJettyRegistration("127.0.0.1", 8080, "/");
+    }
+
+    @Test
+    public void buildValue() {
+        ModuleRegistration.Value value = registration.buildValue();
+        Assert.assertEquals(value.getHostPort(), "127.0.0.1:8080");
+        assertEquals(value.getContextPath(), "/");
+    }
 }
\ No newline at end of file
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/ApplicationRegisterPost.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/ApplicationRegisterPost.java
index fa31599f0..c16f30103 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/ApplicationRegisterPost.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/ApplicationRegisterPost.java
@@ -1,33 +1,33 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.agent.jetty.provider;
-
-import com.google.gson.JsonElement;
-import java.io.IOException;
-
-/**
- * @author peng-yongsheng
- */
-public class ApplicationRegisterPost {
-
-    public void send(String jsonFile) throws IOException {
-        JsonElement application = JsonFileReader.INSTANCE.read(jsonFile);
-        HttpClientTools.INSTANCE.post("http://localhost:12800/application/register", application.toString());
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.collector.agent.jetty.provider;
+
+import com.google.gson.JsonElement;
+import java.io.IOException;
+
+/**
+ * @author peng-yongsheng
+ */
+public class ApplicationRegisterPost {
+
+    public void send(String jsonFile) throws IOException {
+        JsonElement application = JsonFileReader.INSTANCE.read(jsonFile);
+        HttpClientTools.INSTANCE.post("http://localhost:12800/application/register", application.toString());
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/HttpClientTools.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/HttpClientTools.java
index 5d96d57ee..b00bd6fe3 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/HttpClientTools.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/HttpClientTools.java
@@ -1,95 +1,95 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.agent.jetty.provider;
-
-import java.io.IOException;
-import java.net.URI;
-import java.util.List;
-import org.apache.http.Consts;
-import org.apache.http.HttpEntity;
-import org.apache.http.NameValuePair;
-import org.apache.http.client.entity.UrlEncodedFormEntity;
-import org.apache.http.client.methods.CloseableHttpResponse;
-import org.apache.http.client.methods.HttpGet;
-import org.apache.http.client.methods.HttpPost;
-import org.apache.http.entity.StringEntity;
-import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.impl.client.HttpClients;
-import org.apache.http.util.EntityUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author peng-yongsheng
- */
-public enum HttpClientTools {
-    INSTANCE;
-
-    private static final Logger logger = LoggerFactory.getLogger(HttpClientTools.class);
-
-    public String get(String url, List<NameValuePair> params) throws IOException {
-        CloseableHttpClient httpClient = HttpClients.createDefault();
-        try {
-            HttpGet httpget = new HttpGet(url);
-            String paramStr = EntityUtils.toString(new UrlEncodedFormEntity(params));
-            httpget.setURI(new URI(httpget.getURI().toString() + "?" + paramStr));
-            logger.debug("executing get request {}", httpget.getURI());
-
-            try (CloseableHttpResponse response = httpClient.execute(httpget)) {
-                HttpEntity entity = response.getEntity();
-                if (entity != null) {
-                    return EntityUtils.toString(entity);
-                }
-            }
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-        } finally {
-            try {
-                httpClient.close();
-            } catch (IOException e) {
-                logger.error(e.getMessage(), e);
-            }
-        }
-        return null;
-    }
-
-    public String post(String url, String data) throws IOException {
-        CloseableHttpClient httpClient = HttpClients.createDefault();
-        try {
-            HttpPost httppost = new HttpPost(url);
-            httppost.setEntity(new StringEntity(data, Consts.UTF_8));
-            logger.debug("executing post request {}", httppost.getURI());
-            try (CloseableHttpResponse response = httpClient.execute(httppost)) {
-                HttpEntity entity = response.getEntity();
-                if (entity != null) {
-                    return EntityUtils.toString(entity);
-                }
-            }
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-        } finally {
-            try {
-                httpClient.close();
-            } catch (Exception e) {
-                logger.error(e.getMessage(), e);
-            }
-        }
-        return null;
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.collector.agent.jetty.provider;
+
+import java.io.IOException;
+import java.net.URI;
+import java.util.List;
+import org.apache.http.Consts;
+import org.apache.http.HttpEntity;
+import org.apache.http.NameValuePair;
+import org.apache.http.client.entity.UrlEncodedFormEntity;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.util.EntityUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author peng-yongsheng
+ */
+public enum HttpClientTools {
+    INSTANCE;
+
+    private static final Logger logger = LoggerFactory.getLogger(HttpClientTools.class);
+
+    public String get(String url, List<NameValuePair> params) throws IOException {
+        CloseableHttpClient httpClient = HttpClients.createDefault();
+        try {
+            HttpGet httpget = new HttpGet(url);
+            String paramStr = EntityUtils.toString(new UrlEncodedFormEntity(params));
+            httpget.setURI(new URI(httpget.getURI().toString() + "?" + paramStr));
+            logger.debug("executing get request {}", httpget.getURI());
+
+            try (CloseableHttpResponse response = httpClient.execute(httpget)) {
+                HttpEntity entity = response.getEntity();
+                if (entity != null) {
+                    return EntityUtils.toString(entity);
+                }
+            }
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+        } finally {
+            try {
+                httpClient.close();
+            } catch (IOException e) {
+                logger.error(e.getMessage(), e);
+            }
+        }
+        return null;
+    }
+
+    public String post(String url, String data) throws IOException {
+        CloseableHttpClient httpClient = HttpClients.createDefault();
+        try {
+            HttpPost httppost = new HttpPost(url);
+            httppost.setEntity(new StringEntity(data, Consts.UTF_8));
+            logger.debug("executing post request {}", httppost.getURI());
+            try (CloseableHttpResponse response = httpClient.execute(httppost)) {
+                HttpEntity entity = response.getEntity();
+                if (entity != null) {
+                    return EntityUtils.toString(entity);
+                }
+            }
+        } catch (Exception e) {
+            logger.error(e.getMessage(), e);
+        } finally {
+            try {
+                httpClient.close();
+            } catch (Exception e) {
+                logger.error(e.getMessage(), e);
+            }
+        }
+        return null;
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/InstanceRegisterPost.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/InstanceRegisterPost.java
index 97cfb1278..3fa85e063 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/InstanceRegisterPost.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/InstanceRegisterPost.java
@@ -1,33 +1,33 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.agent.jetty.provider;
-
-import com.google.gson.JsonElement;
-import java.io.IOException;
-
-/**
- * @author peng-yongsheng
- */
-public class InstanceRegisterPost {
-
-    public void send(String jsonFile) throws IOException {
-        JsonElement instance = JsonFileReader.INSTANCE.read(jsonFile);
-        HttpClientTools.INSTANCE.post("http://localhost:12800/instance/register", instance.toString());
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.collector.agent.jetty.provider;
+
+import com.google.gson.JsonElement;
+import java.io.IOException;
+
+/**
+ * @author peng-yongsheng
+ */
+public class InstanceRegisterPost {
+
+    public void send(String jsonFile) throws IOException {
+        JsonElement instance = JsonFileReader.INSTANCE.read(jsonFile);
+        HttpClientTools.INSTANCE.post("http://localhost:12800/instance/register", instance.toString());
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/JsonFileReader.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/JsonFileReader.java
index cf48637b8..0fc8bd45f 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/JsonFileReader.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/JsonFileReader.java
@@ -1,42 +1,42 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.agent.jetty.provider;
-
-import com.google.gson.JsonElement;
-import com.google.gson.JsonParser;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author peng-yongsheng
- */
-public enum JsonFileReader {
-    INSTANCE;
-
-    private final Logger logger = LoggerFactory.getLogger(JsonFileReader.class);
-
-    public JsonElement read(String fileName) throws FileNotFoundException {
-        String path = this.getClass().getClassLoader().getResource(fileName).getFile();
-        logger.debug("path: {}", path);
-        JsonParser jsonParser = new JsonParser();
-        return jsonParser.parse(new FileReader(path));
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.collector.agent.jetty.provider;
+
+import com.google.gson.JsonElement;
+import com.google.gson.JsonParser;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author peng-yongsheng
+ */
+public enum JsonFileReader {
+    INSTANCE;
+
+    private final Logger logger = LoggerFactory.getLogger(JsonFileReader.class);
+
+    public JsonElement read(String fileName) throws FileNotFoundException {
+        String path = this.getClass().getClassLoader().getResource(fileName).getFile();
+        logger.debug("path: {}", path);
+        JsonParser jsonParser = new JsonParser();
+        return jsonParser.parse(new FileReader(path));
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/SegmentPost.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/SegmentPost.java
index 6f6a108be..2973f82b3 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/SegmentPost.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/SegmentPost.java
@@ -1,50 +1,50 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.agent.jetty.provider;
-
-import com.google.gson.JsonElement;
-import java.io.IOException;
-
-/**
- * @author peng-yongsheng
- */
-public class SegmentPost {
-
-    public static void main(String[] args) throws IOException {
-        ApplicationRegisterPost applicationRegisterPost = new ApplicationRegisterPost();
-        applicationRegisterPost.send("json/application-register-consumer.json");
-        applicationRegisterPost.send("json/application-register-provider.json");
-
-        InstanceRegisterPost instanceRegisterPost = new InstanceRegisterPost();
-        instanceRegisterPost.send("json/instance-register-consumer.json");
-        instanceRegisterPost.send("json/instance-register-provider.json");
-
-        ServiceNameRegisterPost serviceNameRegisterPost = new ServiceNameRegisterPost();
-        serviceNameRegisterPost.send("json/servicename-register-consumer.json");
-        serviceNameRegisterPost.send("json/servicename-register-provider.json");
-
-        JsonElement provider = JsonFileReader.INSTANCE.read("json/dubbox-provider.json");
-        JsonElement consumer = JsonFileReader.INSTANCE.read("json/dubbox-consumer.json");
-
-        for (int i = 0; i < 1; i++) {
-            HttpClientTools.INSTANCE.post("http://localhost:12800/segments", provider.toString());
-            HttpClientTools.INSTANCE.post("http://localhost:12800/segments", consumer.toString());
-        }
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.collector.agent.jetty.provider;
+
+import com.google.gson.JsonElement;
+import java.io.IOException;
+
+/**
+ * @author peng-yongsheng
+ */
+public class SegmentPost {
+
+    public static void main(String[] args) throws IOException {
+        ApplicationRegisterPost applicationRegisterPost = new ApplicationRegisterPost();
+        applicationRegisterPost.send("json/application-register-consumer.json");
+        applicationRegisterPost.send("json/application-register-provider.json");
+
+        InstanceRegisterPost instanceRegisterPost = new InstanceRegisterPost();
+        instanceRegisterPost.send("json/instance-register-consumer.json");
+        instanceRegisterPost.send("json/instance-register-provider.json");
+
+        ServiceNameRegisterPost serviceNameRegisterPost = new ServiceNameRegisterPost();
+        serviceNameRegisterPost.send("json/servicename-register-consumer.json");
+        serviceNameRegisterPost.send("json/servicename-register-provider.json");
+
+        JsonElement provider = JsonFileReader.INSTANCE.read("json/dubbox-provider.json");
+        JsonElement consumer = JsonFileReader.INSTANCE.read("json/dubbox-consumer.json");
+
+        for (int i = 0; i < 1; i++) {
+            HttpClientTools.INSTANCE.post("http://localhost:12800/segments", provider.toString());
+            HttpClientTools.INSTANCE.post("http://localhost:12800/segments", consumer.toString());
+        }
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/ServiceNameRegisterPost.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/ServiceNameRegisterPost.java
index af40d62be..0eca5ac70 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/ServiceNameRegisterPost.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/ServiceNameRegisterPost.java
@@ -1,33 +1,33 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.agent.jetty.provider;
-
-import com.google.gson.JsonElement;
-import java.io.IOException;
-
-/**
- * @author peng-yongsheng
- */
-public class ServiceNameRegisterPost {
-
-    public void send(String jsonFile) throws IOException {
-        JsonElement instance = JsonFileReader.INSTANCE.read(jsonFile);
-        HttpClientTools.INSTANCE.post("http://localhost:12800/servicename/discovery", instance.toString());
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.collector.agent.jetty.provider;
+
+import com.google.gson.JsonElement;
+import java.io.IOException;
+
+/**
+ * @author peng-yongsheng
+ */
+public class ServiceNameRegisterPost {
+
+    public void send(String jsonFile) throws IOException {
+        JsonElement instance = JsonFileReader.INSTANCE.read(jsonFile);
+        HttpClientTools.INSTANCE.post("http://localhost:12800/servicename/discovery", instance.toString());
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/ApplicationRegisterServletHandlerTest.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/ApplicationRegisterServletHandlerTest.java
index 423e01a8f..e625bb17e 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/ApplicationRegisterServletHandlerTest.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/ApplicationRegisterServletHandlerTest.java
@@ -1,90 +1,90 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.skywalking.apm.collector.agent.jetty.provider.handler;
-
-import com.google.gson.Gson;
-import com.google.gson.JsonArray;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonObject;
-import org.apache.skywalking.apm.collector.DelegatingServletInputStream;
-import org.apache.skywalking.apm.collector.core.module.MockModule;
-import org.apache.skywalking.apm.collector.core.module.ModuleManager;
-import org.apache.skywalking.apm.collector.server.jetty.ArgumentsParseException;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.Mockito;
-import org.mockito.runners.MockitoJUnitRunner;
-
-import javax.servlet.http.HttpServletRequest;
-import java.io.BufferedReader;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-
-import static org.junit.Assert.assertEquals;
-import static org.mockito.Matchers.anyString;
-import static org.powermock.api.mockito.PowerMockito.when;
-
-/**
- * @author lican
- */
-@RunWith(MockitoJUnitRunner.class)
-public class ApplicationRegisterServletHandlerTest {
-
-    private ApplicationRegisterServletHandler applicationRegisterServletHandler;
-
-    @Mock
-    private ModuleManager moduleManager;
-    @Mock
-    private HttpServletRequest request;
-
-    private Gson gson = new Gson();
-
-    @Before
-    public void setUp() throws Exception {
-        when(moduleManager.find(anyString())).then(invocation -> new MockModule());
-        applicationRegisterServletHandler = new ApplicationRegisterServletHandler(moduleManager);
-    }
-
-    @Test
-    public void pathSpec() {
-        assertEquals(applicationRegisterServletHandler.pathSpec(), "/application/register");
-    }
-
-    @Test(expected = UnsupportedOperationException.class)
-    public void doGet() throws ArgumentsParseException {
-        applicationRegisterServletHandler.doGet(request);
-    }
-
-    @Test
-    public void doPost() throws ArgumentsParseException, IOException {
-        JsonArray array = new JsonArray();
-        array.add("test_code");
-        String s = gson.toJson(array);
-        Mockito.when(request.getReader()).then(invocation -> {
-            DelegatingServletInputStream delegatingServletInputStream = new DelegatingServletInputStream(new ByteArrayInputStream(s.getBytes()));
-            return new BufferedReader(new InputStreamReader(delegatingServletInputStream));
-        });
-        JsonElement jsonElement = applicationRegisterServletHandler.doPost(request);
-        JsonObject jsonObject = (JsonObject) ((JsonArray) jsonElement).get(0);
-        assertEquals(jsonObject.get("c").getAsString(), "test_code");
-        assertEquals(jsonObject.get("i").getAsInt(), 0);
-    }
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.skywalking.apm.collector.agent.jetty.provider.handler;
+
+import com.google.gson.Gson;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import org.apache.skywalking.apm.collector.DelegatingServletInputStream;
+import org.apache.skywalking.apm.collector.core.module.MockModule;
+import org.apache.skywalking.apm.collector.core.module.ModuleManager;
+import org.apache.skywalking.apm.collector.server.jetty.ArgumentsParseException;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import javax.servlet.http.HttpServletRequest;
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Matchers.anyString;
+import static org.powermock.api.mockito.PowerMockito.when;
+
+/**
+ * @author lican
+ */
+@RunWith(MockitoJUnitRunner.class)
+public class ApplicationRegisterServletHandlerTest {
+
+    private ApplicationRegisterServletHandler applicationRegisterServletHandler;
+
+    @Mock
+    private ModuleManager moduleManager;
+    @Mock
+    private HttpServletRequest request;
+
+    private Gson gson = new Gson();
+
+    @Before
+    public void setUp() throws Exception {
+        when(moduleManager.find(anyString())).then(invocation -> new MockModule());
+        applicationRegisterServletHandler = new ApplicationRegisterServletHandler(moduleManager);
+    }
+
+    @Test
+    public void pathSpec() {
+        assertEquals(applicationRegisterServletHandler.pathSpec(), "/application/register");
+    }
+
+    @Test(expected = UnsupportedOperationException.class)
+    public void doGet() throws ArgumentsParseException {
+        applicationRegisterServletHandler.doGet(request);
+    }
+
+    @Test
+    public void doPost() throws ArgumentsParseException, IOException {
+        JsonArray array = new JsonArray();
+        array.add("test_code");
+        String s = gson.toJson(array);
+        Mockito.when(request.getReader()).then(invocation -> {
+            DelegatingServletInputStream delegatingServletInputStream = new DelegatingServletInputStream(new ByteArrayInputStream(s.getBytes()));
+            return new BufferedReader(new InputStreamReader(delegatingServletInputStream));
+        });
+        JsonElement jsonElement = applicationRegisterServletHandler.doPost(request);
+        JsonObject jsonObject = (JsonObject) ((JsonArray) jsonElement).get(0);
+        assertEquals(jsonObject.get("c").getAsString(), "test_code");
+        assertEquals(jsonObject.get("i").getAsInt(), 0);
+    }
 }
\ No newline at end of file
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/InstanceDiscoveryServletHandlerTest.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/InstanceDiscoveryServletHandlerTest.java
index f23d13305..9ab10e827 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/InstanceDiscoveryServletHandlerTest.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/InstanceDiscoveryServletHandlerTest.java
@@ -1,94 +1,94 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.skywalking.apm.collector.agent.jetty.provider.handler;
-
-import com.google.gson.Gson;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonObject;
-import org.apache.skywalking.apm.collector.DelegatingServletInputStream;
-import org.apache.skywalking.apm.collector.core.module.MockModule;
-import org.apache.skywalking.apm.collector.core.module.ModuleManager;
-import org.apache.skywalking.apm.collector.server.jetty.ArgumentsParseException;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.Mockito;
-import org.mockito.runners.MockitoJUnitRunner;
-
-import javax.servlet.http.HttpServletRequest;
-import java.io.BufferedReader;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-
-import static org.junit.Assert.assertEquals;
-import static org.mockito.Matchers.anyString;
-import static org.powermock.api.mockito.PowerMockito.when;
-
-/**
- * @author lican
- */
-@RunWith(MockitoJUnitRunner.class)
-public class InstanceDiscoveryServletHandlerTest {
-
-    @Mock
-    private ModuleManager moduleManager;
-    @Mock
-    private HttpServletRequest request;
-
-    private Gson gson = new Gson();
-
-    private InstanceDiscoveryServletHandler instanceDiscoveryServletHandler;
-
-    @Before
-    public void setUp() throws Exception {
-        when(moduleManager.find(anyString())).then(invocation -> new MockModule());
-        instanceDiscoveryServletHandler = new InstanceDiscoveryServletHandler(moduleManager);
-
-    }
-
-    @Test
-    public void pathSpec() {
-        assertEquals(instanceDiscoveryServletHandler.pathSpec(), "/instance/register");
-    }
-
-    @Test(expected = UnsupportedOperationException.class)
-    public void doGet() throws ArgumentsParseException {
-        instanceDiscoveryServletHandler.doGet(request);
-    }
-
-    @Test
-    public void doPost() throws ArgumentsParseException, IOException {
-        JsonObject jsonObject = new JsonObject();
-        jsonObject.addProperty("ai", 1);
-        jsonObject.addProperty("au", "123");
-        jsonObject.addProperty("rt", System.currentTimeMillis());
-        JsonObject osInfo = new JsonObject();
-        osInfo.addProperty("osName", "test");
-        jsonObject.add("oi", osInfo);
-        String s = gson.toJson(jsonObject);
-        Mockito.when(request.getReader()).then(invocation -> {
-            DelegatingServletInputStream delegatingServletInputStream = new DelegatingServletInputStream(new ByteArrayInputStream(s.getBytes()));
-            return new BufferedReader(new InputStreamReader(delegatingServletInputStream));
-        });
-        JsonElement jsonElement = instanceDiscoveryServletHandler.doPost(request);
-        int ii = ((JsonObject) jsonElement).get("ii").getAsInt();
-        assertEquals(ii, 0);
-    }
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.skywalking.apm.collector.agent.jetty.provider.handler;
+
+import com.google.gson.Gson;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import org.apache.skywalking.apm.collector.DelegatingServletInputStream;
+import org.apache.skywalking.apm.collector.core.module.MockModule;
+import org.apache.skywalking.apm.collector.core.module.ModuleManager;
+import org.apache.skywalking.apm.collector.server.jetty.ArgumentsParseException;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import javax.servlet.http.HttpServletRequest;
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Matchers.anyString;
+import static org.powermock.api.mockito.PowerMockito.when;
+
+/**
+ * @author lican
+ */
+@RunWith(MockitoJUnitRunner.class)
+public class InstanceDiscoveryServletHandlerTest {
+
+    @Mock
+    private ModuleManager moduleManager;
+    @Mock
+    private HttpServletRequest request;
+
+    private Gson gson = new Gson();
+
+    private InstanceDiscoveryServletHandler instanceDiscoveryServletHandler;
+
+    @Before
+    public void setUp() throws Exception {
+        when(moduleManager.find(anyString())).then(invocation -> new MockModule());
+        instanceDiscoveryServletHandler = new InstanceDiscoveryServletHandler(moduleManager);
+
+    }
+
+    @Test
+    public void pathSpec() {
+        assertEquals(instanceDiscoveryServletHandler.pathSpec(), "/instance/register");
+    }
+
+    @Test(expected = UnsupportedOperationException.class)
+    public void doGet() throws ArgumentsParseException {
+        instanceDiscoveryServletHandler.doGet(request);
+    }
+
+    @Test
+    public void doPost() throws ArgumentsParseException, IOException {
+        JsonObject jsonObject = new JsonObject();
+        jsonObject.addProperty("ai", 1);
+        jsonObject.addProperty("au", "123");
+        jsonObject.addProperty("rt", System.currentTimeMillis());
+        JsonObject osInfo = new JsonObject();
+        osInfo.addProperty("osName", "test");
+        jsonObject.add("oi", osInfo);
+        String s = gson.toJson(jsonObject);
+        Mockito.when(request.getReader()).then(invocation -> {
+            DelegatingServletInputStream delegatingServletInputStream = new DelegatingServletInputStream(new ByteArrayInputStream(s.getBytes()));
+            return new BufferedReader(new InputStreamReader(delegatingServletInputStream));
+        });
+        JsonElement jsonElement = instanceDiscoveryServletHandler.doPost(request);
+        int ii = ((JsonObject) jsonElement).get("ii").getAsInt();
+        assertEquals(ii, 0);
+    }
 }
\ No newline at end of file
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/InstanceHeartBeatServletHandlerTest.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/InstanceHeartBeatServletHandlerTest.java
index 028b9654c..4ddbfd531 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/InstanceHeartBeatServletHandlerTest.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/InstanceHeartBeatServletHandlerTest.java
@@ -1,90 +1,90 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.skywalking.apm.collector.agent.jetty.provider.handler;
-
-import com.google.gson.Gson;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonObject;
-import org.apache.skywalking.apm.collector.DelegatingServletInputStream;
-import org.apache.skywalking.apm.collector.core.module.MockModule;
-import org.apache.skywalking.apm.collector.core.module.ModuleManager;
-import org.apache.skywalking.apm.collector.server.jetty.ArgumentsParseException;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.Mockito;
-import org.mockito.runners.MockitoJUnitRunner;
-
-import javax.servlet.http.HttpServletRequest;
-import java.io.BufferedReader;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.anyString;
-import static org.powermock.api.mockito.PowerMockito.when;
-
-/**
- * @author lican
- */
-@RunWith(MockitoJUnitRunner.class)
-public class InstanceHeartBeatServletHandlerTest {
-
-    @Mock
-    private ModuleManager moduleManager;
-    @Mock
-    private HttpServletRequest request;
-
-    private Gson gson = new Gson();
-
-    private InstanceHeartBeatServletHandler heartBeatServletHandler;
-
-    @Before
-    public void setUp() throws Exception {
-        when(moduleManager.find(anyString())).then(invocation -> new MockModule());
-        heartBeatServletHandler = new InstanceHeartBeatServletHandler(moduleManager);
-
-    }
-
-    @Test
-    public void pathSpec() {
-        assertEquals(heartBeatServletHandler.pathSpec(), "/instance/heartbeat");
-    }
-
-    @Test(expected = UnsupportedOperationException.class)
-    public void doGet() throws ArgumentsParseException {
-        heartBeatServletHandler.doGet(request);
-    }
-
-    @Test
-    public void doPost() throws IOException, ArgumentsParseException {
-        JsonObject jsonObject = new JsonObject();
-        jsonObject.addProperty("ii", 1);
-        jsonObject.addProperty("ht", System.currentTimeMillis());
-        String s = gson.toJson(jsonObject);
-        Mockito.when(request.getReader()).then(invocation -> {
-            DelegatingServletInputStream delegatingServletInputStream = new DelegatingServletInputStream(new ByteArrayInputStream(s.getBytes()));
-            return new BufferedReader(new InputStreamReader(delegatingServletInputStream));
-        });
-        JsonElement jsonElement = heartBeatServletHandler.doPost(request);
-        assertTrue(jsonElement.isJsonObject());
-    }
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.skywalking.apm.collector.agent.jetty.provider.handler;
+
+import com.google.gson.Gson;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import org.apache.skywalking.apm.collector.DelegatingServletInputStream;
+import org.apache.skywalking.apm.collector.core.module.MockModule;
+import org.apache.skywalking.apm.collector.core.module.ModuleManager;
+import org.apache.skywalking.apm.collector.server.jetty.ArgumentsParseException;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import javax.servlet.http.HttpServletRequest;
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Matchers.anyString;
+import static org.powermock.api.mockito.PowerMockito.when;
+
+/**
+ * @author lican
+ */
+@RunWith(MockitoJUnitRunner.class)
+public class InstanceHeartBeatServletHandlerTest {
+
+    @Mock
+    private ModuleManager moduleManager;
+    @Mock
+    private HttpServletRequest request;
+
+    private Gson gson = new Gson();
+
+    private InstanceHeartBeatServletHandler heartBeatServletHandler;
+
+    @Before
+    public void setUp() throws Exception {
+        when(moduleManager.find(anyString())).then(invocation -> new MockModule());
+        heartBeatServletHandler = new InstanceHeartBeatServletHandler(moduleManager);
+
+    }
+
+    @Test
+    public void pathSpec() {
+        assertEquals(heartBeatServletHandler.pathSpec(), "/instance/heartbeat");
+    }
+
+    @Test(expected = UnsupportedOperationException.class)
+    public void doGet() throws ArgumentsParseException {
+        heartBeatServletHandler.doGet(request);
+    }
+
+    @Test
+    public void doPost() throws IOException, ArgumentsParseException {
+        JsonObject jsonObject = new JsonObject();
+        jsonObject.addProperty("ii", 1);
+        jsonObject.addProperty("ht", System.currentTimeMillis());
+        String s = gson.toJson(jsonObject);
+        Mockito.when(request.getReader()).then(invocation -> {
+            DelegatingServletInputStream delegatingServletInputStream = new DelegatingServletInputStream(new ByteArrayInputStream(s.getBytes()));
+            return new BufferedReader(new InputStreamReader(delegatingServletInputStream));
+        });
+        JsonElement jsonElement = heartBeatServletHandler.doPost(request);
+        assertTrue(jsonElement.isJsonObject());
+    }
 }
\ No newline at end of file
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/NetworkAddressRegisterServletHandlerTest.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/NetworkAddressRegisterServletHandlerTest.java
index 5d544a80e..e322f470c 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/NetworkAddressRegisterServletHandlerTest.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/NetworkAddressRegisterServletHandlerTest.java
@@ -1,92 +1,92 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.skywalking.apm.collector.agent.jetty.provider.handler;
-
-import com.google.gson.Gson;
-import com.google.gson.JsonArray;
-import com.google.gson.JsonElement;
-import org.apache.skywalking.apm.collector.DelegatingServletInputStream;
-import org.apache.skywalking.apm.collector.core.module.MockModule;
-import org.apache.skywalking.apm.collector.core.module.ModuleManager;
-import org.apache.skywalking.apm.collector.server.jetty.ArgumentsParseException;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.Mockito;
-import org.mockito.runners.MockitoJUnitRunner;
-
-import javax.servlet.http.HttpServletRequest;
-import java.io.BufferedReader;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.anyString;
-import static org.powermock.api.mockito.PowerMockito.when;
-
-/**
- * @author lican
- */
-@RunWith(MockitoJUnitRunner.class)
-public class NetworkAddressRegisterServletHandlerTest {
-
-    private NetworkAddressRegisterServletHandler handler;
-
-    @Mock
-    private ModuleManager moduleManager;
-    @Mock
-    private HttpServletRequest request;
-
-    private Gson gson = new Gson();
-
-    @Before
-    public void setUp() throws Exception {
-        when(moduleManager.find(anyString())).then(invocation -> new MockModule());
-        handler = new NetworkAddressRegisterServletHandler(moduleManager);
-    }
-
-    @Test
-    public void pathSpec() {
-        assertEquals(handler.pathSpec(), "/networkAddress/register");
-    }
-
-    @Test(expected = UnsupportedOperationException.class)
-    public void doGet() throws ArgumentsParseException {
-        handler.doGet(request);
-    }
-
-    @Test
-    public void doPost() throws ArgumentsParseException, IOException {
-        JsonArray array = new JsonArray();
-        array.add("127.0.0.1:6379");
-        array.add("127.0.0.2:6379");
-        String s = gson.toJson(array);
-        Mockito.when(request.getReader()).then(invocation -> {
-            DelegatingServletInputStream delegatingServletInputStream = new DelegatingServletInputStream(new ByteArrayInputStream(s.getBytes()));
-            return new BufferedReader(new InputStreamReader(delegatingServletInputStream));
-        });
-        JsonElement jsonElement = handler.doPost(request);
-        Assert.assertTrue(jsonElement.isJsonArray());
-        JsonArray js = (JsonArray) jsonElement;
-        assertTrue(js.size() > 0);
-    }
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.skywalking.apm.collector.agent.jetty.provider.handler;
+
+import com.google.gson.Gson;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
+import org.apache.skywalking.apm.collector.DelegatingServletInputStream;
+import org.apache.skywalking.apm.collector.core.module.MockModule;
+import org.apache.skywalking.apm.collector.core.module.ModuleManager;
+import org.apache.skywalking.apm.collector.server.jetty.ArgumentsParseException;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import javax.servlet.http.HttpServletRequest;
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Matchers.anyString;
+import static org.powermock.api.mockito.PowerMockito.when;
+
+/**
+ * @author lican
+ */
+@RunWith(MockitoJUnitRunner.class)
+public class NetworkAddressRegisterServletHandlerTest {
+
+    private NetworkAddressRegisterServletHandler handler;
+
+    @Mock
+    private ModuleManager moduleManager;
+    @Mock
+    private HttpServletRequest request;
+
+    private Gson gson = new Gson();
+
+    @Before
+    public void setUp() throws Exception {
+        when(moduleManager.find(anyString())).then(invocation -> new MockModule());
+        handler = new NetworkAddressRegisterServletHandler(moduleManager);
+    }
+
+    @Test
+    public void pathSpec() {
+        assertEquals(handler.pathSpec(), "/networkAddress/register");
+    }
+
+    @Test(expected = UnsupportedOperationException.class)
+    public void doGet() throws ArgumentsParseException {
+        handler.doGet(request);
+    }
+
+    @Test
+    public void doPost() throws ArgumentsParseException, IOException {
+        JsonArray array = new JsonArray();
+        array.add("127.0.0.1:6379");
+        array.add("127.0.0.2:6379");
+        String s = gson.toJson(array);
+        Mockito.when(request.getReader()).then(invocation -> {
+            DelegatingServletInputStream delegatingServletInputStream = new DelegatingServletInputStream(new ByteArrayInputStream(s.getBytes()));
+            return new BufferedReader(new InputStreamReader(delegatingServletInputStream));
+        });
+        JsonElement jsonElement = handler.doPost(request);
+        Assert.assertTrue(jsonElement.isJsonArray());
+        JsonArray js = (JsonArray) jsonElement;
+        assertTrue(js.size() > 0);
+    }
 }
\ No newline at end of file
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/ServiceNameDiscoveryServiceHandlerTest.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/ServiceNameDiscoveryServiceHandlerTest.java
index 226f79d5e..426b62a1d 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/ServiceNameDiscoveryServiceHandlerTest.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/ServiceNameDiscoveryServiceHandlerTest.java
@@ -1,105 +1,105 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.skywalking.apm.collector.agent.jetty.provider.handler;
-
-import com.google.gson.Gson;
-import com.google.gson.JsonArray;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonObject;
-import org.apache.skywalking.apm.collector.DelegatingServletInputStream;
-import org.apache.skywalking.apm.collector.analysis.register.define.service.IServiceNameService;
-import org.apache.skywalking.apm.collector.core.module.MockModule;
-import org.apache.skywalking.apm.collector.core.module.ModuleManager;
-import org.apache.skywalking.apm.collector.server.jetty.ArgumentsParseException;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.Mockito;
-import org.mockito.internal.util.reflection.Whitebox;
-import org.mockito.runners.MockitoJUnitRunner;
-
-import javax.servlet.http.HttpServletRequest;
-import java.io.BufferedReader;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-
-import static org.junit.Assert.assertEquals;
-import static org.mockito.Matchers.anyInt;
-import static org.mockito.Matchers.anyString;
-import static org.powermock.api.mockito.PowerMockito.when;
-
-/**
- * @author lican
- */
-@RunWith(MockitoJUnitRunner.class)
-public class ServiceNameDiscoveryServiceHandlerTest {
-
-    @Mock
-    private ModuleManager moduleManager;
-    @Mock
-    private HttpServletRequest request;
-
-    private ServiceNameDiscoveryServiceHandler handler;
-
-    private Gson gson = new Gson();
-
-    @Mock
-    private IServiceNameService serviceNameService;
-
-    @Before
-    public void setUp() throws Exception {
-        when(moduleManager.find(anyString())).then(invocation -> new MockModule());
-        handler = new ServiceNameDiscoveryServiceHandler(moduleManager);
-        Whitebox.setInternalState(handler, "serviceNameService", serviceNameService);
-    }
-
-    @Test
-    public void pathSpec() {
-        assertEquals(handler.pathSpec(), "/servicename/discovery");
-    }
-
-    @Test(expected = UnsupportedOperationException.class)
-    public void doGet() throws ArgumentsParseException {
-        handler.doGet(request);
-    }
-
-    @Test
-    public void doPost() throws IOException, ArgumentsParseException {
-        JsonObject json = new JsonObject();
-        json.addProperty("ai", 1);
-        json.addProperty("sn", "test");
-        json.addProperty("st", 5);
-
-        JsonArray array = new JsonArray();
-        array.add(json);
-
-        String s = gson.toJson(array);
-
-        when(serviceNameService.getOrCreate(anyInt(), anyInt(), anyString())).thenReturn(2);
-
-        Mockito.when(request.getReader()).then(invocation -> {
-            DelegatingServletInputStream delegatingServletInputStream = new DelegatingServletInputStream(new ByteArrayInputStream(s.getBytes()));
-            return new BufferedReader(new InputStreamReader(delegatingServletInputStream));
-        });
-        JsonElement jsonElement = handler.doPost(request);
-        int serviceId = jsonElement.getAsJsonArray().get(0).getAsJsonObject().get("si").getAsInt();
-        assertEquals(serviceId, 2);
-    }
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.skywalking.apm.collector.agent.jetty.provider.handler;
+
+import com.google.gson.Gson;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import org.apache.skywalking.apm.collector.DelegatingServletInputStream;
+import org.apache.skywalking.apm.collector.analysis.register.define.service.IServiceNameService;
+import org.apache.skywalking.apm.collector.core.module.MockModule;
+import org.apache.skywalking.apm.collector.core.module.ModuleManager;
+import org.apache.skywalking.apm.collector.server.jetty.ArgumentsParseException;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.internal.util.reflection.Whitebox;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import javax.servlet.http.HttpServletRequest;
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Matchers.anyInt;
+import static org.mockito.Matchers.anyString;
+import static org.powermock.api.mockito.PowerMockito.when;
+
+/**
+ * @author lican
+ */
+@RunWith(MockitoJUnitRunner.class)
+public class ServiceNameDiscoveryServiceHandlerTest {
+
+    @Mock
+    private ModuleManager moduleManager;
+    @Mock
+    private HttpServletRequest request;
+
+    private ServiceNameDiscoveryServiceHandler handler;
+
+    private Gson gson = new Gson();
+
+    @Mock
+    private IServiceNameService serviceNameService;
+
+    @Before
+    public void setUp() throws Exception {
+        when(moduleManager.find(anyString())).then(invocation -> new MockModule());
+        handler = new ServiceNameDiscoveryServiceHandler(moduleManager);
+        Whitebox.setInternalState(handler, "serviceNameService", serviceNameService);
+    }
+
+    @Test
+    public void pathSpec() {
+        assertEquals(handler.pathSpec(), "/servicename/discovery");
+    }
+
+    @Test(expected = UnsupportedOperationException.class)
+    public void doGet() throws ArgumentsParseException {
+        handler.doGet(request);
+    }
+
+    @Test
+    public void doPost() throws IOException, ArgumentsParseException {
+        JsonObject json = new JsonObject();
+        json.addProperty("ai", 1);
+        json.addProperty("sn", "test");
+        json.addProperty("st", 5);
+
+        JsonArray array = new JsonArray();
+        array.add(json);
+
+        String s = gson.toJson(array);
+
+        when(serviceNameService.getOrCreate(anyInt(), anyInt(), anyString())).thenReturn(2);
+
+        Mockito.when(request.getReader()).then(invocation -> {
+            DelegatingServletInputStream delegatingServletInputStream = new DelegatingServletInputStream(new ByteArrayInputStream(s.getBytes()));
+            return new BufferedReader(new InputStreamReader(delegatingServletInputStream));
+        });
+        JsonElement jsonElement = handler.doPost(request);
+        int serviceId = jsonElement.getAsJsonArray().get(0).getAsJsonObject().get("si").getAsInt();
+        assertEquals(serviceId, 2);
+    }
 }
\ No newline at end of file
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/TraceSegmentServletHandlerTest.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/TraceSegmentServletHandlerTest.java
index d3ff32016..64d0c67a3 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/TraceSegmentServletHandlerTest.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/TraceSegmentServletHandlerTest.java
@@ -1,106 +1,106 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.skywalking.apm.collector.agent.jetty.provider.handler;
-
-import com.google.gson.Gson;
-import com.google.gson.JsonArray;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonObject;
-import org.apache.skywalking.apm.collector.DelegatingServletInputStream;
-import org.apache.skywalking.apm.collector.core.module.MockModule;
-import org.apache.skywalking.apm.collector.core.module.ModuleManager;
-import org.apache.skywalking.apm.collector.server.jetty.ArgumentsParseException;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.Mockito;
-import org.mockito.runners.MockitoJUnitRunner;
-
-import javax.servlet.http.HttpServletRequest;
-
-import java.io.BufferedReader;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-
-import static org.mockito.Matchers.anyString;
-import static org.powermock.api.mockito.PowerMockito.when;
-
-/**
- * @author lican
- */
-@RunWith(MockitoJUnitRunner.class)
-public class TraceSegmentServletHandlerTest {
-
-    @Mock
-    private ModuleManager moduleManager;
-    @Mock
-    private HttpServletRequest request;
-
-    private Gson gson = new Gson();
-
-    private TraceSegmentServletHandler handler;
-
-    @Before
-    public void setUp() throws Exception {
-        when(moduleManager.find(anyString())).then(invocation -> new MockModule());
-
-        handler = new TraceSegmentServletHandler(moduleManager);
-    }
-
-    @Test
-    public void pathSpec() {
-        Assert.assertEquals(handler.pathSpec(), "/segments");
-    }
-
-    @Test(expected = UnsupportedOperationException.class)
-    public void doGet() throws ArgumentsParseException {
-        handler.doGet(request);
-    }
-
-    @Test
-    public void doPost() throws IOException, ArgumentsParseException {
-
-        JsonArray array = new JsonArray();
-        array.add(230150);
-        array.add(185809);
-        array.add(24040000);
-        JsonArray gtArray = new JsonArray();
-        gtArray.add(array);
-        JsonObject json = new JsonObject();
-        json.add("gt", gtArray);
-        json.add("sg", new JsonObject());
-
-        JsonArray finalArr = new JsonArray();
-        finalArr.add(json);
-
-        String s = gson.toJson(finalArr);
-
-        Mockito.when(request.getReader()).then(invocation -> {
-            DelegatingServletInputStream delegatingServletInputStream = new DelegatingServletInputStream(new ByteArrayInputStream(s.getBytes()));
-            return new BufferedReader(new InputStreamReader(delegatingServletInputStream));
-        });
-
-        JsonElement jsonElement = handler.doPost(request);
-
-        Assert.assertNull(jsonElement);
-
-    }
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.skywalking.apm.collector.agent.jetty.provider.handler;
+
+import com.google.gson.Gson;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import org.apache.skywalking.apm.collector.DelegatingServletInputStream;
+import org.apache.skywalking.apm.collector.core.module.MockModule;
+import org.apache.skywalking.apm.collector.core.module.ModuleManager;
+import org.apache.skywalking.apm.collector.server.jetty.ArgumentsParseException;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import javax.servlet.http.HttpServletRequest;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+
+import static org.mockito.Matchers.anyString;
+import static org.powermock.api.mockito.PowerMockito.when;
+
+/**
+ * @author lican
+ */
+@RunWith(MockitoJUnitRunner.class)
+public class TraceSegmentServletHandlerTest {
+
+    @Mock
+    private ModuleManager moduleManager;
+    @Mock
+    private HttpServletRequest request;
+
+    private Gson gson = new Gson();
+
+    private TraceSegmentServletHandler handler;
+
+    @Before
+    public void setUp() throws Exception {
+        when(moduleManager.find(anyString())).then(invocation -> new MockModule());
+
+        handler = new TraceSegmentServletHandler(moduleManager);
+    }
+
+    @Test
+    public void pathSpec() {
+        Assert.assertEquals(handler.pathSpec(), "/segments");
+    }
+
+    @Test(expected = UnsupportedOperationException.class)
+    public void doGet() throws ArgumentsParseException {
+        handler.doGet(request);
+    }
+
+    @Test
+    public void doPost() throws IOException, ArgumentsParseException {
+
+        JsonArray array = new JsonArray();
+        array.add(230150);
+        array.add(185809);
+        array.add(24040000);
+        JsonArray gtArray = new JsonArray();
+        gtArray.add(array);
+        JsonObject json = new JsonObject();
+        json.add("gt", gtArray);
+        json.add("sg", new JsonObject());
+
+        JsonArray finalArr = new JsonArray();
+        finalArr.add(json);
+
+        String s = gson.toJson(finalArr);
+
+        Mockito.when(request.getReader()).then(invocation -> {
+            DelegatingServletInputStream delegatingServletInputStream = new DelegatingServletInputStream(new ByteArrayInputStream(s.getBytes()));
+            return new BufferedReader(new InputStreamReader(delegatingServletInputStream));
+        });
+
+        JsonElement jsonElement = handler.doPost(request);
+
+        Assert.assertNull(jsonElement);
+
+    }
 }
\ No newline at end of file
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/naming/AgentJettyNamingHandlerTest.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/naming/AgentJettyNamingHandlerTest.java
index bfc830a20..c87ec7d00 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/naming/AgentJettyNamingHandlerTest.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/naming/AgentJettyNamingHandlerTest.java
@@ -1,69 +1,69 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.skywalking.apm.collector.agent.jetty.provider.handler.naming;
-
-import com.google.gson.JsonArray;
-import com.google.gson.JsonElement;
-import org.apache.skywalking.apm.collector.server.jetty.ArgumentsParseException;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.runners.MockitoJUnitRunner;
-
-import javax.servlet.http.HttpServletRequest;
-
-import static org.junit.Assert.assertEquals;
-
-/**
- * @author lican
- */
-@RunWith(MockitoJUnitRunner.class)
-public class AgentJettyNamingHandlerTest {
-
-    private AgentJettyNamingHandler agentJettyNamingHandler;
-    @Mock
-    private HttpServletRequest request;
-
-    private String address = "127.0.0.1:8080";
-
-    @Before
-    public void setUp() {
-        AgentJettyNamingListener agentJettyNamingListener = new AgentJettyNamingListener();
-        agentJettyNamingListener.addAddress(address);
-        agentJettyNamingHandler = new AgentJettyNamingHandler(agentJettyNamingListener);
-
-    }
-
-    @Test
-    public void pathSpec() {
-        assertEquals(agentJettyNamingHandler.pathSpec(), "/agent/jetty");
-    }
-
-    @Test
-    public void doGet() throws ArgumentsParseException {
-        JsonElement jsonElement = agentJettyNamingHandler.doGet(request);
-        assertEquals(((JsonArray) jsonElement).get(0).getAsString(), address);
-
-    }
-
-    @Test(expected = UnsupportedOperationException.class)
-    public void doPost() throws ArgumentsParseException {
-        agentJettyNamingHandler.doPost(request);
-    }
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.skywalking.apm.collector.agent.jetty.provider.handler.naming;
+
+import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
+import org.apache.skywalking.apm.collector.server.jetty.ArgumentsParseException;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import javax.servlet.http.HttpServletRequest;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ * @author lican
+ */
+@RunWith(MockitoJUnitRunner.class)
+public class AgentJettyNamingHandlerTest {
+
+    private AgentJettyNamingHandler agentJettyNamingHandler;
+    @Mock
+    private HttpServletRequest request;
+
+    private String address = "127.0.0.1:8080";
+
+    @Before
+    public void setUp() {
+        AgentJettyNamingListener agentJettyNamingListener = new AgentJettyNamingListener();
+        agentJettyNamingListener.addAddress(address);
+        agentJettyNamingHandler = new AgentJettyNamingHandler(agentJettyNamingListener);
+
+    }
+
+    @Test
+    public void pathSpec() {
+        assertEquals(agentJettyNamingHandler.pathSpec(), "/agent/jetty");
+    }
+
+    @Test
+    public void doGet() throws ArgumentsParseException {
+        JsonElement jsonElement = agentJettyNamingHandler.doGet(request);
+        assertEquals(((JsonArray) jsonElement).get(0).getAsString(), address);
+
+    }
+
+    @Test(expected = UnsupportedOperationException.class)
+    public void doPost() throws ArgumentsParseException {
+        agentJettyNamingHandler.doPost(request);
+    }
 }
\ No newline at end of file
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/naming/AgentJettyNamingListenerTest.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/naming/AgentJettyNamingListenerTest.java
index c1608defd..178455d8f 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/naming/AgentJettyNamingListenerTest.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/naming/AgentJettyNamingListenerTest.java
@@ -1,55 +1,55 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.skywalking.apm.collector.agent.jetty.provider.handler.naming;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.runners.MockitoJUnitRunner;
-
-import static org.junit.Assert.assertEquals;
-
-/**
- * @author lican
- */
-@RunWith(MockitoJUnitRunner.class)
-public class AgentJettyNamingListenerTest {
-
-    private AgentJettyNamingListener agentJettyNamingListener;
-
-    @Before
-    public void setUp() throws Exception {
-        agentJettyNamingListener = new AgentJettyNamingListener();
-
-    }
-
-    @Test
-    public void path() {
-        assertEquals(agentJettyNamingListener.path(), "/agent_jetty/jetty");
-    }
-
-    @Test
-    public void serverJoinNotify() {
-        agentJettyNamingListener.serverJoinNotify(null);
-    }
-
-    @Test
-    public void serverQuitNotify() {
-        agentJettyNamingListener.serverQuitNotify(null);
-    }
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.skywalking.apm.collector.agent.jetty.provider.handler.naming;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ * @author lican
+ */
+@RunWith(MockitoJUnitRunner.class)
+public class AgentJettyNamingListenerTest {
+
+    private AgentJettyNamingListener agentJettyNamingListener;
+
+    @Before
+    public void setUp() throws Exception {
+        agentJettyNamingListener = new AgentJettyNamingListener();
+
+    }
+
+    @Test
+    public void path() {
+        assertEquals(agentJettyNamingListener.path(), "/agent_jetty/jetty");
+    }
+
+    @Test
+    public void serverJoinNotify() {
+        agentJettyNamingListener.serverJoinNotify(null);
+    }
+
+    @Test
+    public void serverQuitNotify() {
+        agentJettyNamingListener.serverQuitNotify(null);
+    }
 }
\ No newline at end of file
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/BaseReader.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/BaseReader.java
index 46c7e07d0..f80f44417 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/BaseReader.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/BaseReader.java
@@ -1,37 +1,37 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.skywalking.apm.collector.agent.jetty.provider.handler.reader;
-
-import com.google.gson.Gson;
-import com.google.gson.JsonElement;
-import com.google.gson.stream.JsonReader;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStreamReader;
-
-/**
- * @author lican
- */
-public class BaseReader {
-
-    private Gson gson = new Gson();
-
-    protected JsonReader getReader(JsonElement element) {
-        return new JsonReader(new InputStreamReader(new ByteArrayInputStream(gson.toJson(element).getBytes())));
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.skywalking.apm.collector.agent.jetty.provider.handler.reader;
+
+import com.google.gson.Gson;
+import com.google.gson.JsonElement;
+import com.google.gson.stream.JsonReader;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStreamReader;
+
+/**
+ * @author lican
+ */
+public class BaseReader {
+
+    private Gson gson = new Gson();
+
+    protected JsonReader getReader(JsonElement element) {
+        return new JsonReader(new InputStreamReader(new ByteArrayInputStream(gson.toJson(element).getBytes())));
+    }
+}
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/KeyWithStringValueJsonReaderTest.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/KeyWithStringValueJsonReaderTest.java
index 7607ba22d..48f752a7a 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/KeyWithStringValueJsonReaderTest.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/KeyWithStringValueJsonReaderTest.java
@@ -1,55 +1,55 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.skywalking.apm.collector.agent.jetty.provider.handler.reader;
-
-import com.google.gson.Gson;
-import com.google.gson.JsonObject;
-import org.apache.skywalking.apm.network.proto.KeyWithStringValue;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.runners.MockitoJUnitRunner;
-
-import java.io.IOException;
-
-import static org.junit.Assert.assertEquals;
-
-/**
- * @author lican
- */
-@RunWith(MockitoJUnitRunner.class)
-public class KeyWithStringValueJsonReaderTest extends BaseReader {
-
-    private KeyWithStringValueJsonReader jsonReader;
-
-    @Before
-    public void setUp() throws Exception {
-        jsonReader = new KeyWithStringValueJsonReader();
-    }
-
-    @Test
-    public void read() throws IOException {
-        Gson gson = new Gson();
-        JsonObject jsonObject = new JsonObject();
-        jsonObject.addProperty("k", "hello");
-        jsonObject.addProperty("v", "world");
-        KeyWithStringValue read = jsonReader.read(getReader(jsonObject));
-        assertEquals(read.getKey(),"hello");
-        assertEquals(read.getValue(),"world");
-    }
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.skywalking.apm.collector.agent.jetty.provider.handler.reader;
+
+import com.google.gson.Gson;
+import com.google.gson.JsonObject;
+import org.apache.skywalking.apm.network.proto.KeyWithStringValue;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import java.io.IOException;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ * @author lican
+ */
+@RunWith(MockitoJUnitRunner.class)
+public class KeyWithStringValueJsonReaderTest extends BaseReader {
+
+    private KeyWithStringValueJsonReader jsonReader;
+
+    @Before
+    public void setUp() throws Exception {
+        jsonReader = new KeyWithStringValueJsonReader();
+    }
+
+    @Test
+    public void read() throws IOException {
+        Gson gson = new Gson();
+        JsonObject jsonObject = new JsonObject();
+        jsonObject.addProperty("k", "hello");
+        jsonObject.addProperty("v", "world");
+        KeyWithStringValue read = jsonReader.read(getReader(jsonObject));
+        assertEquals(read.getKey(),"hello");
+        assertEquals(read.getValue(),"world");
+    }
 }
\ No newline at end of file
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/LogJsonReaderTest.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/LogJsonReaderTest.java
index b3ca1cfbf..e19314bcb 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/LogJsonReaderTest.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/LogJsonReaderTest.java
@@ -1,67 +1,67 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.skywalking.apm.collector.agent.jetty.provider.handler.reader;
-
-import com.google.gson.Gson;
-import com.google.gson.JsonArray;
-import com.google.gson.JsonObject;
-import org.apache.skywalking.apm.network.proto.LogMessage;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.runners.MockitoJUnitRunner;
-
-import java.io.IOException;
-
-/**
- * @author lican
- */
-@RunWith(MockitoJUnitRunner.class)
-public class LogJsonReaderTest extends BaseReader {
-
-    private LogJsonReader logJsonReader;
-
-    @Before
-    public void setUp() throws Exception {
-        logJsonReader = new LogJsonReader();
-    }
-
-    @Test
-    public void read() throws IOException {
-        Gson gson = new Gson();
-        JsonObject jsonObject = new JsonObject();
-        jsonObject.addProperty("k", "hello");
-        jsonObject.addProperty("v", "world");
-
-        JsonArray array = new JsonArray();
-        array.add(jsonObject);
-
-        long l = System.currentTimeMillis();
-
-        JsonObject json = new JsonObject();
-        json.addProperty("ti", l);
-        json.add("ld", array);
-
-        LogMessage read = logJsonReader.read(getReader(json));
-
-        Assert.assertEquals(read.getTime(), l);
-    }
-
-
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.skywalking.apm.collector.agent.jetty.provider.handler.reader;
+
+import com.google.gson.Gson;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonObject;
+import org.apache.skywalking.apm.network.proto.LogMessage;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import java.io.IOException;
+
+/**
+ * @author lican
+ */
+@RunWith(MockitoJUnitRunner.class)
+public class LogJsonReaderTest extends BaseReader {
+
+    private LogJsonReader logJsonReader;
+
+    @Before
+    public void setUp() throws Exception {
+        logJsonReader = new LogJsonReader();
+    }
+
+    @Test
+    public void read() throws IOException {
+        Gson gson = new Gson();
+        JsonObject jsonObject = new JsonObject();
+        jsonObject.addProperty("k", "hello");
+        jsonObject.addProperty("v", "world");
+
+        JsonArray array = new JsonArray();
+        array.add(jsonObject);
+
+        long l = System.currentTimeMillis();
+
+        JsonObject json = new JsonObject();
+        json.addProperty("ti", l);
+        json.add("ld", array);
+
+        LogMessage read = logJsonReader.read(getReader(json));
+
+        Assert.assertEquals(read.getTime(), l);
+    }
+
+
 }
\ No newline at end of file
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/ReferenceJsonReaderTest.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/ReferenceJsonReaderTest.java
index 4ceeabac4..b145a303f 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/ReferenceJsonReaderTest.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/ReferenceJsonReaderTest.java
@@ -1,87 +1,87 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.skywalking.apm.collector.agent.jetty.provider.handler.reader;
-
-import com.google.gson.Gson;
-import com.google.gson.JsonArray;
-import com.google.gson.JsonObject;
-import org.apache.skywalking.apm.network.proto.TraceSegmentReference;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.runners.MockitoJUnitRunner;
-
-import java.io.IOException;
-
-import static org.junit.Assert.assertTrue;
-
-/**
- * @author lican
- */
-@RunWith(MockitoJUnitRunner.class)
-public class ReferenceJsonReaderTest extends BaseReader {
-
-    private ReferenceJsonReader referenceJsonReader;
-
-    @Before
-    public void setUp() throws Exception {
-        referenceJsonReader = new ReferenceJsonReader();
-    }
-
-    /**
-     * {
-     * "pts": [230150, 185809, 24040000], //parentTraceSegmentId
-     * "pii": 2, //parentApplicationInstanceId
-     * "psp": 1, //parentSpanId
-     * "psi": 0, //parentServiceId
-     * "psn": "/dubbox-case/case/dubbox-rest", //parentServiceName
-     * "ni": 0,  //networkAddressId
-     * "nn": "172.25.0.4:20880", //networkAddress
-     * "eii": 2, //entryApplicationInstanceId
-     * "esi": 0, //entryServiceId
-     * "esn": "/dubbox-case/case/dubbox-rest", //entryServiceName
-     * "rv": 0 //RefType
-     * }
-     */
-    @Test
-    public void read() throws IOException {
-        Gson gson = new Gson();
-        JsonObject jsonObject = new JsonObject();
-        JsonArray ptsArray = new JsonArray();
-        ptsArray.add(230150L);
-        ptsArray.add(185809L);
-        ptsArray.add(24040000L);
-
-        jsonObject.add("pts", ptsArray);
-        jsonObject.addProperty("pii", 2);
-        jsonObject.addProperty("psp", 1);
-        jsonObject.addProperty("psi", 0);
-        jsonObject.addProperty("psn", "/dubbox-case/case/dubbox-rest");
-        jsonObject.addProperty("ni", 0);
-        jsonObject.addProperty("nn", "172.25.0.4:20880");
-        jsonObject.addProperty("eii", 2);
-        jsonObject.addProperty("esi", 0);
-        jsonObject.addProperty("esn", "/dubbox-case/case/dubbox-rest");
-//        jsonObject.addProperty("rn", 0);
-        //add
-        jsonObject.addProperty("rv", 1);
-
-        TraceSegmentReference read = referenceJsonReader.read(getReader(jsonObject));
-        assertTrue(read.getParentTraceSegmentId().getIdPartsList().size() == 3);
-    }
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.skywalking.apm.collector.agent.jetty.provider.handler.reader;
+
+import com.google.gson.Gson;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonObject;
+import org.apache.skywalking.apm.network.proto.TraceSegmentReference;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import java.io.IOException;
+
+import static org.junit.Assert.assertTrue;
+
+/**
+ * @author lican
+ */
+@RunWith(MockitoJUnitRunner.class)
+public class ReferenceJsonReaderTest extends BaseReader {
+
+    private ReferenceJsonReader referenceJsonReader;
+
+    @Before
+    public void setUp() throws Exception {
+        referenceJsonReader = new ReferenceJsonReader();
+    }
+
+    /**
+     * {
+     * "pts": [230150, 185809, 24040000], //parentTraceSegmentId
+     * "pii": 2, //parentApplicationInstanceId
+     * "psp": 1, //parentSpanId
+     * "psi": 0, //parentServiceId
+     * "psn": "/dubbox-case/case/dubbox-rest", //parentServiceName
+     * "ni": 0,  //networkAddressId
+     * "nn": "172.25.0.4:20880", //networkAddress
+     * "eii": 2, //entryApplicationInstanceId
+     * "esi": 0, //entryServiceId
+     * "esn": "/dubbox-case/case/dubbox-rest", //entryServiceName
+     * "rv": 0 //RefType
+     * }
+     */
+    @Test
+    public void read() throws IOException {
+        Gson gson = new Gson();
+        JsonObject jsonObject = new JsonObject();
+        JsonArray ptsArray = new JsonArray();
+        ptsArray.add(230150L);
+        ptsArray.add(185809L);
+        ptsArray.add(24040000L);
+
+        jsonObject.add("pts", ptsArray);
+        jsonObject.addProperty("pii", 2);
+        jsonObject.addProperty("psp", 1);
+        jsonObject.addProperty("psi", 0);
+        jsonObject.addProperty("psn", "/dubbox-case/case/dubbox-rest");
+        jsonObject.addProperty("ni", 0);
+        jsonObject.addProperty("nn", "172.25.0.4:20880");
+        jsonObject.addProperty("eii", 2);
+        jsonObject.addProperty("esi", 0);
+        jsonObject.addProperty("esn", "/dubbox-case/case/dubbox-rest");
+//        jsonObject.addProperty("rn", 0);
+        //add
+        jsonObject.addProperty("rv", 1);
+
+        TraceSegmentReference read = referenceJsonReader.read(getReader(jsonObject));
+        assertTrue(read.getParentTraceSegmentId().getIdPartsList().size() == 3);
+    }
 }
\ No newline at end of file
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/SegmentJsonReaderTest.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/SegmentJsonReaderTest.java
index 712948dac..5d239329a 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/SegmentJsonReaderTest.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/SegmentJsonReaderTest.java
@@ -1,68 +1,68 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.skywalking.apm.collector.agent.jetty.provider.handler.reader;
-
-import com.google.gson.JsonArray;
-import com.google.gson.JsonObject;
-import org.apache.skywalking.apm.network.proto.TraceSegmentObject;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.runners.MockitoJUnitRunner;
-
-import java.io.IOException;
-
-import static org.junit.Assert.assertTrue;
-
-/**
- * @author lican
- */
-@RunWith(MockitoJUnitRunner.class)
-public class SegmentJsonReaderTest extends BaseReader {
-
-    private SegmentJsonReader segmentJsonReader;
-
-    @Before
-    public void setUp() throws Exception {
-        segmentJsonReader = new SegmentJsonReader();
-    }
-
-    /**
-     * { //TraceSegmentObject
-     * "ts": [137150, 185809, 48780000],
-     * "ai": 2, //applicationId
-     * "ii": 3, //applicationInstanceId
-     * "ss": []//SpanObject
-     */
-    @Test
-    public void read() throws IOException {
-        JsonArray tsArray = new JsonArray();
-        tsArray.add(137150);
-        tsArray.add(185809);
-        tsArray.add(48780000);
-
-        JsonObject json = new JsonObject();
-        json.add("ts", tsArray);
-        json.addProperty("ai", 2);
-        json.addProperty("ii", 3);
-        json.add("ss", new JsonArray());
-        TraceSegmentObject.Builder read = segmentJsonReader.read(getReader(json));
-        TraceSegmentObject build = read.build();
-        assertTrue(build.getTraceSegmentId().getIdPartsList().size() == 3);
-    }
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.skywalking.apm.collector.agent.jetty.provider.handler.reader;
+
+import com.google.gson.JsonArray;
+import com.google.gson.JsonObject;
+import org.apache.skywalking.apm.network.proto.TraceSegmentObject;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import java.io.IOException;
+
+import static org.junit.Assert.assertTrue;
+
+/**
+ * @author lican
+ */
+@RunWith(MockitoJUnitRunner.class)
+public class SegmentJsonReaderTest extends BaseReader {
+
+    private SegmentJsonReader segmentJsonReader;
+
+    @Before
+    public void setUp() throws Exception {
+        segmentJsonReader = new SegmentJsonReader();
+    }
+
+    /**
+     * { //TraceSegmentObject
+     * "ts": [137150, 185809, 48780000],
+     * "ai": 2, //applicationId
+     * "ii": 3, //applicationInstanceId
+     * "ss": []//SpanObject
+     */
+    @Test
+    public void read() throws IOException {
+        JsonArray tsArray = new JsonArray();
+        tsArray.add(137150);
+        tsArray.add(185809);
+        tsArray.add(48780000);
+
+        JsonObject json = new JsonObject();
+        json.add("ts", tsArray);
+        json.addProperty("ai", 2);
+        json.addProperty("ii", 3);
+        json.add("ss", new JsonArray());
+        TraceSegmentObject.Builder read = segmentJsonReader.read(getReader(json));
+        TraceSegmentObject build = read.build();
+        assertTrue(build.getTraceSegmentId().getIdPartsList().size() == 3);
+    }
 }
\ No newline at end of file
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/SpanJsonReaderTest.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/SpanJsonReaderTest.java
index eb4e649bd..faed2760e 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/SpanJsonReaderTest.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/SpanJsonReaderTest.java
@@ -1,87 +1,87 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.skywalking.apm.collector.agent.jetty.provider.handler.reader;
-
-import com.google.gson.JsonArray;
-import com.google.gson.JsonObject;
-import org.apache.skywalking.apm.network.proto.SpanObject;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.runners.MockitoJUnitRunner;
-
-import java.io.IOException;
-
-import static org.junit.Assert.assertEquals;
-
-/**
- * @author lican
- */
-@RunWith(MockitoJUnitRunner.class)
-public class SpanJsonReaderTest extends BaseReader {
-
-    private SpanJsonReader spanJsonReader;
-
-    @Before
-    public void setUp() throws Exception {
-        spanJsonReader = new SpanJsonReader();
-    }
-
-    /**
-     * {
-     * "si": 0, //spanId
-     * "tv": 0, //SpanType
-     * "lv": 2, //SpanLayer
-     * "ps": -1, //parentSpanId
-     * "st": 1501858094726, //startTime
-     * "et": 1501858096804, //endTime
-     * "ci": 3, //componentId
-     * "cn": "", //component
-     * "oi": 0, //operationNameId
-     * "on": "org.skywaking.apm.testcase.dubbo.services.GreetService.doBusiness()", //operationName
-     * "pi": 0, //peerId
-     * "pn": "", //peer
-     * "ie": false, //isError
-     * "rs": [ //TraceSegmentReference],
-     * "to": [ //KeyWithStringValue ],
-     * "lo": [] //log
-     * }
-     */
-    @Test
-    public void read() throws IOException {
-        JsonObject json = new JsonObject();
-        json.addProperty("si", 1);
-        json.addProperty("tv", 0);
-        json.addProperty("lv", 2);
-        json.addProperty("ps", -1);
-        json.addProperty("st", 1501858094726L);
-        json.addProperty("et", 1501858096804L);
-        json.addProperty("ci", 3);
-        json.addProperty("cn", "redis");
-        json.addProperty("oi", 0);
-        json.addProperty("on", "org.skywaking.apm.testcase.dubbo.services.GreetService.doBusiness()");
-        json.addProperty("pi", 0);
-        json.addProperty("pn", "127.0.0.1:6379");
-        json.addProperty("ie", false);
-        json.add("rs", new JsonArray());
-        json.add("to", new JsonArray());
-        json.add("lo", new JsonArray());
-        SpanObject read = spanJsonReader.read(getReader(json));
-        assertEquals(read.getSpanId(), 1);
-    }
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.skywalking.apm.collector.agent.jetty.provider.handler.reader;
+
+import com.google.gson.JsonArray;
+import com.google.gson.JsonObject;
+import org.apache.skywalking.apm.network.proto.SpanObject;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import java.io.IOException;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ * @author lican
+ */
+@RunWith(MockitoJUnitRunner.class)
+public class SpanJsonReaderTest extends BaseReader {
+
+    private SpanJsonReader spanJsonReader;
+
+    @Before
+    public void setUp() throws Exception {
+        spanJsonReader = new SpanJsonReader();
+    }
+
+    /**
+     * {
+     * "si": 0, //spanId
+     * "tv": 0, //SpanType
+     * "lv": 2, //SpanLayer
+     * "ps": -1, //parentSpanId
+     * "st": 1501858094726, //startTime
+     * "et": 1501858096804, //endTime
+     * "ci": 3, //componentId
+     * "cn": "", //component
+     * "oi": 0, //operationNameId
+     * "on": "org.skywaking.apm.testcase.dubbo.services.GreetService.doBusiness()", //operationName
+     * "pi": 0, //peerId
+     * "pn": "", //peer
+     * "ie": false, //isError
+     * "rs": [ //TraceSegmentReference],
+     * "to": [ //KeyWithStringValue ],
+     * "lo": [] //log
+     * }
+     */
+    @Test
+    public void read() throws IOException {
+        JsonObject json = new JsonObject();
+        json.addProperty("si", 1);
+        json.addProperty("tv", 0);
+        json.addProperty("lv", 2);
+        json.addProperty("ps", -1);
+        json.addProperty("st", 1501858094726L);
+        json.addProperty("et", 1501858096804L);
+        json.addProperty("ci", 3);
+        json.addProperty("cn", "redis");
+        json.addProperty("oi", 0);
+        json.addProperty("on", "org.skywaking.apm.testcase.dubbo.services.GreetService.doBusiness()");
+        json.addProperty("pi", 0);
+        json.addProperty("pn", "127.0.0.1:6379");
+        json.addProperty("ie", false);
+        json.add("rs", new JsonArray());
+        json.add("to", new JsonArray());
+        json.add("lo", new JsonArray());
+        SpanObject read = spanJsonReader.read(getReader(json));
+        assertEquals(read.getSpanId(), 1);
+    }
 }
\ No newline at end of file
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/TraceSegmentJsonReaderTest.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/TraceSegmentJsonReaderTest.java
index 969c9b00a..3b8ae349c 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/TraceSegmentJsonReaderTest.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/agent/jetty/provider/handler/reader/TraceSegmentJsonReaderTest.java
@@ -1,66 +1,66 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.skywalking.apm.collector.agent.jetty.provider.handler.reader;
-
-import com.google.gson.JsonArray;
-import com.google.gson.JsonObject;
-import org.apache.skywalking.apm.network.proto.UniqueId;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.runners.MockitoJUnitRunner;
-
-import java.io.IOException;
-import java.util.List;
-
-import static org.junit.Assert.assertTrue;
-
-/**
- * @author lican
- */
-@RunWith(MockitoJUnitRunner.class)
-public class TraceSegmentJsonReaderTest extends BaseReader {
-
-    private TraceSegmentJsonReader traceSegmentJsonReader;
-
-    @Before
-    public void setUp() throws Exception {
-        traceSegmentJsonReader = new TraceSegmentJsonReader();
-    }
-
-    /**
-     * {
-     * "gt": [[230150, 185809, 24040000]],
-     * "sg": { }//TraceSegmentObject
-     */
-    @Test
-    public void read() throws IOException {
-        JsonArray array = new JsonArray();
-        array.add(230150);
-        array.add(185809);
-        array.add(24040000);
-        JsonArray gtArray = new JsonArray();
-        gtArray.add(array);
-        JsonObject json = new JsonObject();
-        json.add("gt", gtArray);
-        json.add("sg", new JsonObject());
-        TraceSegment read = traceSegmentJsonReader.read(getReader(json));
-        List<UniqueId> globalTraceIdsList = read.getUpstreamSegment().getGlobalTraceIdsList();
-        assertTrue(globalTraceIdsList.size() == 1);
-    }
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.skywalking.apm.collector.agent.jetty.provider.handler.reader;
+
+import com.google.gson.JsonArray;
+import com.google.gson.JsonObject;
+import org.apache.skywalking.apm.network.proto.UniqueId;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import java.io.IOException;
+import java.util.List;
+
+import static org.junit.Assert.assertTrue;
+
+/**
+ * @author lican
+ */
+@RunWith(MockitoJUnitRunner.class)
+public class TraceSegmentJsonReaderTest extends BaseReader {
+
+    private TraceSegmentJsonReader traceSegmentJsonReader;
+
+    @Before
+    public void setUp() throws Exception {
+        traceSegmentJsonReader = new TraceSegmentJsonReader();
+    }
+
+    /**
+     * {
+     * "gt": [[230150, 185809, 24040000]],
+     * "sg": { }//TraceSegmentObject
+     */
+    @Test
+    public void read() throws IOException {
+        JsonArray array = new JsonArray();
+        array.add(230150);
+        array.add(185809);
+        array.add(24040000);
+        JsonArray gtArray = new JsonArray();
+        gtArray.add(array);
+        JsonObject json = new JsonObject();
+        json.add("gt", gtArray);
+        json.add("sg", new JsonObject());
+        TraceSegment read = traceSegmentJsonReader.read(getReader(json));
+        List<UniqueId> globalTraceIdsList = read.getUpstreamSegment().getGlobalTraceIdsList();
+        assertTrue(globalTraceIdsList.size() == 1);
+    }
 }
\ No newline at end of file
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/core/module/MockModule.java b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/core/module/MockModule.java
index b7ca4bae3..bc866d45c 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/core/module/MockModule.java
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/java/org/apache/skywalking/apm/collector/core/module/MockModule.java
@@ -1,70 +1,70 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.skywalking.apm.collector.core.module;
-
-import com.google.common.collect.Lists;
-import org.apache.skywalking.apm.collector.jetty.manager.service.JettyManagerService;
-import org.apache.skywalking.apm.collector.server.jetty.JettyServer;
-import org.mockito.Mockito;
-import org.mockito.internal.util.reflection.Whitebox;
-import org.powermock.api.mockito.PowerMockito;
-
-import java.util.LinkedList;
-
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyInt;
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Mockito.when;
-
-/**
- * @author lican
- */
-public class MockModule extends ModuleDefine {
-
-    public MockModule() throws ServiceNotProvidedException {
-        ModuleProvider moduleProvider = Mockito.mock(ModuleProvider.class);
-        LinkedList<ModuleProvider> linkedList = Lists.newLinkedList();
-        linkedList.add(moduleProvider);
-        Whitebox.setInternalState(this, "loadedProviders", linkedList);
-        when(moduleProvider.getService(any())).then(invocation -> {
-            Class argumentAt = invocation.getArgumentAt(0, Class.class);
-            Object mock = Mockito.mock(argumentAt);
-            if (mock instanceof JettyManagerService) {
-                PowerMockito.when(((JettyManagerService) mock).createIfAbsent(anyString(), anyInt(), anyString())).then(invocation1 -> {
-                    JettyServer jettyServer = new JettyServer("127.0.0.1", 10806, "/");
-                    jettyServer.initialize();
-                    return jettyServer;
-                });
-
-            }
-            return mock;
-        });
-    }
-
-    @Override
-    public String name() {
-        return null;
-    }
-
-    @Override
-    public Class[] services() {
-        return new Class[0];
-    }
-
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.skywalking.apm.collector.core.module;
+
+import com.google.common.collect.Lists;
+import org.apache.skywalking.apm.collector.jetty.manager.service.JettyManagerService;
+import org.apache.skywalking.apm.collector.server.jetty.JettyServer;
+import org.mockito.Mockito;
+import org.mockito.internal.util.reflection.Whitebox;
+import org.powermock.api.mockito.PowerMockito;
+
+import java.util.LinkedList;
+
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.anyInt;
+import static org.mockito.Matchers.anyString;
+import static org.mockito.Mockito.when;
+
+/**
+ * @author lican
+ */
+public class MockModule extends ModuleDefine {
+
+    public MockModule() throws ServiceNotProvidedException {
+        ModuleProvider moduleProvider = Mockito.mock(ModuleProvider.class);
+        LinkedList<ModuleProvider> linkedList = Lists.newLinkedList();
+        linkedList.add(moduleProvider);
+        Whitebox.setInternalState(this, "loadedProviders", linkedList);
+        when(moduleProvider.getService(any())).then(invocation -> {
+            Class argumentAt = invocation.getArgumentAt(0, Class.class);
+            Object mock = Mockito.mock(argumentAt);
+            if (mock instanceof JettyManagerService) {
+                PowerMockito.when(((JettyManagerService) mock).createIfAbsent(anyString(), anyInt(), anyString())).then(invocation1 -> {
+                    JettyServer jettyServer = new JettyServer("127.0.0.1", 10806, "/");
+                    jettyServer.initialize();
+                    return jettyServer;
+                });
+
+            }
+            return mock;
+        });
+    }
+
+    @Override
+    public String name() {
+        return null;
+    }
+
+    @Override
+    public Class[] services() {
+        return new Class[0];
+    }
+
+
+}
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/resources/json/application-register-consumer.json b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/resources/json/application-register-consumer.json
index b7f243635..ff1e2a4dc 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/resources/json/application-register-consumer.json
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/resources/json/application-register-consumer.json
@@ -1,3 +1,3 @@
-[
-  "dubbox-consumer"
+[
+  "dubbox-consumer"
 ]
\ No newline at end of file
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/resources/json/application-register-provider.json b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/resources/json/application-register-provider.json
index 08a2c156b..21b1251f6 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/resources/json/application-register-provider.json
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/resources/json/application-register-provider.json
@@ -1,3 +1,3 @@
-[
-  "dubbox-provider"
+[
+  "dubbox-provider"
 ]
\ No newline at end of file
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/resources/json/dubbox-consumer.json b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/resources/json/dubbox-consumer.json
index 06bb8fe87..71c052d79 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/resources/json/dubbox-consumer.json
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/resources/json/dubbox-consumer.json
@@ -1,61 +1,61 @@
-[
-  {
-    "gt": [[230150, 185809, 24040000]], //trace_id 链路编码
-    "sg": {
-      "ts": [230150, 185809, 24040000], //segment_id 一个应用中的一个实例在链路中产生的编号
-      "ai": -1, //应用ID,应用启动注册时产生
-      "ii": 2,  //实例ID,应用启动注册时产生
-      "rs": [], //链路的上下文信息,头节点,所以为空
-      "ss": [   //一个埋点(手动埋点或者自动埋点)
-        {
-          "si": 1,  //埋点编号
-          "tv": 1,  //埋点类型(手动、入口、出口)
-          "lv": 2,  //层(RPCFramework,Database,Http)
-          "ps": 0,  //上级埋点编号
-          "st": 1501858094526,  //开始时间
-          "et": 1501858097004,  //结束时间
-          "ci": 3,  //组件编号(Tomcat、Mysql、Dubbo...)
-          "cn": "", //组件名称
-          "oi": 0,  //埋点的服务ID
-          "on": "org.skywaking.apm.testcase.dubbo.services.GreetService.doBusiness()",  //埋点的服务名
-          "pi": 0,  //地址注册的ID,调用抓取后注册
-          "pn": "172.25.0.4:20880", //地址
-          "ie": false,  //是否发生错误,是否有Exception
-          "to": [   //与链路分析关系较小的TAG,SQL也在其中
-            {
-              "k": "url",
-              "v": "rest://172.25.0.4:20880/org.skywaking.apm.testcase.dubbo.services.GreetService.doBusiness()"
-            }
-          ],
-          "lo": []  //日志,与链路分析完全无关,只作为展示使用,手动埋点时可以任意追加,kv的形式,例如收集一些业务相关的信息
-        },
-        {
-          "si": 0,
-          "tv": 0,
-          "lv": 3,
-          "ps": -1,
-          "st": 1501858092409,
-          "et": 1501858097033,
-          "ci": 1,
-          "cn": "",
-          "oi": 0,
-          "on": "/dubbox-case/case/dubbox-rest",
-          "pi": 0,
-          "pn": "",
-          "ie": false,
-          "to": [
-            {
-              "k": "url",
-              "v": "http://localhost:18080/dubbox-case/case/dubbox-rest"
-            },
-            {
-              "k": "http.method",
-              "v": "GET"
-            }
-          ],
-          "lo": []
-        }
-      ]
-    }
-  }
+[
+  {
+    "gt": [[230150, 185809, 24040000]], //trace_id 链路编码
+    "sg": {
+      "ts": [230150, 185809, 24040000], //segment_id 一个应用中的一个实例在链路中产生的编号
+      "ai": -1, //应用ID,应用启动注册时产生
+      "ii": 2,  //实例ID,应用启动注册时产生
+      "rs": [], //链路的上下文信息,头节点,所以为空
+      "ss": [   //一个埋点(手动埋点或者自动埋点)
+        {
+          "si": 1,  //埋点编号
+          "tv": 1,  //埋点类型(手动、入口、出口)
+          "lv": 2,  //层(RPCFramework,Database,Http)
+          "ps": 0,  //上级埋点编号
+          "st": 1501858094526,  //开始时间
+          "et": 1501858097004,  //结束时间
+          "ci": 3,  //组件编号(Tomcat、Mysql、Dubbo...)
+          "cn": "", //组件名称
+          "oi": 0,  //埋点的服务ID
+          "on": "org.skywaking.apm.testcase.dubbo.services.GreetService.doBusiness()",  //埋点的服务名
+          "pi": 0,  //地址注册的ID,调用抓取后注册
+          "pn": "172.25.0.4:20880", //地址
+          "ie": false,  //是否发生错误,是否有Exception
+          "to": [   //与链路分析关系较小的TAG,SQL也在其中
+            {
+              "k": "url",
+              "v": "rest://172.25.0.4:20880/org.skywaking.apm.testcase.dubbo.services.GreetService.doBusiness()"
+            }
+          ],
+          "lo": []  //日志,与链路分析完全无关,只作为展示使用,手动埋点时可以任意追加,kv的形式,例如收集一些业务相关的信息
+        },
+        {
+          "si": 0,
+          "tv": 0,
+          "lv": 3,
+          "ps": -1,
+          "st": 1501858092409,
+          "et": 1501858097033,
+          "ci": 1,
+          "cn": "",
+          "oi": 0,
+          "on": "/dubbox-case/case/dubbox-rest",
+          "pi": 0,
+          "pn": "",
+          "ie": false,
+          "to": [
+            {
+              "k": "url",
+              "v": "http://localhost:18080/dubbox-case/case/dubbox-rest"
+            },
+            {
+              "k": "http.method",
+              "v": "GET"
+            }
+          ],
+          "lo": []
+        }
+      ]
+    }
+  }
 ]
\ No newline at end of file
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/resources/json/dubbox-provider.json b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/resources/json/dubbox-provider.json
index 856cfc03c..1efe5dacc 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/resources/json/dubbox-provider.json
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/resources/json/dubbox-provider.json
@@ -1,70 +1,70 @@
-[
-  {
-    "gt": [[230150, 185809, 24040000]], //trace_id 链路编码,与调用方相同
-    "sg": {
-      "ts": [137150, 185809, 48780000], //segment_id,新产生
-      "ai": 2,
-      "ii": 3,
-      "ss": [
-        {
-          "si": 0,
-          "tv": 0,
-          "lv": 2,
-          "ps": -1,
-          "st": 1501858094726,
-          "et": 1501858096804,
-          "ci": 3,
-          "cn": "",
-          "oi": 0,
-          "on": "org.skywaking.apm.testcase.dubbo.services.GreetService.doBusiness()",
-          "pi": 0,
-          "pn": "",
-          "ie": false,
-          "rs": [
-            {
-              "pts": [230150, 185809, 24040000], //上级的segment_id 一个应用中的一个实例在链路中产生的编号
-              "pii": 2, //上级的实例编号
-              "psp": 1, //上级的埋点编号span_id
-              "psi": 0, //上级的服务编号(org.skywaking.apm.testcase.dubbo.services.GreetService.doBusiness()注册后的ID)
-              "psn": "/dubbox-case/case/dubbox-rest", //上级的服务名
-              "ni": 0,  //上级调用时使用的地址注册后的ID
-              "nn": "172.25.0.4:20880", //上级的地址
-              "eii": 2, //入口的实例编号
-              "esi": 0, //入口的服务编号
-              "esn": "/dubbox-case/case/dubbox-rest", //入口的服务名词
-              "rn": 0 //调用方式(CrossProcess,CrossThread)
-            }
-          ],
-          "to": [
-            {
-              "k": "url",
-              "v": "rest://172.25.0.4:20880/org.skywaking.apm.testcase.dubbo.services.GreetService.doBusiness()"
-            },
-            {
-              "k": "http.method",
-              "v": "GET"
-            }
-          ],
-          "lo": []
-        },
-        {
-          "si": 1,
-          "tv": 1,
-          "lv": 1,
-          "ps": 0,
-          "st": 1501858094726,
-          "et": 1501858095804,
-          "ci": 9,
-          "cn": "",
-          "oi": 0,
-          "on": "mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]]",
-          "pi": 0,
-          "pn": "localhost:27017",
-          "ie": false,
-          "to": [],
-          "lo": []
-        }
-      ]
-    }
-  }
+[
+  {
+    "gt": [[230150, 185809, 24040000]], //trace_id 链路编码,与调用方相同
+    "sg": {
+      "ts": [137150, 185809, 48780000], //segment_id,新产生
+      "ai": 2,
+      "ii": 3,
+      "ss": [
+        {
+          "si": 0,
+          "tv": 0,
+          "lv": 2,
+          "ps": -1,
+          "st": 1501858094726,
+          "et": 1501858096804,
+          "ci": 3,
+          "cn": "",
+          "oi": 0,
+          "on": "org.skywaking.apm.testcase.dubbo.services.GreetService.doBusiness()",
+          "pi": 0,
+          "pn": "",
+          "ie": false,
+          "rs": [
+            {
+              "pts": [230150, 185809, 24040000], //上级的segment_id 一个应用中的一个实例在链路中产生的编号
+              "pii": 2, //上级的实例编号
+              "psp": 1, //上级的埋点编号span_id
+              "psi": 0, //上级的服务编号(org.skywaking.apm.testcase.dubbo.services.GreetService.doBusiness()注册后的ID)
+              "psn": "/dubbox-case/case/dubbox-rest", //上级的服务名
+              "ni": 0,  //上级调用时使用的地址注册后的ID
+              "nn": "172.25.0.4:20880", //上级的地址
+              "eii": 2, //入口的实例编号
+              "esi": 0, //入口的服务编号
+              "esn": "/dubbox-case/case/dubbox-rest", //入口的服务名词
+              "rn": 0 //调用方式(CrossProcess,CrossThread)
+            }
+          ],
+          "to": [
+            {
+              "k": "url",
+              "v": "rest://172.25.0.4:20880/org.skywaking.apm.testcase.dubbo.services.GreetService.doBusiness()"
+            },
+            {
+              "k": "http.method",
+              "v": "GET"
+            }
+          ],
+          "lo": []
+        },
+        {
+          "si": 1,
+          "tv": 1,
+          "lv": 1,
+          "ps": 0,
+          "st": 1501858094726,
+          "et": 1501858095804,
+          "ci": 9,
+          "cn": "",
+          "oi": 0,
+          "on": "mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]]",
+          "pi": 0,
+          "pn": "localhost:27017",
+          "ie": false,
+          "to": [],
+          "lo": []
+        }
+      ]
+    }
+  }
 ]
\ No newline at end of file
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/resources/json/instance-register-consumer.json b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/resources/json/instance-register-consumer.json
index e2cb6e068..6ef6a001a 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/resources/json/instance-register-consumer.json
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/resources/json/instance-register-consumer.json
@@ -1,14 +1,14 @@
-{
-  "ai": -1,
-  "au": "dubbox-consumer",
-  "rt": 1501858094526,
-  "oi": {
-    "osName": "MacOS XX",
-    "hostName": "pengys",
-    "processId": "1001",
-    "ipv4s": [
-      "10.0.0.3",
-      "10.0.0.4"
-    ]
-  }
+{
+  "ai": -1,
+  "au": "dubbox-consumer",
+  "rt": 1501858094526,
+  "oi": {
+    "osName": "MacOS XX",
+    "hostName": "pengys",
+    "processId": "1001",
+    "ipv4s": [
+      "10.0.0.3",
+      "10.0.0.4"
+    ]
+  }
 }
\ No newline at end of file
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/resources/json/instance-register-provider.json b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/resources/json/instance-register-provider.json
index 304de7c4f..f5ebba425 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/resources/json/instance-register-provider.json
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/resources/json/instance-register-provider.json
@@ -1,14 +1,14 @@
-{
-  "ai": 2,
-  "au": "dubbox-provider",
-  "rt": 1501858094526,
-  "oi": {
-    "osName": "MacOS X",
-    "hostName": "peng-yongsheng",
-    "processId": "1000",
-    "ipv4s": [
-      "10.0.0.1",
-      "10.0.0.2"
-    ]
-  }
+{
+  "ai": 2,
+  "au": "dubbox-provider",
+  "rt": 1501858094526,
+  "oi": {
+    "osName": "MacOS X",
+    "hostName": "peng-yongsheng",
+    "processId": "1000",
+    "ipv4s": [
+      "10.0.0.1",
+      "10.0.0.2"
+    ]
+  }
 }
\ No newline at end of file
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/resources/json/servicename-register-consumer.json b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/resources/json/servicename-register-consumer.json
index 9cc919204..1901bbd88 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/resources/json/servicename-register-consumer.json
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/resources/json/servicename-register-consumer.json
@@ -1,6 +1,6 @@
-[
-  {
-    "ai": -1,
-    "sn": "org.skywaking.apm.testcase.dubbo.services.GreetService.doBusiness()"
-  }
+[
+  {
+    "ai": -1,
+    "sn": "org.skywaking.apm.testcase.dubbo.services.GreetService.doBusiness()"
+  }
 ]
\ No newline at end of file
diff --git a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/resources/json/servicename-register-provider.json b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/resources/json/servicename-register-provider.json
index 0e9a96153..8f9498ce5 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/resources/json/servicename-register-provider.json
+++ b/apm-collector/apm-collector-agent/agent-jetty/agent-jetty-provider/src/test/resources/json/servicename-register-provider.json
@@ -1,6 +1,6 @@
-[
-  {
-    "ai": 2,
-    "sn": "org.skywaking.apm.testcase.dubbo.services.GreetService.doBusiness()"
-  }
+[
+  {
+    "ai": 2,
+    "sn": "org.skywaking.apm.testcase.dubbo.services.GreetService.doBusiness()"
+  }
 ]
\ No newline at end of file
diff --git a/apm-collector/apm-collector-agent/agent-jetty/pom.xml b/apm-collector/apm-collector-agent/agent-jetty/pom.xml
index 1dffb9b41..4e540f89e 100644
--- a/apm-collector/apm-collector-agent/agent-jetty/pom.xml
+++ b/apm-collector/apm-collector-agent/agent-jetty/pom.xml
@@ -1,35 +1,35 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You 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.
-  ~
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>apm-collector-agent</artifactId>
-        <groupId>org.apache.skywalking</groupId>
-        <version>5.0.0-beta2-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>agent-jetty</artifactId>
-    <packaging>pom</packaging>
-    <modules>
-        <module>agent-jetty-define</module>
-        <module>agent-jetty-provider</module>
-    </modules>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You 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.
+  ~
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>apm-collector-agent</artifactId>
+        <groupId>org.apache.skywalking</groupId>
+        <version>5.0.0-beta2-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>agent-jetty</artifactId>
+    <packaging>pom</packaging>
+    <modules>
+        <module>agent-jetty-define</module>
+        <module>agent-jetty-provider</module>
+    </modules>
 </project>
\ No newline at end of file
diff --git a/apm-collector/apm-collector-agent/pom.xml b/apm-collector/apm-collector-agent/pom.xml
index b515d74c4..d7c94a666 100644
--- a/apm-collector/apm-collector-agent/pom.xml
+++ b/apm-collector/apm-collector-agent/pom.xml
@@ -1,43 +1,43 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You 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.
-  ~
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>apm-collector</artifactId>
-        <groupId>org.apache.skywalking</groupId>
-        <version>5.0.0-beta2-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>apm-collector-agent</artifactId>
-    <packaging>pom</packaging>
-    <modules>
-        <module>agent-grpc</module>
-        <module>agent-jetty</module>
-    </modules>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.skywalking</groupId>
-            <artifactId>apm-collector-core</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-    </dependencies>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You 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.
+  ~
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>apm-collector</artifactId>
+        <groupId>org.apache.skywalking</groupId>
+        <version>5.0.0-beta2-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>apm-collector-agent</artifactId>
+    <packaging>pom</packaging>
+    <modules>
+        <module>agent-grpc</module>
+        <module>agent-jetty</module>
+    </modules>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.skywalking</groupId>
+            <artifactId>apm-collector-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
 </project>
\ No newline at end of file
diff --git a/apm-collector/apm-collector-analysis/analysis-alarm/alarm-define/pom.xml b/apm-collector/apm-collector-analysis/analysis-alarm/alarm-define/pom.xml
index 665532c11..843a81979 100644
--- a/apm-collector/apm-collector-analysis/analysis-alarm/alarm-define/pom.xml
+++ b/apm-collector/apm-collector-analysis/analysis-alarm/alarm-define/pom.xml
@@ -1,31 +1,31 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You 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.
-  ~
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>analysis-alarm</artifactId>
-        <groupId>org.apache.skywalking</groupId>
-        <version>5.0.0-beta2-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>alarm-define</artifactId>
-    <packaging>jar</packaging>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You 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.
+  ~
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>analysis-alarm</artifactId>
+        <groupId>org.apache.skywalking</groupId>
+        <version>5.0.0-beta2-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>alarm-define</artifactId>
+    <packaging>jar</packaging>
 </project>
\ No newline at end of file
diff --git a/apm-collector/apm-collector-analysis/analysis-alarm/alarm-define/src/main/java/org/apache/skywalking/apm/collector/analysis/alarm/define/AnalysisAlarmModule.java b/apm-collector/apm-collector-analysis/analysis-alarm/alarm-define/src/main/java/org/apache/skywalking/apm/collector/analysis/alarm/define/AnalysisAlarmModule.java
index 5b123a5f3..5486f6fb4 100644
--- a/apm-collector/apm-collector-analysis/analysis-alarm/alarm-define/src/main/java/org/apache/skywalking/apm/collector/analysis/alarm/define/AnalysisAlarmModule.java
+++ b/apm-collector/apm-collector-analysis/analysis-alarm/alarm-define/src/main/java/org/apache/skywalking/apm/collector/analysis/alarm/define/AnalysisAlarmModule.java
@@ -1,37 +1,37 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.analysis.alarm.define;
-
-import org.apache.skywalking.apm.collector.core.module.ModuleDefine;
-
-/**
- * @author peng-yongsheng
- */
-public class AnalysisAlarmModule extends ModuleDefine {
-
-    public static final String NAME = "analysis_alarm";
-
-    @Override public String name() {
-        return NAME;
-    }
-
-    @Override public Class[] services() {
-        return new Class[0];
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.collector.analysis.alarm.define;
+
+import org.apache.skywalking.apm.collector.core.module.ModuleDefine;
+
+/**
+ * @author peng-yongsheng
+ */
+public class AnalysisAlarmModule extends ModuleDefine {
+
+    public static final String NAME = "analysis_alarm";
+
+    @Override public String name() {
+        return NAME;
+    }
+
+    @Override public Class[] services() {
+        return new Class[0];
+    }
+}
diff --git a/apm-collector/apm-collector-analysis/analysis-alarm/alarm-define/src/main/java/org/apache/skywalking/apm/collector/analysis/alarm/define/graph/AlarmGraphIdDefine.java b/apm-collector/apm-collector-analysis/analysis-alarm/alarm-define/src/main/java/org/apache/skywalking/apm/collector/analysis/alarm/define/graph/AlarmGraphIdDefine.java
index 91cafc79a..23803a4eb 100644
--- a/apm-collector/apm-collector-analysis/analysis-alarm/alarm-define/src/main/java/org/apache/skywalking/apm/collector/analysis/alarm/define/graph/AlarmGraphIdDefine.java
+++ b/apm-collector/apm-collector-analysis/analysis-alarm/alarm-define/src/main/java/org/apache/skywalking/apm/collector/analysis/alarm/define/graph/AlarmGraphIdDefine.java
@@ -1,31 +1,31 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.analysis.alarm.define.graph;
-
-/**
- * @author peng-yongsheng
- */
-public class AlarmGraphIdDefine {
-    public static final int SERVICE_METRIC_ALARM_GRAPH_ID = 500;
-    public static final int INSTANCE_METRIC_ALARM_GRAPH_ID = 501;
-    public static final int APPLICATION_METRIC_ALARM_GRAPH_ID = 502;
-    public static final int SERVICE_REFERENCE_METRIC_ALARM_GRAPH_ID = 503;
-    public static final int INSTANCE_REFERENCE_METRIC_ALARM_GRAPH_ID = 504;
-    public static final int APPLICATION_REFERENCE_METRIC_ALARM_GRAPH_ID = 505;
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.collector.analysis.alarm.define.graph;
+
+/**
+ * @author peng-yongsheng
+ */
+public class AlarmGraphIdDefine {
+    public static final int SERVICE_METRIC_ALARM_GRAPH_ID = 500;
+    public static final int INSTANCE_METRIC_ALARM_GRAPH_ID = 501;
+    public static final int APPLICATION_METRIC_ALARM_GRAPH_ID = 502;
+    public static final int SERVICE_REFERENCE_METRIC_ALARM_GRAPH_ID = 503;
+    public static final int INSTANCE_REFERENCE_METRIC_ALARM_GRAPH_ID = 504;
+    public static final int APPLICATION_REFERENCE_METRIC_ALARM_GRAPH_ID = 505;
+}
diff --git a/apm-collector/apm-collector-analysis/analysis-alarm/alarm-define/src/main/java/org/apache/skywalking/apm/collector/analysis/alarm/define/graph/AlarmWorkerIdDefine.java b/apm-collector/apm-collector-analysis/analysis-alarm/alarm-define/src/main/java/org/apache/skywalking/apm/collector/analysis/alarm/define/graph/AlarmWorkerIdDefine.java
index d36427468..1b3d21e9e 100644
--- a/apm-collector/apm-collector-analysis/analysis-alarm/alarm-define/src/main/java/org/apache/skywalking/apm/collector/analysis/alarm/define/graph/AlarmWorkerIdDefine.java
+++ b/apm-collector/apm-collector-analysis/analysis-alarm/alarm-define/src/main/java/org/apache/skywalking/apm/collector/analysis/alarm/define/graph/AlarmWorkerIdDefine.java
@@ -1,73 +1,73 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.analysis.alarm.define.graph;
-
-/**
- * @author peng-yongsheng
- */
-public class AlarmWorkerIdDefine {
-    public static final int SERVICE_METRIC_ALARM_ASSERT_WORKER_ID = 5000;
-    public static final int SERVICE_METRIC_ALARM_GRAPH_BRIDGE_WORKER_ID = 5001;
-    public static final int SERVICE_METRIC_ALARM_REMOTE_WORKER_ID = 5002;
-    public static final int SERVICE_METRIC_ALARM_PERSISTENCE_WORKER_ID = 5003;
-    public static final int SERVICE_METRIC_ALARM_LIST_PERSISTENCE_WORKER_ID = 5004;
-    public static final int SERVICE_METRIC_ALARM_TO_LIST_NODE_PROCESSOR_ID = 5005;
-
-    public static final int INSTANCE_METRIC_ALARM_ASSERT_WORKER_ID = 5010;
-    public static final int INSTANCE_METRIC_ALARM_GRAPH_BRIDGE_WORKER_ID = 5011;
-    public static final int INSTANCE_METRIC_ALARM_REMOTE_WORKER_ID = 5012;
-    public static final int INSTANCE_METRIC_ALARM_PERSISTENCE_WORKER_ID = 5013;
-    public static final int INSTANCE_METRIC_ALARM_LIST_PERSISTENCE_WORKER_ID = 5014;
-    public static final int INSTANCE_METRIC_ALARM_TO_LIST_NODE_PROCESSOR_ID = 5015;
-
-    public static final int APPLICATION_METRIC_ALARM_ASSERT_WORKER_ID = 5020;
-    public static final int APPLICATION_METRIC_ALARM_GRAPH_BRIDGE_WORKER_ID = 5021;
-    public static final int APPLICATION_METRIC_ALARM_REMOTE_WORKER_ID = 5022;
-    public static final int APPLICATION_METRIC_ALARM_PERSISTENCE_WORKER_ID = 5023;
-    public static final int APPLICATION_METRIC_ALARM_TO_LIST_NODE_PROCESSOR_ID = 5024;
-
-    public static final int SERVICE_REFERENCE_METRIC_ALARM_ASSERT_WORKER_ID = 5030;
-    public static final int SERVICE_REFERENCE_METRIC_ALARM_GRAPH_BRIDGE_WORKER_ID = 5031;
-    public static final int SERVICE_REFERENCE_METRIC_ALARM_REMOTE_WORKER_ID = 5032;
-    public static final int SERVICE_REFERENCE_METRIC_ALARM_PERSISTENCE_WORKER_ID = 5033;
-    public static final int SERVICE_REFERENCE_METRIC_ALARM_LIST_PERSISTENCE_WORKER_ID = 5034;
-    public static final int SERVICE_REFERENCE_METRIC_ALARM_TO_LIST_NODE_PROCESSOR_ID = 5035;
-
-    public static final int INSTANCE_REFERENCE_METRIC_ALARM_ASSERT_WORKER_ID = 5040;
-    public static final int INSTANCE_REFERENCE_METRIC_ALARM_GRAPH_BRIDGE_WORKER_ID = 5041;
-    public static final int INSTANCE_REFERENCE_METRIC_ALARM_REMOTE_WORKER_ID = 5042;
-    public static final int INSTANCE_REFERENCE_METRIC_ALARM_PERSISTENCE_WORKER_ID = 5043;
-    public static final int INSTANCE_REFERENCE_METRIC_ALARM_LIST_PERSISTENCE_WORKER_ID = 5044;
-    public static final int INSTANCE_REFERENCE_METRIC_ALARM_TO_LIST_NODE_PROCESSOR_ID = 5045;
-
-    public static final int APPLICATION_REFERENCE_METRIC_ALARM_ASSERT_WORKER_ID = 5050;
-    public static final int APPLICATION_REFERENCE_METRIC_ALARM_GRAPH_BRIDGE_WORKER_ID = 5051;
-    public static final int APPLICATION_REFERENCE_METRIC_ALARM_REMOTE_WORKER_ID = 5052;
-    public static final int APPLICATION_REFERENCE_METRIC_ALARM_PERSISTENCE_WORKER_ID = 5053;
-    public static final int APPLICATION_REFERENCE_METRIC_ALARM_LIST_PERSISTENCE_WORKER_ID = 5054;
-    public static final int APPLICATION_REFERENCE_METRIC_ALARM_TO_LIST_NODE_PROCESSOR_ID = 5055;
-
-    public static final int APPLICATION_METRIC_ALARM_LIST_MINUTE_PERSISTENCE_WORKER_ID = 5051;
-    public static final int APPLICATION_METRIC_ALARM_LIST_HOUR_PERSISTENCE_WORKER_ID = 5052;
-    public static final int APPLICATION_METRIC_ALARM_LIST_DAY_PERSISTENCE_WORKER_ID = 5053;
-    public static final int APPLICATION_METRIC_ALARM_LIST_MONTH_PERSISTENCE_WORKER_ID = 5054;
-    public static final int APPLICATION_METRIC_ALARM_LIST_HOUR_TRANSFORM_NODE_ID = 5055;
-    public static final int APPLICATION_METRIC_ALARM_LIST_DAY_TRANSFORM_NODE_ID = 5056;
-    public static final int APPLICATION_METRIC_ALARM_LIST_MONTH_TRANSFORM_NODE_ID = 5057;
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.collector.analysis.alarm.define.graph;
+
+/**
+ * @author peng-yongsheng
+ */
+public class AlarmWorkerIdDefine {
+    public static final int SERVICE_METRIC_ALARM_ASSERT_WORKER_ID = 5000;
+    public static final int SERVICE_METRIC_ALARM_GRAPH_BRIDGE_WORKER_ID = 5001;
+    public static final int SERVICE_METRIC_ALARM_REMOTE_WORKER_ID = 5002;
+    public static final int SERVICE_METRIC_ALARM_PERSISTENCE_WORKER_ID = 5003;
+    public static final int SERVICE_METRIC_ALARM_LIST_PERSISTENCE_WORKER_ID = 5004;
+    public static final int SERVICE_METRIC_ALARM_TO_LIST_NODE_PROCESSOR_ID = 5005;
+
+    public static final int INSTANCE_METRIC_ALARM_ASSERT_WORKER_ID = 5010;
+    public static final int INSTANCE_METRIC_ALARM_GRAPH_BRIDGE_WORKER_ID = 5011;
+    public static final int INSTANCE_METRIC_ALARM_REMOTE_WORKER_ID = 5012;
+    public static final int INSTANCE_METRIC_ALARM_PERSISTENCE_WORKER_ID = 5013;
+    public static final int INSTANCE_METRIC_ALARM_LIST_PERSISTENCE_WORKER_ID = 5014;
+    public static final int INSTANCE_METRIC_ALARM_TO_LIST_NODE_PROCESSOR_ID = 5015;
+
+    public static final int APPLICATION_METRIC_ALARM_ASSERT_WORKER_ID = 5020;
+    public static final int APPLICATION_METRIC_ALARM_GRAPH_BRIDGE_WORKER_ID = 5021;
+    public static final int APPLICATION_METRIC_ALARM_REMOTE_WORKER_ID = 5022;
+    public static final int APPLICATION_METRIC_ALARM_PERSISTENCE_WORKER_ID = 5023;
+    public static final int APPLICATION_METRIC_ALARM_TO_LIST_NODE_PROCESSOR_ID = 5024;
+
+    public static final int SERVICE_REFERENCE_METRIC_ALARM_ASSERT_WORKER_ID = 5030;
+    public static final int SERVICE_REFERENCE_METRIC_ALARM_GRAPH_BRIDGE_WORKER_ID = 5031;
+    public static final int SERVICE_REFERENCE_METRIC_ALARM_REMOTE_WORKER_ID = 5032;
+    public static final int SERVICE_REFERENCE_METRIC_ALARM_PERSISTENCE_WORKER_ID = 5033;
+    public static final int SERVICE_REFERENCE_METRIC_ALARM_LIST_PERSISTENCE_WORKER_ID = 5034;
+    public static final int SERVICE_REFERENCE_METRIC_ALARM_TO_LIST_NODE_PROCESSOR_ID = 5035;
+
+    public static final int INSTANCE_REFERENCE_METRIC_ALARM_ASSERT_WORKER_ID = 5040;
+    public static final int INSTANCE_REFERENCE_METRIC_ALARM_GRAPH_BRIDGE_WORKER_ID = 5041;
+    public static final int INSTANCE_REFERENCE_METRIC_ALARM_REMOTE_WORKER_ID = 5042;
+    public static final int INSTANCE_REFERENCE_METRIC_ALARM_PERSISTENCE_WORKER_ID = 5043;
+    public static final int INSTANCE_REFERENCE_METRIC_ALARM_LIST_PERSISTENCE_WORKER_ID = 5044;
+    public static final int INSTANCE_REFERENCE_METRIC_ALARM_TO_LIST_NODE_PROCESSOR_ID = 5045;
+
+    public static final int APPLICATION_REFERENCE_METRIC_ALARM_ASSERT_WORKER_ID = 5050;
+    public static final int APPLICATION_REFERENCE_METRIC_ALARM_GRAPH_BRIDGE_WORKER_ID = 5051;
+    public static final int APPLICATION_REFERENCE_METRIC_ALARM_REMOTE_WORKER_ID = 5052;
+    public static final int APPLICATION_REFERENCE_METRIC_ALARM_PERSISTENCE_WORKER_ID = 5053;
+    public static final int APPLICATION_REFERENCE_METRIC_ALARM_LIST_PERSISTENCE_WORKER_ID = 5054;
+    public static final int APPLICATION_REFERENCE_METRIC_ALARM_TO_LIST_NODE_PROCESSOR_ID = 5055;
+
+    public static final int APPLICATION_METRIC_ALARM_LIST_MINUTE_PERSISTENCE_WORKER_ID = 5051;
+    public static final int APPLICATION_METRIC_ALARM_LIST_HOUR_PERSISTENCE_WORKER_ID = 5052;
+    public static final int APPLICATION_METRIC_ALARM_LIST_DAY_PERSISTENCE_WORKER_ID = 5053;
+    public static final int APPLICATION_METRIC_ALARM_LIST_MONTH_PERSISTENCE_WORKER_ID = 5054;
+    public static final int APPLICATION_METRIC_ALARM_LIST_HOUR_TRANSFORM_NODE_ID = 5055;
+    public static final int APPLICATION_METRIC_ALARM_LIST_DAY_TRANSFORM_NODE_ID = 5056;
+    public static final int APPLICATION_METRIC_ALARM_LIST_MONTH_TRANSFORM_NODE_ID = 5057;
+}
diff --git a/apm-collector/apm-collector-analysis/analysis-alarm/alarm-define/src/main/resources/META-INF/services/org.apache.skywalking.apm.collector.core.module.ModuleDefine b/apm-collector/apm-collector-analysis/analysis-alarm/alarm-define/src/main/resources/META-INF/services/org.apache.skywalking.apm.collector.core.module.ModuleDefine
index 5c95ca418..96e02c420 100644
--- a/apm-collector/apm-collector-analysis/analysis-alarm/alarm-define/src/main/resources/META-INF/services/org.apache.skywalking.apm.collector.core.module.ModuleDefine
+++ b/apm-collector/apm-collector-analysis/analysis-alarm/alarm-define/src/main/resources/META-INF/services/org.apache.skywalking.apm.collector.core.module.ModuleDefine
@@ -1,19 +1,19 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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.
-#
-#
-
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+#
+#
+
 org.apache.skywalking.apm.collector.analysis.alarm.define.AnalysisAlarmModule
\ No newline at end of file
diff --git a/apm-collector/apm-collector-analysis/analysis-alarm/alarm-provider/pom.xml b/apm-collector/apm-collector-analysis/analysis-alarm/alarm-provider/pom.xml
index 8977b1126..bf1bae5e8 100644
--- a/apm-collector/apm-collector-analysis/analysis-alarm/alarm-provider/pom.xml
+++ b/apm-collector/apm-collector-analysis/analysis-alarm/alarm-provider/pom.xml
@@ -1,64 +1,64 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You 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.
-  ~
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>analysis-alarm</artifactId>
-        <groupId>org.apache.skywalking</groupId>
-        <version>5.0.0-beta2-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>alarm-provider</artifactId>
-    <packaging>jar</packaging>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.skywalking</groupId>
-            <artifactId>alarm-define</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.skywalking</groupId>
-            <artifactId>metric-define</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.skywalking</groupId>
-            <artifactId>collector-configuration-define</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.skywalking</groupId>
-            <artifactId>collector-storage-define</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.skywalking</groupId>
-            <artifactId>collector-cache-define</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.skywalking</groupId>
-            <artifactId>analysis-worker-model</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-    </dependencies>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You 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.
+  ~
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>analysis-alarm</artifactId>
+        <groupId>org.apache.skywalking</groupId>
+        <version>5.0.0-beta2-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>alarm-provider</artifactId>
+    <packaging>jar</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.skywalking</groupId>
+            <artifactId>alarm-define</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.skywalking</groupId>
+            <artifactId>metric-define</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.skywalking</groupId>
+            <artifactId>collector-configuration-define</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.skywalking</groupId>
+            <artifactId>collector-storage-define</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.skywalking</groupId>
+            <artifactId>collector-cache-define</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.skywalking</groupId>
+            <artifactId>analysis-worker-model</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
 </project>
\ No newline at end of file
diff --git a/apm-collector/apm-collector-analysis/analysis-alarm/alarm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/alarm/provider/AnalysisAlarmModuleConfig.java b/apm-collector/apm-collector-analysis/analysis-alarm/alarm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/alarm/provider/AnalysisAlarmModuleConfig.java
index 7df976a12..708f6cf25 100644
--- a/apm-collector/apm-collector-analysis/analysis-alarm/alarm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/alarm/provider/AnalysisAlarmModuleConfig.java
+++ b/apm-collector/apm-collector-analysis/analysis-alarm/alarm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/alarm/provider/AnalysisAlarmModuleConfig.java
@@ -1,27 +1,27 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.analysis.alarm.provider;
-
-import org.apache.skywalking.apm.collector.core.module.ModuleConfig;
-
-/**
- * @author peng-yongsheng
- */
-class AnalysisAlarmModuleConfig extends ModuleConfig {
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.collector.analysis.alarm.provider;
+
+import org.apache.skywalking.apm.collector.core.module.ModuleConfig;
+
+/**
+ * @author peng-yongsheng
+ */
+class AnalysisAlarmModuleConfig extends ModuleConfig {
+}
diff --git a/apm-collector/apm-collector-analysis/analysis-alarm/alarm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/alarm/provider/AnalysisAlarmModuleProvider.java b/apm-collector/apm-collector-analysis/analysis-alarm/alarm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/alarm/provider/AnalysisAlarmModuleProvider.java
index eef4b2c67..4827c3d59 100644
--- a/apm-collector/apm-collector-analysis/analysis-alarm/alarm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/alarm/provider/AnalysisAlarmModuleProvider.java
+++ b/apm-collector/apm-collector-analysis/analysis-alarm/alarm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/alarm/provider/AnalysisAlarmModuleProvider.java
@@ -1,115 +1,115 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.analysis.alarm.provider;
-
-import org.apache.skywalking.apm.collector.analysis.alarm.define.AnalysisAlarmModule;
-import org.apache.skywalking.apm.collector.analysis.alarm.provider.worker.application.ApplicationMetricAlarmGraph;
-import org.apache.skywalking.apm.collector.analysis.alarm.provider.worker.application.ApplicationReferenceMetricAlarmGraph;
-import org.apache.skywalking.apm.collector.analysis.alarm.provider.worker.instance.InstanceMetricAlarmGraph;
-import org.apache.skywalking.apm.collector.analysis.alarm.provider.worker.instance.InstanceReferenceMetricAlarmGraph;
-import org.apache.skywalking.apm.collector.analysis.alarm.provider.worker.service.ServiceMetricAlarmGraph;
-import org.apache.skywalking.apm.collector.analysis.alarm.provider.worker.service.ServiceReferenceMetricAlarmGraph;
-import org.apache.skywalking.apm.collector.analysis.metric.define.AnalysisMetricModule;
-import org.apache.skywalking.apm.collector.analysis.worker.model.base.WorkerCreateListener;
-import org.apache.skywalking.apm.collector.analysis.worker.timer.PersistenceTimer;
-import org.apache.skywalking.apm.collector.configuration.ConfigurationModule;
-import org.apache.skywalking.apm.collector.core.module.ModuleDefine;
-import org.apache.skywalking.apm.collector.core.module.ModuleConfig;
-import org.apache.skywalking.apm.collector.core.module.ModuleProvider;
-import org.apache.skywalking.apm.collector.remote.RemoteModule;
-import org.apache.skywalking.apm.collector.remote.service.RemoteDataRegisterService;
-import org.apache.skywalking.apm.collector.storage.StorageModule;
-import org.apache.skywalking.apm.collector.storage.table.alarm.ApplicationAlarm;
-import org.apache.skywalking.apm.collector.storage.table.alarm.ApplicationAlarmList;
-import org.apache.skywalking.apm.collector.storage.table.alarm.InstanceAlarm;
-import org.apache.skywalking.apm.collector.storage.table.alarm.InstanceAlarmList;
-import org.apache.skywalking.apm.collector.storage.table.alarm.ServiceAlarm;
-import org.apache.skywalking.apm.collector.storage.table.alarm.ServiceAlarmList;
-
-/**
- * @author peng-yongsheng
- */
-public class AnalysisAlarmModuleProvider extends ModuleProvider {
-
-    private final AnalysisAlarmModuleConfig config;
-
-    public AnalysisAlarmModuleProvider() {
-        super();
-        this.config = new AnalysisAlarmModuleConfig();
-    }
-
-    @Override public String name() {
-        return "default";
-    }
-
-    @Override public Class<? extends ModuleDefine> module() {
-        return AnalysisAlarmModule.class;
-    }
-
-    @Override public ModuleConfig createConfigBeanIfAbsent() {
-        return config;
-    }
-
-    @Override public void prepare() {
-    }
-
-    @Override public void start() {
-        WorkerCreateListener workerCreateListener = new WorkerCreateListener();
-
-        ServiceMetricAlarmGraph serviceMetricAlarmGraph = new ServiceMetricAlarmGraph(getManager(), workerCreateListener);
-        serviceMetricAlarmGraph.create();
-
-        InstanceMetricAlarmGraph instanceMetricAlarmGraph = new InstanceMetricAlarmGraph(getManager(), workerCreateListener);
-        instanceMetricAlarmGraph.create();
-
-        ApplicationMetricAlarmGraph applicationMetricAlarmGraph = new ApplicationMetricAlarmGraph(getManager(), workerCreateListener);
-        applicationMetricAlarmGraph.create();
-
-        ServiceReferenceMetricAlarmGraph serviceReferenceMetricAlarmGraph = new ServiceReferenceMetricAlarmGraph(getManager(), workerCreateListener);
-        serviceReferenceMetricAlarmGraph.create();
-
-        InstanceReferenceMetricAlarmGraph instanceReferenceMetricAlarmGraph = new InstanceReferenceMetricAlarmGraph(getManager(), workerCreateListener);
-        instanceReferenceMetricAlarmGraph.create();
-
-        ApplicationReferenceMetricAlarmGraph applicationReferenceMetricAlarmGraph = new ApplicationReferenceMetricAlarmGraph(getManager(), workerCreateListener);
-        applicationReferenceMetricAlarmGraph.create();
-
-        registerRemoteData();
-
-        PersistenceTimer.INSTANCE.start(getManager(), workerCreateListener.getPersistenceWorkers());
-    }
-
-    @Override public void notifyAfterCompleted() {
-    }
-
-    @Override public String[] requiredModules() {
-        return new String[] {RemoteModule.NAME, AnalysisMetricModule.NAME, ConfigurationModule.NAME, StorageModule.NAME};
-    }
-
-    private void registerRemoteData() {
-        RemoteDataRegisterService remoteDataRegisterService = getManager().find(RemoteModule.NAME).getService(RemoteDataRegisterService.class);
-        remoteDataRegisterService.register(ApplicationAlarm.class, new ApplicationAlarm.InstanceCreator());
-        remoteDataRegisterService.register(ApplicationAlarmList.class, new ApplicationAlarmList.InstanceCreator());
-        remoteDataRegisterService.register(InstanceAlarm.class, new InstanceAlarm.InstanceCreator());
-        remoteDataRegisterService.register(InstanceAlarmList.class, new InstanceAlarmList.InstanceCreator());
-        remoteDataRegisterService.register(ServiceAlarm.class, new ServiceAlarm.InstanceCreator());
-        remoteDataRegisterService.register(ServiceAlarmList.class, new ServiceAlarmList.InstanceCreator());
-
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.collector.analysis.alarm.provider;
+
+import org.apache.skywalking.apm.collector.analysis.alarm.define.AnalysisAlarmModule;
+import org.apache.skywalking.apm.collector.analysis.alarm.provider.worker.application.ApplicationMetricAlarmGraph;
+import org.apache.skywalking.apm.collector.analysis.alarm.provider.worker.application.ApplicationReferenceMetricAlarmGraph;
+import org.apache.skywalking.apm.collector.analysis.alarm.provider.worker.instance.InstanceMetricAlarmGraph;
+import org.apache.skywalking.apm.collector.analysis.alarm.provider.worker.instance.InstanceReferenceMetricAlarmGraph;
+import org.apache.skywalking.apm.collector.analysis.alarm.provider.worker.service.ServiceMetricAlarmGraph;
+import org.apache.skywalking.apm.collector.analysis.alarm.provider.worker.service.ServiceReferenceMetricAlarmGraph;
+import org.apache.skywalking.apm.collector.analysis.metric.define.AnalysisMetricModule;
+import org.apache.skywalking.apm.collector.analysis.worker.model.base.WorkerCreateListener;
+import org.apache.skywalking.apm.collector.analysis.worker.timer.PersistenceTimer;
+import org.apache.skywalking.apm.collector.configuration.ConfigurationModule;
+import org.apache.skywalking.apm.collector.core.module.ModuleDefine;
+import org.apache.skywalking.apm.collector.core.module.ModuleConfig;
+import org.apache.skywalking.apm.collector.core.module.ModuleProvider;
+import org.apache.skywalking.apm.collector.remote.RemoteModule;
+import org.apache.skywalking.apm.collector.remote.service.RemoteDataRegisterService;
+import org.apache.skywalking.apm.collector.storage.StorageModule;
+import org.apache.skywalking.apm.collector.storage.table.alarm.ApplicationAlarm;
+import org.apache.skywalking.apm.collector.storage.table.alarm.ApplicationAlarmList;
+import org.apache.skywalking.apm.collector.storage.table.alarm.InstanceAlarm;
+import org.apache.skywalking.apm.collector.storage.table.alarm.InstanceAlarmList;
+import org.apache.skywalking.apm.collector.storage.table.alarm.ServiceAlarm;
+import org.apache.skywalking.apm.collector.storage.table.alarm.ServiceAlarmList;
+
+/**
+ * @author peng-yongsheng
+ */
+public class AnalysisAlarmModuleProvider extends ModuleProvider {
+
+    private final AnalysisAlarmModuleConfig config;
+
+    public AnalysisAlarmModuleProvider() {
+        super();
+        this.config = new AnalysisAlarmModuleConfig();
+    }
+
+    @Override public String name() {
+        return "default";
+    }
+
+    @Override public Class<? extends ModuleDefine> module() {
+        return AnalysisAlarmModule.class;
+    }
+
+    @Override public ModuleConfig createConfigBeanIfAbsent() {
+        return config;
+    }
+
+    @Override public void prepare() {
+    }
+
+    @Override public void start() {
+        WorkerCreateListener workerCreateListener = new WorkerCreateListener();
+
+        ServiceMetricAlarmGraph serviceMetricAlarmGraph = new ServiceMetricAlarmGraph(getManager(), workerCreateListener);
+        serviceMetricAlarmGraph.create();
+
+        InstanceMetricAlarmGraph instanceMetricAlarmGraph = new InstanceMetricAlarmGraph(getManager(), workerCreateListener);
+        instanceMetricAlarmGraph.create();
+
+        ApplicationMetricAlarmGraph applicationMetricAlarmGraph = new ApplicationMetricAlarmGraph(getManager(), workerCreateListener);
+        applicationMetricAlarmGraph.create();
+
+        ServiceReferenceMetricAlarmGraph serviceReferenceMetricAlarmGraph = new ServiceReferenceMetricAlarmGraph(getManager(), workerCreateListener);
+        serviceReferenceMetricAlarmGraph.create();
+
+        InstanceReferenceMetricAlarmGraph instanceReferenceMetricAlarmGraph = new InstanceReferenceMetricAlarmGraph(getManager(), workerCreateListener);
+        instanceReferenceMetricAlarmGraph.create();
+
+        ApplicationReferenceMetricAlarmGraph applicationReferenceMetricAlarmGraph = new ApplicationReferenceMetricAlarmGraph(getManager(), workerCreateListener);
+        applicationReferenceMetricAlarmGraph.create();
+
+        registerRemoteData();
+
+        PersistenceTimer.INSTANCE.start(getManager(), workerCreateListener.getPersistenceWorkers());
+    }
+
+    @Override public void notifyAfterCompleted() {
+    }
+
+    @Override public String[] requiredModules() {
+        return new String[] {RemoteModule.NAME, AnalysisMetricModule.NAME, ConfigurationModule.NAME, StorageModule.NAME};
+    }
+
+    private void registerRemoteData() {
+        RemoteDataRegisterService remoteDataRegisterService = getManager().find(RemoteModule.NAME).getService(RemoteDataRegisterService.class);
+        remoteDataRegisterService.register(ApplicationAlarm.class, new ApplicationAlarm.InstanceCreator());
+        remoteDataRegisterService.register(ApplicationAlarmList.class, new ApplicationAlarmList.InstanceCreator());
+        remoteDataRegisterService.register(InstanceAlarm.class, new InstanceAlarm.InstanceCreator());
+        remoteDataRegisterService.register(InstanceAlarmList.class, new InstanceAlarmList.InstanceCreator());
+        remoteDataRegisterService.register(ServiceAlarm.class, new ServiceAlarm.InstanceCreator());
+        remoteDataRegisterService.register(ServiceAlarmList.class, new ServiceAlarmList.InstanceCreator());
+
+    }
+}
diff --git a/apm-collector/apm-collector-analysis/analysis-alarm/alarm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/alarm/provider/worker/AlarmAssertWorker.java b/apm-collector/apm-collector-analysis/analysis-alarm/alarm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/alarm/provider/worker/AlarmAssertWorker.java
index 13a3bfd2b..0c6860ebe 100644
--- a/apm-collector/apm-collector-analysis/analysis-alarm/alarm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/alarm/provider/worker/AlarmAssertWorker.java
+++ b/apm-collector/apm-collector-analysis/analysis-alarm/alarm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/alarm/provider/worker/AlarmAssertWorker.java
@@ -1,124 +1,124 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.apm.collector.analysis.alarm.provider.worker;
-
-import org.apache.skywalking.apm.collector.analysis.worker.model.base.AbstractLocalAsyncWorker;
-import org.apache.skywalking.apm.collector.analysis.worker.model.base.WorkerException;
-import org.apache.skywalking.apm.collector.core.data.StreamData;
-import org.apache.skywalking.apm.collector.core.module.ModuleManager;
-import org.apache.skywalking.apm.collector.core.util.Const;
-import org.apache.skywalking.apm.collector.core.util.NumberFormatUtils;
-import org.apache.skywalking.apm.collector.storage.table.Metric;
-import org.apache.skywalking.apm.collector.storage.table.MetricSource;
-import org.apache.skywalking.apm.collector.storage.table.alarm.Alarm;
-import org.apache.skywalking.apm.collector.storage.table.alarm.AlarmType;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author peng-yongsheng
- */
-public abstract class AlarmAssertWorker<INPUT extends StreamData & Metric, OUTPUT extends StreamData & Alarm> extends AbstractLocalAsyncWorker<INPUT, OUTPUT> {
-
-    private static final Logger logger = LoggerFactory.getLogger(AlarmAssertWorker.class);
-
-    public AlarmAssertWorker(ModuleManager moduleManager) {
-        super(moduleManager);
-    }
-
-    @Override protected final void onWork(INPUT inputMetric) throws WorkerException {
-        errorRateAlarmAssert(inputMetric);
-        averageResponseTimeAlarmAssert(inputMetric);
-    }
-
-    protected abstract OUTPUT newAlarmObject(String id, INPUT inputMetric);
-

  (This diff was longer than 20,000 lines, and has been truncated...)


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services