Module 5: The OpenTelemetry Collector

In Module 4 your application started sending all three signals to a single address, otel-collector:4318, and they ended up in three different backends. This module is about what sits at that address: what the OpenTelemetry Collector is, what it can do, and what the one in this workshop is already doing to your telemetry. πŸ“¦

Learning Objectives

By the end of this module, you will:

5.1 β€” What the Collector is

The OpenTelemetry Collector is a standalone program, part of the OpenTelemetry project, that receives telemetry, processes it and sends it on. It is vendor-neutral: it speaks OTLP, the OpenTelemetry protocol, and dozens of other formats, in and out.

Your application doesn’t need it β€” an SDK can export straight to a backend. But putting a Collector in the middle changes who has to know what:

todo-api and notify-service, your services, send their telemetry over OTLP to the OTel Collector, which sends the metrics to VictoriaMetrics, the logs to VictoriaLogs and the traces to VictoriaTraces

5.2 β€” The building blocks

A Collector is configured from a handful of component types:

Component What it does Examples
Receivers Get telemetry in β€” by listening for it or by fetching it OTLP, Prometheus scraping, log files, Kafka
Processors Change telemetry on the way through batch, filter, add or remove attributes, sampling, redaction
Exporters Send telemetry out OTLP to any compatible backend, Prometheus remote write, Kafka, files
Connectors Join two pipelines: an exporter on one and a receiver on the other turn spans into metrics, route by attribute
Extensions Things that aren’t about the data itself health checks, authentication

Components are wired together into pipelines, one per signal. A pipeline says: take the metrics (or logs, or traces) from these receivers, run them through these processors in this order, and hand them to these exporters. A component that is declared but not used in any pipeline does nothing.

5.3 β€” What it can do

Most of what makes a Collector worth running falls into a few groups:

It is commonly deployed in two ways, often both at once: as an agent next to each application, on the same host or in the same pod, and as a gateway, a central pool that agents and applications send to.

5.4 β€” What this workshop’s Collector does

The Collector you have been sending to since Module 4 is configured in collector/config.yaml. You don’t need to read or change it; this is what it does.

Inside this workshop’s Collector: your app sends OTLP to the otlp receiver, which splits it into three pipelines. Metrics go through memory_limiter, resource and batch; logs through memory_limiter, resource, transform/severity and batch; traces through memory_limiter, resource and batch. Each pipeline ends in its own exporter, to VictoriaMetrics, VictoriaLogs and VictoriaTraces. The health_check extension sits apart, not on the data path

Receivers

Processors, applied in this order:

Exporters, one per backend:

Extensions

And the pipelines that connect them:

Signal Receivers Processors Exporter
Metrics OTLP, its own metrics memory_limiter, resource, batch VictoriaMetrics
Logs OTLP memory_limiter, resource, transform/severity, batch VictoriaLogs
Traces OTLP memory_limiter, resource, batch VictoriaTraces