Merge pull request #21727 from geekpi/translating

translating
This commit is contained in:
geekpi 2021-04-26 08:40:58 +08:00 committed by GitHub
commit 0dab9b2790
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 156 additions and 157 deletions

View File

@ -1,157 +0,0 @@
[#]: subject: (Application observability with Apache Kafka and SigNoz)
[#]: via: (https://opensource.com/article/21/4/observability-apache-kafka-signoz)
[#]: author: (Nitish Tiwari https://opensource.com/users/tiwarinitish86)
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
Application observability with Apache Kafka and SigNoz
======
SigNoz helps developers start meeting their observability goals quickly
and with minimum effort.
![Ship captain sailing the Kubernetes seas][1]
SigNoz is an open source application observability platform. Built in React and Go, SigNoz is written from the ground up to allow developers to get started with their observability goals as soon as possible and with minimum effort.
This article looks at the software in detail, including the architecture, Kubernetes-based deployment, and some common SigNoz uses.
### SigNoz architecture
SigNoz ties several components together to create a scalable, loosely coupled system that is easy to get started with. Some of the most important components are:
* OpenTelemetry Collector
* Apache Kafka
* Apache Druid
[OpenTelemetry Collector][2] is the trace or metrics data collection engine. This enables SigNoz to ingest data in industry-standard formats, including Jaeger, Zipkin, and OpenConsensus. Then the collected data is forwarded to Apache Kafka.
SigNoz uses Kafka and stream processors for real-time ingestion of high volumes of observability data. This data is then passed on to Apache Druid, which excels at storing such data for short- and long-term SQL analysis.
Once the data is flattened and stored in Druid, SigNoz's query service can query and pass the data to the SigNoz React frontend. The front end then creates nice graphs for users to visualize the observability data.
![SigNoz architecture][3]
(Nitish Tiwari, [CC BY-SA 4.0][4])
### Install SigNoz
SigNoz's components include Apache Kafka and Druid. These components are loosely coupled and work in tandem to ensure a seamless experience for the end user. Given all the components, it is best to run SigNoz as a combination of microservices on Kubernetes or Docker Compose (for local testing).
This example uses a Kubernetes Helm chart-based deployment to install SigNoz on Kubernetes. As a prerequisite, you'll need a Kubernetes cluster. If you don't have a Kubernetes cluster available, you can use tools like [MiniKube][5] or [Kind][6] to create a test cluster on your local machine. Note that the machine should have at least 4GB available for this to work.
Once you have the cluster available and kubectl configured to communicate with the cluster, run:
```
$ git clone <https://github.com/SigNoz/signoz.git> &amp;&amp; cd signoz
$ helm dependency update deploy/kubernetes/platform
$ kubectl create ns platform
$ helm -n platform install signoz deploy/kubernetes/platform
$ kubectl -n platform apply -Rf deploy/kubernetes/jobs
$ kubectl -n platform apply -f deploy/kubernetes/otel-collector
```
This installs SigNoz and related containers on the cluster. To access the user interface (UI), run the `kubectl port-forward` command; for example:
```
`$ kubectl -n platform port-forward svc/signoz-frontend 3000:3000`
```
You should now be able to access your SigNoz dashboard using a local browser on the address `http://localhost:3000`.
Now that your observability platform is up, you need an application that generates observability data to visualize and trace. For this example, you can use [HotROD][7], a sample application developed by the Jaegar team.
To install it, run:
```
$ kubectl create ns sample-application
$ kubectl -n sample-application apply -Rf sample-apps/hotrod/
```
### Explore the features
You should now have a sample application with proper instrumentation up and running in the demo setup. Look at the SigNoz dashboard for metrics and trace data. As you land on the dashboard's home, you will see a list of all the configured applications that are sending instrumentation data to SigNoz.
![SigNoz dashboard][8]
(Nitish Tiwari, [CC BY-SA 4.0][4])
#### Metrics
When you click on a specific application, you will land on the application's homepage. The Metrics page displays the last 15 minutes worth (this number is configurable) of information, like application latency, average throughput, error rate, and the top endpoints the application is accessing. This gives you a birds-eye view of the application's status. Any spikes in errors, latency, or load are immediately visible.
![Metrics in SigNoz][9]
(Nitish Tiwari, [CC BY-SA 4.0][4])
#### Tracing
The Traces page lists every request in chronological order with high-level details. As soon as you identify a single request of interest (e.g., something taking longer than expected to complete), you can click the trace and look at individual spans for every action that happened inside that request. The drill-down mode offers thorough inspection for each request.
![Tracing in SigNoz][10]
(Nitish Tiwari, [CC BY-SA 4.0][4])
![Tracing in SigNoz][11]
(Nitish Tiwari, [CC BY-SA 4.0][4])
#### Usage Explorer
Most of the metrics and tracing data are very useful, but only for a certain period. As time passes, the data ceases to be useful in most cases. This means it is important to plan a proper retention duration for data; otherwise, you will pay more for the storage. The Usage Explorer provides an overview of ingested data per hour, day, and week.
![SigNoz Usage Explorer][12]
(Nitish Tiwari, [CC BY-SA 4.0][4])
### Add instrumentation
So far, you've been looking at metrics and traces from the sample HotROD application. Ideally, you'll want to instrument your application so that it sends observability data to SigNoz. Do this by following the [Instrumentation Overview][13] on SigNoz's website.
SigNoz supports a vendor-agnostic instrumentation library, OpenTelemetry, as the primary way to configure instrumentation. OpenTelemetry offers instrumentation libraries for various languages with support for both automatic and manual instrumentation.
### Learn more
SigNoz helps developers get started quickly with metrics and tracing applications. To learn more, you can consult the [documentation][14], join the [community][15], and access the source code on [GitHub][16].
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/4/observability-apache-kafka-signoz
作者:[Nitish Tiwari][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/tiwarinitish86
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/ship_captain_devops_kubernetes_steer.png?itok=LAHfIpek (Ship captain sailing the Kubernetes seas)
[2]: https://github.com/open-telemetry/opentelemetry-collector
[3]: https://opensource.com/sites/default/files/uploads/signoz_architecture.png (SigNoz architecture)
[4]: https://creativecommons.org/licenses/by-sa/4.0/
[5]: https://minikube.sigs.k8s.io/docs/start/
[6]: https://kind.sigs.k8s.io/docs/user/quick-start/
[7]: https://github.com/jaegertracing/jaeger/tree/master/examples/hotrod
[8]: https://opensource.com/sites/default/files/uploads/signoz_dashboard.png (SigNoz dashboard)
[9]: https://opensource.com/sites/default/files/uploads/signoz_applicationmetrics.png (Metrics in SigNoz)
[10]: https://opensource.com/sites/default/files/uploads/signoz_tracing.png (Tracing in SigNoz)
[11]: https://opensource.com/sites/default/files/uploads/signoz_tracing2.png (Tracing in SigNoz)
[12]: https://opensource.com/sites/default/files/uploads/signoz_usageexplorer.png (SigNoz Usage Explorer)
[13]: https://signoz.io/docs/instrumentation/overview/
[14]: https://signoz.io/docs/
[15]: https://github.com/SigNoz/signoz#community
[16]: https://github.com/SigNoz/signoz

View File

@ -0,0 +1,156 @@
[#]: subject: (Application observability with Apache Kafka and SigNoz)
[#]: via: (https://opensource.com/article/21/4/observability-apache-kafka-signoz)
[#]: author: (Nitish Tiwari https://opensource.com/users/tiwarinitish86)
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
使用 Apache Kafka 和 SigNoz 实现应用可观测性
======
SigNoz 帮助开发者使用最小的精力快速实现他们的可观测性目标。
![Ship captain sailing the Kubernetes seas][1]
SigNoz 是一个开源的应用可观察性平台。SigNoz 是用 React 和 Go 编写的,它从头到尾都是为了让开发者能够以最小的精力尽快实现他们的可观察性目标。
本文将详细介绍该软件,包括架构、基于 Kubernetes 的部署以及一些常见的 SigNoz 用途。
### SigNoz 架构
SigNoz 将几个组件捆绑在一起,创建了一个可扩展的、耦合松散的系统,很容易上手使用。其中一些最重要的组件有:
* OpenTelemetry Collector
* Apache Kafka
* Apache Druid
[OpenTelemetry Collector][2] 是跟踪或度量数据收集引擎。这使得 SigNoz 能够以行业标准格式获取数据,包括 Jaeger、Zipkin 和 OpenConsensus。之后收集的数据被转发到 Apache Kafka。
SigNoz 使用 Kafka 和流处理器来实时获取大量的可观测数据。然后,这些数据被传递到 Apache Druid它擅长于存储这些数据用于短期和长期的 SQL 分析。
当数据被扁平化并存储在 Druid 中SigNoz 的查询服务可以查询并将数据传递给 SigNoz React 前端。然后,前端为用户创建漂亮的图表,使可观察性数据可视化。
![SigNoz architecture][3]
Nitish Tiwari, [CC BY-SA 4.0][4]
### 安装 SigNoz
SigNoz 的组件包括 Apache Kafka 和 Druid。这些组件是松散耦合的并协同工作以确保终端用户的无缝体验。鉴于这些组件最好将 SigNoz 作为 Kubernetes 或 Docker Compose用于本地测试上的微服务组合来运行。
这个例子使用基于 Kubernetes Helm Chart 的部署在 Kubernetes 上安装 SigNoz。作为先决条件你需要一个 Kubernetes 集群。如果你没有可用的 Kubernetes 集群,你可以使用 [MiniKube][5] 或 [Kind][6] 等工具,在你的本地机器上创建一个测试集群。注意,这台机器至少要有 4GB 的可用空间才能工作。
当你有了可用的集群,并配置了 kubectl 来与集群通信,运行:
```
$ git clone <https://github.com/SigNoz/signoz.git> &amp;&amp; cd signoz
$ helm dependency update deploy/kubernetes/platform
$ kubectl create ns platform
$ helm -n platform install signoz deploy/kubernetes/platform
$ kubectl -n platform apply -Rf deploy/kubernetes/jobs
$ kubectl -n platform apply -f deploy/kubernetes/otel-collector
```
这将在集群上安装 SigNoz 和相关容器。要访问用户界面 UI运行 `kubectl port-forward` 命令。例如:
```
`$ kubectl -n platform port-forward svc/signoz-frontend 3000:3000`
```
现在你应该能够使用本地浏览器访问你的 SigNoz 仪表板,地址为 `http://localhost:3000`
现在你的可观察性平台已经建立起来了,你需要一个能产生可观察性数据的应用来进行可视化和追踪。对于这个例子,你可以使用 [HotROD][7],一个由 Jaegar 团队开发的示例应用。
要安装它,请运行:
```
$ kubectl create ns sample-application
$ kubectl -n sample-application apply -Rf sample-apps/hotrod/
```
### 探索功能
现在你应该有一个已经安装合适仪表的应用,并可在演示设置中运行。看看 SigNoz 仪表盘上的指标和跟踪数据。当你登录到仪表盘的主页时,你会看到一个所有已配置的应用列表,这些应用正在向 SigNoz 发送仪表数据。
![SigNoz dashboard][8]
Nitish Tiwari, [CC BY-SA 4.0][4]
#### 指标
当你点击一个特定的应用时,你会登录到该应用的主页上。指标页面显示最近 15 分钟的信息(这个数字是可配置的),如应用的延迟、平均吞吐量、错误率和应用目前访问最高的接口。这让你对应用的状态有一个大概了解。任何错误、延迟或负载的峰值都可以立即看到。
![Metrics in SigNoz][9]
Nitish Tiwari, [CC BY-SA 4.0][4]
#### 追踪
追踪页面按时间顺序列出了每个请求的高层细节。当你发现一个感兴趣的请求(例如,比预期时间长的东西),你可以点击追踪,查看该请求中发生的每个行为的单独时间跨度。下探模式提供了对每个请求的彻底检查。
![Tracing in SigNoz][10]
Nitish Tiwari, [CC BY-SA 4.0][4]
![Tracing in SigNoz][11]
Nitish Tiwari, [CC BY-SA 4.0][4]
#### 用量资源管理器
大多数指标和跟踪数据都非常有用,但只在一定时期内有用。随着时间的推移,数据在大多数情况下不再有用。这意味着为数据计划一个适当的保留时间是很重要的。否则,你将为存储支付更多的费用。用量资源管理器提供了每小时、每一天和每一周获取数据的概况。
![SigNoz Usage Explorer][12]
Nitish Tiwari, [CC BY-SA 4.0][4]
### 添加仪表
到目前为止,你一直在看 HotROD 应用的指标和追踪。理想情况下,你会希望对你的应用进行检测,以便它向 SigNoz 发送可观察数据。参考 SigNoz 网站上的[仪表概览][13]。
SigNoz 支持一个与供应商无关的仪表库OpenTelemetry作为配置仪表的主要方式。OpenTelemetry 提供了各种语言的仪表库,支持自动和手动仪表。
### 了解更多
SigNoz 帮助开发者快速开始度量和跟踪应用。要了解更多,你可以查阅 [文档][14],加入[社区][15],并访问 [GitHub][16] 上的源代码。
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/4/observability-apache-kafka-signoz
作者:[Nitish Tiwari][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/tiwarinitish86
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/ship_captain_devops_kubernetes_steer.png?itok=LAHfIpek (Ship captain sailing the Kubernetes seas)
[2]: https://github.com/open-telemetry/opentelemetry-collector
[3]: https://opensource.com/sites/default/files/uploads/signoz_architecture.png (SigNoz architecture)
[4]: https://creativecommons.org/licenses/by-sa/4.0/
[5]: https://minikube.sigs.k8s.io/docs/start/
[6]: https://kind.sigs.k8s.io/docs/user/quick-start/
[7]: https://github.com/jaegertracing/jaeger/tree/master/examples/hotrod
[8]: https://opensource.com/sites/default/files/uploads/signoz_dashboard.png (SigNoz dashboard)
[9]: https://opensource.com/sites/default/files/uploads/signoz_applicationmetrics.png (Metrics in SigNoz)
[10]: https://opensource.com/sites/default/files/uploads/signoz_tracing.png (Tracing in SigNoz)
[11]: https://opensource.com/sites/default/files/uploads/signoz_tracing2.png (Tracing in SigNoz)
[12]: https://opensource.com/sites/default/files/uploads/signoz_usageexplorer.png (SigNoz Usage Explorer)
[13]: https://signoz.io/docs/instrumentation/overview/
[14]: https://signoz.io/docs/
[15]: https://github.com/SigNoz/signoz#community
[16]: https://github.com/SigNoz/signoz