OpenTelemetry

OpenTelemetry is a opensource project and part of the Cloud Native Computing Foundation (CNCF) incubating projects, it aims to provide consolidated observabilty in one package while being vendor agnostic.

OpenTelemetry is being widely adopted and also being integrated into various other tools in the domain thus aiming to become an open standard in the coming years just like Prometheus which is a CNCF graduated project and used various projects to collect system metrics

OpenTelemetry provides many SDK for various languages to create custom metrics traces and loggers this is the code configuration which the developers can do and integrate into their code. depending on the language you might or might not have auto configuration, the act of making custom metrics or tracing is called Instrumentation.

There are also many zero code configurations available for languages such as Java where with minimal to zero code changes one can pull traces, metrics and logs from the application.

Deployment

No Collector

Using OpenTelemetry we can directly push the data to OTLP (OpenTelemetryProtocol) supported backends, this is the configuration where there is no collector, however there is a very strong coupling between application code and the backend involved, some people might be hesitant as they might call it polluting the code with OpenTelemetry code.

Transclude of opentelemetry---no-collector.excalidraw

ref: No Collector

Collector

In this configuration we communicate with a collector that listens for information in OTLP formats and forwards to the necessary backends, you can also transform the data using processors in pipelines, the architecture is very interesting if you have very specific requirements.

I would prefer the collector as we have loose coupling between the backends and we can switch the backend whenever necessary it gives us the flexibility in using backends

OpenTelemetry - Collector

Link to original

Sample OpenTelemetry config file

Transclude of otel-collector.yml

ref: Agent

Gateway

yet to look into it -> Gateway

References