Skip to main content
Welcome to the OpenTelemetry Collector lesson. In this lesson we explore the OpenTelemetry Collector — the scalable, central observability component that ingests, processes, and exports telemetry (traces, metrics, logs, and context/baggage). The collector decouples instrumented applications from backend destinations so you can centralize configuration, enforce data governance, and scale observability reliably. For full reference, see the official OpenTelemetry Collector docs: OpenTelemetry Collector and the YAML specification: YAML 1.2.
The image illustrates the need for a collector in a system, showing two terminal interfaces with language-specific exporters connecting to a central database, with warning symbols indicating potential issues.
Why you shouldn’t rely on console debugging at scale During development it’s common to print telemetry to the console: quick, immediate feedback for local debugging. But console output doesn’t scale — you won’t have centralized visibility across many services or environments, and you can’t retain, filter, or route this data to backends.
The image illustrates a concept that console output is intended for debugging, not observability, using a diagram of services with trace, metric, and log components. It emphasizes that console output is for learning and debugging only.
Why sending telemetry directly from every service becomes impractical Each application can export telemetry directly to backends (OTLP, Jaeger, Zipkin, Prometheus, StatsD, etc.). That works for a few services but creates operational pain at scale: per-service exporter configuration, duplicated credentials, and redeploys for backend changes.
The image depicts a diagram showing why sending telemetry directly to multiple backends is impractical, highlighting added complexity and overhead with icons indicating issues.
What the OpenTelemetry Collector provides The Collector is a standalone service that decouples telemetry production from backend delivery. Applications send telemetry in supported formats (OTLP, Jaeger, Zipkin, Prometheus, StatsD, etc.) to the collector. The collector receives the data, optionally processes it (batching, sampling, filtering, enrichment), and exports it to one or more backends. Configuration is centralized in a YAML file, making pipeline and exporter management consistent across environments.
The image is an introduction to the OpenTelemetry Collector, depicting it as a standalone service that decouples telemetry production from where it's sent, with inputs like OTLP, Jaeger, Zipkin, Prometheus, and StatsD. It also mentions YAML version 1.2 or greater.
Example: minimal collector configuration Below is a simple YAML snippet illustrating receivers, processors, exporters, and pipelines. Use this as a starting point and adapt to your environment.
Collector architecture and telemetry flow
  • Receivers: Ingest telemetry in many formats (OTLP, Prometheus scrape, Jaeger, Zipkin, etc.).
  • Processors: Transform data (batching, sampling, filtering, attribute manipulation, memory limiting).
  • Exporters: Send processed telemetry to backends (OTLP, vendor-specific exporters such as Jaeger/Zipkin, Prometheus remote write, or logging).
  • Extensions: Non-pipeline components that enhance the collector (health_check, zpages, authentication, observability endpoints).
Receivers → Processors → Exporters form the pipelines. Extensions run at the collector level for monitoring and management. You can define separate pipelines per signal type (traces, metrics, logs) and route them to multiple backends. Use this quick reference table to map components to responsibilities and examples:
ComponentResponsibilityExamples
ReceiverIntake telemetry from instrumented apps or scrapersotlp, prometheus, jaeger, zipkin
ProcessorTransform or protect data before exportbatch, tail_sampling, memory_limiter, attributes
ExporterSend telemetry to backend systemsotlp, jaeger, zipkin, prometheusremotewrite, logging
ExtensionCollector-level support serviceshealth_check, zpages, auth, pprof
The image illustrates a "Collector Architecture Overview," showing a flow from receiving telemetry data through receivers, processors, and exporters, with extensions for services like health checks.
Benefits of deploying the Collector
BenefitWhat it delivers
DecouplingApplications send telemetry to a local or central collector instead of embedding exporter logic. This simplifies application code and reduces reconfiguration needs.
Centralized configurationManage pipelines, processors, and exporters in one YAML, enabling consistent routing, sampling, and transformations across services.
ScalabilityScale collectors horizontally (sidecars, agents, or centralized gateways) and centralize exporter instances to reduce config drift and operational overhead.
Data governance & securityApply filtering, redaction, and enrichment in the collector to protect sensitive data before it leaves your environment.
The image outlines three key benefits of deploying the Collector: decoupling code from the backend, centralizing configuration, and allowing horizontal scaling.
Deployment considerations and best practices
  • Resource allocation: Provision sufficient CPU and memory for ingestion and processing. Use the memory_limiter and batch processors to control memory and throughput.
  • Reliability: Avoid single points of failure by running multiple replicas behind a load balancer, or deploy local agents (sidecars) with a centralized gateway to aggregate data.
  • Monitoring: Enable health_check, zpages, and the collector’s own metrics to monitor pipeline latency, queue sizes, error rates, and resource usage.
  • Security: Protect receiver endpoints with TLS and mTLS, authenticate clients, and apply exporter-level encryption. Manage credentials centrally and rotate them as part of your security policy.
  • Operational workflows: Keep collector configuration in version control, use CI/CD to validate YAML changes, and test sampling/filtering rules in lower environments before rolling out to production.
The image outlines deployment considerations for a Collector, highlighting the need for a resource allocation plan for CPU and memory usage, reliability through replicas behind a load balancer, and monitoring via health-check and z-pages endpoints.
Always secure collector receivers. Use TLS and mutual TLS (mTLS) where clients must be authenticated, and apply access controls so only authorized services can send telemetry.

Watch Video