您的位置 首页 golang

3个开源分布式跟踪系统,都很不错!

分布式 跟踪系统使用户能够通过分布在多个应用程序,服务和数据库以及代理等中介上的软件系统来跟踪请求。这样可以更深入地了解软件系统中发生的情况。这些系统生成图形表示,显示请求在每个步骤上花费了多少时间并列出每个已知步骤。

3个开源分布式跟踪系统,都很不错!

用户可以确定系统在哪里遇到延迟或阻塞。当请求开始失败时,操作员和开发人员可以确切地看到问题的开始位置,而不是像二进制搜索树那样测试系统。这还可以揭示从部署到部署可能发生的性能变化。通过警告异常行为而不是让客户告诉你,最好自动捕获回归。

跟踪事件是如何工作的?每个请求都会获得一个特殊的ID,通常会将其注入到标头中。此ID唯一标识该事务。此事务通常称为跟踪。跟踪是整个事务的整体抽象概念。每个跟踪都由span组成。这些span是正在执行的实际工作,如服务调用或数据库请求。每个span也有一个唯一的ID。span可以创建称为子span的后续span,并且子span可以具有多个父级。

OpenTracing API

OpenTracing是一种源自Zipkin的规范,旨在提供跨平台兼容性。它提供了供应商中立的API,用于向应用程序添加跟踪并将数据传递到分布式跟踪系统。为OpenTracing规范编写的库可以与任何符合OpenTracing的系统一起使用。Zipkin,Jaeger和Appdash是采用开放标准的开源工具的例子,但即使是像Datadog和Instana这样的专有工具也在采用它。随着OpenTracing无处不在,这种情况有望继续下去。

OpenCensus

有OpenTracing,但是OpenCensus呢?它是竞争标准,完全不同的东西,还是互补的东西?

OpenTracing专注于建立开放的API和规范,而不是针对每种语言和跟踪系统的开放实现。OpenCensus不仅提供规范,还提供语言实现和有线协议。它还包括通过包含通常在分布式跟踪系统范围之外的其他度量标准来进行跟踪。

OpenCensus允许在运行应用程序的主机上查看数据,但它还具有可插拔的导出系统,用于将数据导出到中央聚合器。

二者有重叠。一个不一定比另一个好,但重要的是要知道每个做什么和不做什么。OpenTracing主要是一个规范。OpenCensus为本地组件提供了一种整体方法,具有更多的观点,但仍需要其他系统进行远程聚合。

Zipkin

是最早的此类系统之一。它是由Twitter基于 Google Dapper论文开发的,内容涉及Google使用的内部系统。Zipkin是使用Java编写的,它可以使用Cassandra或 ElasticSearch 作为可扩展的后端。大多数公司应该对其中一种选择感到满意。支持最低的Java版本是Java 6.它还使用 Thrift 二进制通信协议,该协议在Twitter堆栈中很流行,并作为Apache项目托管。

该系统由reporters(客户端),收集器(collectors),查询服务和Web UI组成。Zipkin通过在事务上下文中仅传输跟踪ID来通知接收者正在进行跟踪,从而保证生产中的安全。然后将每个报告器中收集的数据异步传输到收集器。收集器将这些span存储在数据库中,并且Web UI以可使用的格式将该数据呈现给最终用户。向收集器传递数据可以通过三种不同的方法进行:HTTP, Kafka Scribe

Zipkin与OpenTracing标准兼容,流行的Spring框架有一个名为Spring Cloud Sleuth的组件,它与Zipkin兼容。

Jaeger

Jaeger是Uber Technologies的一个新项目,CNCF已将其作为孵化项目采用。它是用Golang编写的,因此你不必担心在主机上安装依赖项或者解释器或语言虚拟机的任何开销。与Zipkin类似,Jaeger也支持Cassandra和ElasticSearch作为可扩展的存储后端。Jaeger还完全兼容OpenTracing标准。

Jaeger的架构与Zipkin类似,包括客户端(reporters),收集器,查询服务和Web UI,但它在每个主机上都有一个本地聚合数据的代理。代理通过UDP连接接收数据,并将其批处理并发送给收集器。收集器以Thrift协议的形式接收该数据,并将该数据存储在Cassandra或ElasticSearch中。查询服务可以直接访问数据存储并将该信息提供给Web UI。

默认情况下,用户不会从Jaeger客户端获取所有跟踪。系统会对通过每个客户端的0.1%(1/1000)跟踪进行采样。保留和传输所有跟踪对于大多数系统来说有点压力。但是,可以通过配置客户端进行配置的代理来增加或减少这种情况。然而,这种抽样并不是完全随机的,它正在变得越来越好。Jaeger使用概率抽样,试图对是否应该对新踪迹进行抽样进行有根据的猜测。自适应采样是其路线图,它将通过添加额外的上下文来制定决策来改进采样算法。

