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/07/24 01:18:02 UTC

[GitHub] wu-sheng closed pull request #1487: Add Component-libraries-extend-CN.md

wu-sheng closed pull request #1487:  Add Component-libraries-extend-CN.md
URL: https://github.com/apache/incubator-skywalking/pull/1487
 
 
   

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/docs/README_ZH.md b/docs/README_ZH.md
index 823c822ac..a698e6e75 100644
--- a/docs/README_ZH.md
+++ b/docs/README_ZH.md
@@ -19,6 +19,7 @@
     * [开启TLS](cn/TLS-CN.md)
     * [命名空间隔离](cn/Namespace-CN.md)
     * [基于Token认证](cn/Token-auth-CN.md)
+    * [添加自定义组件库](cn/Component-libraries-extend-CN.md)
   * 孵化特性
     * [个性化服务过滤](../apm-sniffer/optional-plugins/trace-ignore-plugin/README_CN.md)
     * [使用Shardingjdbc作为存储实现](cn/Use-ShardingJDBC-as-storage-implementor-CN.md)
diff --git a/docs/cn/Component-libraries-extend-CN.md b/docs/cn/Component-libraries-extend-CN.md
new file mode 100644
index 000000000..7ec9f2e28
--- /dev/null
+++ b/docs/cn/Component-libraries-extend-CN.md
@@ -0,0 +1,59 @@
+# 组件库设置
+组件库设置的作用是将自定义或第三方库添加到组件库中,并监听应用程序
+
+在agent和SDK中,ID或者name都可以定义库的身份标识(例如 SpringMVC),不过collector对ID类型做了格式化数据处理,性能方面有所提高,存储占用更少
+
+此外,collector会根据组件库的依赖包去推测远程服务名称,例如: 若MySQL驱动库作为组件库,那collector会推测远程服务为Mysql服务
+
+针对这两个原因,collector需要在文件中添加两个地方的配置
+1. 组件库ID,名称和开发语言.
+1. 基于本地库的远程服务映射.
+
+**必须要在文件中定义所有组件名称和ID**
+
+## 组件库id
+被监控的应用程序中所定义的组件库的名称和ID,它们提供了双向映射,在agent或者SDK可以使用ID来表示上行链路数据的组件名称.
+
+- name: 组件名称
+- id: 唯一标识
+- languages: 组件的开发语言,若包含多个开发语言,请用`,`分割
+
+### ID的保留规则
+- Java及多语言共享区间: (0, 3000]
+- .NET平台保留区间: (3000, 4000]
+- Node.js保留区间: (4000, 5000]
+- Go 保留区间: (5000, 6000]
+- PHP 保留区间: (6000, 7000]
+
+示例
+```yaml
+Tomcat:
+  id: 1
+  languages: Java
+HttpClient:
+  id: 2
+  languages: Java,C#,Node.js
+Dubbo:
+  id: 3
+  languages: Java
+H2:
+  id: 4
+  languages: Java
+```
+
+## 远程服务映射
+
+本地组件可以推荐出远程服务,而这种映射关系是基于组件名称.
+
+- Key: 客户端组件库名称
+- Value: 服务端组件库名称
+
+```yaml
+Component-Server-Mappings:
+  Jedis: Redis
+  StackExchange.Redis: Redis
+  SqlClient: SqlServer
+  Npgsql: PostgreSQL
+  MySqlConnector: Mysql
+  EntityFrameworkCore.InMemory: InMemoryDatabase
+```
\ No newline at end of file


 

----------------------------------------------------------------
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