31 Ekim 2022 Pazartesi

OpenTelemetry Nedir?

OpenTelemetry Nedir?
Açıklaması şöyle. Yani Open Tracing ve OpenCensus projelerinin birleşmesinden ortaya çıkmıştır.
The OpenTelemetry website states that:

"OpenTelemetry is a collection of tools, APIs, and SDKs. Use it to instrument, generate, collect, and export telemetry data (metrics, logs, and traces) to help you analyze your software's performance and behavior."

OpenTelemetry was created by merging the popular OpenTracing and OpenCensus projects. It is a standard that integrates with many open source and commercial products written in many programming languages. Implementations of OpenTelemetry are in varying stages of maturity.

At its core, OpenTelemetry contains the Collector, a vendor-agnostic way to receive, process, and export telemetry data.
OpenTelemetry Nasıl Çalışır
- Uygulama OpenTelemetry SDK ile instrument edilir.
- Artık loglar bir OpenTelemetry Collector'a gönderilir. 
- Collector üzerinde gerekli filtrelemeler yapılır ve 
- Collector logları bir backend'e gönderir.
Şeklen şöyle


instrumentation-annotations
Maven
Şu satırı dahil ederiz
<dependency>
  <groupId>io.opentelemetry.instrumentation</groupId>
  <artifactId>opentelemetry-instrumentation-annotations</artifactId>
  <version>1.17.0-alpha</version>
</dependency>
Örnek
Şöyle yaparız
import io.opentelemetry.instrumentation.annotations.SpanAttribute
import io.opentelemetry.instrumentation.annotations.WithSpan

@WithSpan("ProductHandler.fetch")
suspend fun fetch(@SpanAttribute("id") id: Long): Result<Product> {
  ...
}
OpenTelemetry Backend Nedir?
OpenTelemetry Backend yazısına taşıdım

OpenTelemetry Operator
Şöyle yaparız
kubectl apply \
-f https://github.com/open-telemetry/opentelemetry-operator/releases/latest/download/opentelemetry-operator.yaml



Hiç yorum yok:

Yorum Gönder