首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >链路追踪 SkyWalking 源码分析 —— Collector Client Component 客户端组件

链路追踪 SkyWalking 源码分析 —— Collector Client Component 客户端组件

作者头像
芋道源码
发布2019-06-21 13:17:39
6050
发布2019-06-21 13:17:39
举报
文章被收录于专栏:芋道源码1024芋道源码1024

摘要: 原创出处 http://www.iocoder.cn/SkyWalking/collector-client-component/ 「芋道源码」欢迎转载,保留摘要,谢谢!

本文主要基于 SkyWalking 3.2.6 正式版

  • 1. 概述
  • 2. Client
  • 3. ElasticSearchClient
  • 4. GRPCClient
  • 5. H2Client
  • 6. RedisClient
  • 7. ZookeeperClient
  • 666. 彩蛋

1. 概述

本文主要分享 SkyWalking Collector Client Component 客户端组件。Collector 通过客户端,和其他服务进行通信,例如 Elastic Search 、Zookeeper 、H2 等等。

Client Component 在 SkyWalking 架构图处于如下位置( 红框 ) :

FROM https://github.com/apache/incubating-skywalking

下面我们来看看整体的项目结构,如下图所示 :

OK,我们从接口到实现的顺序进行分享。

2. Client

org.skywalking.apm.collector.client.Client ,客户端接口。其定义接口方法如下:

  • #initialize() 方法,初始化客户端。
  • #shutdown() 方法,关闭客户端。

Client 的实现类,如下类图:

3. ElasticSearchClient

org.skywalking.apm.collector.client.elasticsearch.ElasticSearchClient ,Elastic Search 客户端。

基于 org.elasticsearch.client.transport5.5.0 版本,封装 SkyWalking 需要的 Elastic Search 操作。目前用于 collector-storage-es-provider 模块。

4. GRPCClient

org.skywalking.apm.collector.client.grpc.GRPCClient ,gRPC 客户端。

基于 io.grpc.grpc-core1.8.0 版本,封装 SkyWalking 需要的 gRPC 操作。目前用于 collector-remote-grpc-provider 模块。

5. H2Client

org.skywalking.apm.collector.client.h2.H2Client ,H2 数据库客户端。

基于 com.h2database.h21.4.196 版本,封装 SkyWalking 需要的 H2 数据库操作。目前用于 collector-storage-h2-provider / collector-cluster-standalone-provider 模块。

6. RedisClient

org.skywalking.apm.collector.client.redis.RedisClient ,Redis 客户端。

基于 redis.clients.jedis2.9.0 版本,封装 SkyWalking 需要的 Reids 操作。预计未来用于 collector-cluster-redis-provider 模块。

7. ZookeeperClient

org.skywalking.apm.collector.client.zookeeper.ZookeeperClient ,Zookeeper 客户端。

基于 org.apache.zookeeper.zookeeper3.4.10 版本,封装 SkyWalking 需要的 Zookeeper 操作。预计未来用于 collector-cluster-zookeeper-provider 模块。



本文参与 腾讯云自媒体分享计划,分享自微信公众号。
原始发表:2019-03-28,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 芋道源码 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 1. 概述
  • 2. Client
  • 3. ElasticSearchClient
  • 4. GRPCClient
  • 5. H2Client
  • 6. RedisClient
  • 7. ZookeeperClient
相关产品与服务
云数据库 Redis
腾讯云数据库 Redis(TencentDB for Redis)是腾讯云打造的兼容 Redis 协议的缓存和存储服务。丰富的数据结构能帮助您完成不同类型的业务场景开发。支持主从热备,提供自动容灾切换、数据备份、故障迁移、实例监控、在线扩容、数据回档等全套的数据库服务。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档