Appdash

Appdash是一个用Golang编写的分布式跟踪系统,就像Jaeger一样。它是由Sourcegraph基于Google的Dapper和Twitter的Zipkin创建的。与Jaeger和Zipkin类似,Appdash支持OpenTracing标准。

Appdash的架构主要由三个部分组成:客户端,本地收集器和远程收集器。没有很多文档,所以这个描述来自测试系统和查看代码。Appdash中的客户端会添加到你的代码中。 Appdash提供Python,Golang和Ruby实现,但OpenTracing库可以与Appdash的OpenTracing实现一起使用。客户端收集span并将它们发送到本地收集器。然后,本地收集器将数据发送到运行其自己的本地收集器的集中式Appdash服务器,该收集器是系统中所有其他节点的远程收集器。

文章来源:智云一二三科技

文章标题:3个开源分布式跟踪系统,都很不错!

文章地址:https://www.zhihuclub.com/100492.shtml

关于作者: 智云科技

热门文章

评论已关闭

30条评论

  1. In a candid interview to be published this week, the couple share their grueling journey with the disease and their love for each other Comparison of patient and histological characteristics between groups was obtained by the П‡ 2 test in relevant contingency tables

  2. 2005 Aug; 98 2 274 80 Two new agents, EM 652 and LY 353381 Arzoxifene, are particularly attractive in that they might be at least as efficacious as tamoxifen 37, 38

  3. 68382 0003 Azathioprine Zydus Pharmaceuticals USA Inc All oral versions of ondansetron should be stored in the original, labeled container at room temperature

  4. Strikingly, quantification of EGFP AQP2 enriched endosomal structures that tubulated Fig For example, this occurs with congenital absence of the vas deferent in cystic fibrosis

  5. Developed by researchers at the National Institutes of Health s National Heart, Lung, and Blood Institute, the Dietary Approaches to Stop Hypertension DASH diet is based on a large scale research study that identified the foods that affect blood pressure see the National Institutes of Health s Web site for more information The genomic mapping of ER binding sites has provided insight into how ER functions in breast cancer cells, including the finding that ER rarely binds to promoter regions and that loading of ER on the chromatin requires the presence of pioneer factors, such as FoxA1 refs 2 4

  6. P in and P out were changed in parallel, and the amplitude and frequency of contractions were determined by measurement of vessel diameter between the 2 valves

  7. To identify the region responsible for the different nisoldipine sensitivity, all possible chimeras of О± 1C a named HK1 and О± 1C b named LK1 subunits were constructed termed LK2 to LK8, LK10, LK12, and HK2 Fig 1B and functionally expressed in the absence of auxiliary subunits

  8. Gong Y, Murphy LC, Murphy LJ The investigators recruited 19 patients with an Eastern Cooperative Oncology Group ECOG performance status of 2 with advanced nonleukemic cancers

  9. The four girls accompanied Luo Jia is parents to make dumplings In surviving patients, morbidity can be substantial in a third of the patients, but the remaining patients have good potential for recovery after rehabilitation

  10. Rotator cuff disease is most often a repetitive strain injury, with onset due to overuse and cumulative damage to the rotator cuff tendons 9

  11. Last week, for example, I was sitting in class when this voice told me that the boy sitting behind me was planning to attack me after school

  12. This peptide will show far greater benefits when used as part of a long term anti aging plan Hormone Replacement Therapy HRT or in conjunction with other medications used to enhance performance

  13. Abscess fluid was submitted for culture, species identification of isolates, and susceptibility testing in accordance with Clinical and Laboratory Standards Institute approved methods 9 by the clinical microbiology laboratory at each participating institution Protection of Personal Information

  14. Fifty participants who met the inclusion criteria were randomly divided into the DF group n 25 and control group n 25

  15. Interestingly, expression of STAT5, but not STAT1, was detected in STAT3 knockout MCF 7 cells compared to control MCF 7 cells Figure 4D The FDA has not approved the use of high dose vitamin C as a treatment for cancer

  16. Undetectable antimГјllerian hormone levels and recovery of chemotherapy induced ovarian failure in women with breast cancer on an oral aromatase inhibitor

  17. Najak ZD, Harris EM, et al Pulmonary effects of furosemide in preterm infants with lung disease

  18. Cre mediated recombination was also analyzed by PCR in RU486 treated mice inheriting О±MHC CrePR1, the ROSA26 Cre reporter gene, or both Figure 4B

  19. Therefore, it must only be recognized for use within the parameters for which it has been authorized

网站地图