澤注:這是一個系列,共分成6部分,這是第6部分。翻譯自:https://trstringer.com/otel-part6-ecosystem/
之前的五篇博客涵蓋了如何使用OpenTelemetry觀測你的應(yīng)用程序的技術(shù)細(xì)節(jié)。我認(rèn)為用OTel生態(tài)系統(tǒng)的一些信息來結(jié)束這個博文系列會產(chǎn)生很大的價值。OpenTelemetry社區(qū)發(fā)生了很多事情,那些剛接觸它的人可能會有點(diǎn)不知所措,或者對在哪里找到某些東西感到困惑。
如前所述,OpenTelemetry是一個CNCF項(xiàng)目。但是,它的表現(xiàn)如何呢?以PR、Issue和提交數(shù)來衡量,OpenTelemetry是CNCF項(xiàng)目中第二活躍的,僅次于Kubernetes:

Image and data source (twitter)
這是一個非常激動人心的時刻,可以深入OpenTelemetry的世界。希望現(xiàn)在已經(jīng)很明顯了,但我相信OpenTelemetry會繼續(xù)保持,并將在云原生生態(tài)系統(tǒng)中發(fā)揮重要作用。
項(xiàng)目網(wǎng)站
OpenTelemetry的起來是它的項(xiàng)目網(wǎng)站: opentelemetry.io。在這里,你可以找到大量的信息和好的生態(tài)系統(tǒng)的索引。在這里,你還可以找到非常棒的入門教程,從中熟悉OTel并在你的軟件中實(shí)現(xiàn)它。
OpenTelemetry網(wǎng)站的一個值得關(guān)注的部分是項(xiàng)目博客。在這里你會發(fā)現(xiàn)大量的更新和公告。
一般來說,如果你是OpenTelemetry的新手,我強(qiáng)烈建議你花一些時間在項(xiàng)目網(wǎng)站上學(xué)習(xí)。
社區(qū)
如果說這個系列博文強(qiáng)調(diào)了一件事,那就是OTel有一個龐大的功能集。而這些功能往往伴隨著一定程度的復(fù)雜性。在某些時候,你可能需要社區(qū)的幫助。我發(fā)現(xiàn)與社區(qū)成員(包括維護(hù)者?。┝奶斓淖詈梅绞绞峭ㄟ^CNCF Slack工作區(qū)。OpenTelemetry有幾個頻道,你可能感興趣。主要的一個是#opentelemetry,這是一般的討論。不過你也有可能想?yún)⑴c更多具體的對話。這里有一些其他的OTel頻道:
-
#otel-collector:關(guān)于OpenTelemetry Collector的一切; -
#otel-go- OpenTelemetry Go (API, SDK, 實(shí)現(xiàn)) -
#otel-python- OpenTelemetry Python (API, SDK, 實(shí)現(xiàn))
還有一些,在 Slack 中搜索“#otel”以查看其他 OpenTelemetry 頻道。
這可能是下一節(jié)的一部分,但在這里值得一提。 社區(qū)的Git倉庫 有很多重要信息,例如:治理、感興趣的領(lǐng)域、會議和日歷等等。如果您正在考慮加入 OTel,這是一個很好的起點(diǎn)。
代碼倉庫列表
我必須承認(rèn),當(dāng)我開始使用 OpenTelemetry 時,我最困惑的事情之一是 GitHub倉庫 的組織方式。
OpenTelemetry的主要組件(不是語言或者特定的collector)可以在這些倉庫中找到:
- open-telemetry/opentelemetry-specification - The OTel spec (procotol, metrics, traces, logs, baggage, and many other specifications for root OTel), schema, and semantic conventions
- open-telemetry/oteps - Enhancement proposals for the project
- open-telemetry/opentelemetry-proto - Protobuf definitions for OTLP
OTel Collector 倉庫:
- open-telemetry/opentelemetry-collector - Core collector code, 包括 ocb 工具
- open-telemetry/opentelemetry-collector-contrib - Contrib receivers, extensions, processors, and exporters for the collector
- open-telemetry/opentelemetry-collector-releases - Releases for core and contrib distros are not in the above two repos, but they are here including the manifests and Dockerfiles for the release distros
- open-telemetry/opentelemetry-operator - Kubernetes operator to handle the collector, including collector sidecar injection for observed application pods
OTel的一個重要部分是特定語言的探測實(shí)現(xiàn)。這里有一個案例,解釋了它們在項(xiàng)目中是如何組織的:
- open-telemetry/opentelemetry-go - Go API and SDK
- open-telemetry/opentelemetry-go-contrib - Extensions for OTel Go, including instrumentation and propagators
- open-telemetry/opentelemetry-python - Python API and SDK
- open-telemetry/opentelemetry-python-contrib - Extensions for OTel Python
這是語言實(shí)現(xiàn)的一般模式,但它們可以有所不同。例如,Java有open-telemetry/opentelemetry-java,但也有open-telemetry/opentelemetry-java-contrib用于擴(kuò)展,但有open-telemetry/opentelemetry-java-instrumentation用于自動探測實(shí)現(xiàn)的單獨(dú) repo。
注冊表
我認(rèn)為應(yīng)該注意的生態(tài)系統(tǒng)的最后一部分是OpenTelemetry Registry。由于該項(xiàng)目有大量的實(shí)現(xiàn)和產(chǎn)品,這是一個搜索任何你想要實(shí)現(xiàn)需求的好地方。
總結(jié)
OpenTelemetry是一個偉大的項(xiàng)目,它提供了一種在我們開發(fā)的軟件中實(shí)現(xiàn)高水平的可觀測性的方法。通過OTel,我們能夠有最大限度的洞察力,并回答線上問題,而不需要做任何代碼修改。我強(qiáng)烈建議你深入OpenTelemetry的奇妙世界!一旦你這樣做了,你就永遠(yuǎn)不會想離開它了。