What Is the OpenTelemetry Collector (OTel Collector)?
The OpenTelemetry Collector (OTel Collector for short) moves telemetry from where it's produced to where it's analyzed, processing it on the way. You can deploy it next to every app or run one shared instance for everything; it's open source and costs nothing to license. Telemetry, in this case, covers traces, metrics and logs, all following the OpenTelemetry (OTel) standard.
Your apps stop talking to monitoring tools one by one. Instead, they hand everything to the Collector. What happens next is set in one config file.
Take the checkout service of an online store as an example. Every order it handles produces a trace, plus log lines and a few metrics:
Without a Collector: You could end up with one agent for logs, a second for metrics and a third for traces. Each with its own backend connection
With a Collector: One local endpoint for everything. The Collector takes care of the rest
You'll see it at the center of many vendor-neutral telemetry pipeline designs; it runs just as well on physical servers and VMs as it does in containers or a public cloud.
How Does the OTel Collector Work?
The OTel Collector splits its work into pipelines (one for traces, one for metrics, one for logs). Each pipeline takes data in, processes it, and passes it out the other side. That sequence never changes.
All the setup is done in YAML, which is plain text laid out as indented key-value pairs (easy to read, and easy to track in version control). One catch: defining a component doesn't switch it on; it has to be listed in a pipeline under the service section too. So a bare-bones traces setup needs three entries: a receiver, a batch processor and an exporter.
The Collector supports both push and pull models:
Push: Applications send data to the Collector, usually over OTLP (the OpenTelemetry Protocol) using gRPC, a fast remote-call protocol, or HTTP
Pull: The Collector scrapes metrics on a schedule from endpoints that publish them
OpenTelemetry Collector Components
The OpenTelemetry Collector is put together from five kinds of components; at a minimum, each pipeline needs a receiver and an exporter.
Receivers: Where data enters. OTLP, Prometheus metrics, syslog, Jaeger and Zipkin traces all work; the Collector converts each into its own internal format
Processors: Work on data in transit: batching, memory caps, dropping noise, masking sensitive fields, sampling traces
Exporters: Send the result on. An observability platform, a long-term store, even another Collector can be the destination
Connectors: Join two pipelines. They're how you get request-rate and error metrics out of spans (the timed steps inside a trace) with no extra instrumentation
Extensions: Health checks, authentication, profiling of the Collector itself. Useful extras that never touch the telemetry
Processor order matters. The memory limiter usually runs first, so the Collector refuses new data before it runs out of memory, and batching usually runs last.
OTel Collector Deployment Modes: Agent vs Gateway
The OTel Collector runs in two deployment modes, agent and gateway, and many production setups use both together.
Aspect | Agent Mode | Gateway Mode |
Where it runs | On each host, or as a sidecar container beside the application | As a shared, central service that many agents forward to |
Main job | Collect data close to the source | Apply rules across the whole organization |
Typical tasks | Add host details, buffer data during short outages, retry failed sends | Tail sampling, routing, filtering, one point for backend changes |
How it scales | Grows with the number of hosts | Add instances behind a load balancer |
Agent mode works much like agent-based monitoring: collection happens on the same machine that produces the data. Sidecars come up a lot in Kubernetes. (A sidecar is a small helper container in the same pod as your app. A pod is the smallest unit Kubernetes deploys.) Tail sampling, a typical gateway task, keeps a trace only after seeing whether it ended in an error or ran slow.
OpenTelemetry Collector Distributions: Core, Contrib and Vendor Builds
An OpenTelemetry Collector distribution is one packaged binary with a chosen set of components inside. The common types:
Core: Small and stable. General-purpose components only
Contrib: Much bigger, with receivers and exporters for a long list of third-party systems. Good for testing; in production, all that extra code widens the attack surface
Purpose-built: Slimmer community builds aimed at one job, like running in Kubernetes clusters or forwarding OTLP only
Vendor and cloud builds: Packaged by observability vendors or cloud providers for their own platform, usually with support included
Custom builds: A binary compiled with the Collector builder tool that keeps only the components an organization runs
OTel Collector vs OpenTelemetry SDK
The OTel Collector and the OpenTelemetry SDK split the work between them. Most deployments end up running the two side by side.
SDK: Lives inside your application code. Creates the traces, metrics and logs, then sends them out
Collector: Its own process, running outside the app. Picks up the data and does everything downstream
OpenTelemetry has roots in two earlier projects, OpenTracing and OpenCensus; the two were merged to create it.
Do You Need an OTel Collector?
An OTel Collector starts paying off once several services send telemetry, or once the same data has to reach two or more destinations.
With one service under test, direct export to a backend is perfectly workable. Once distributed systems are involved and microservices monitoring covers many services, a Collector is worth running for four reasons:
Retries, batching and encryption move out of application code
Sensitive values can be removed before data leaves your network
Switching or adding a backend becomes a configuration change
Sampling rules are set once and apply to every service
Why Is the OpenTelemetry Collector Important for Observability?
The OpenTelemetry Collector is important for observability for one main reason: it decouples collecting data from analyzing it. You instrument code one time; where the data goes after that is your call.
That separation carries business value:
Lower switching costs: A platform change doesn't force you to re-instrument services. That helps when license renewal comes around
Controlled data spend: Filter and sample near the source, and you store less data. Smaller volumes, smaller storage bills
Moving the data is only one part. Engineers get the most from it when the backend joins spans into end-to-end traces and shows them alongside the metrics and logs captured at the same time. Full-stack observability relies on exactly that correlated picture. It also means one place to start when there's a root cause to find.
OpenTelemetry Collector Best Practices
OpenTelemetry Collector best practices focus on stability and security once traffic grows. Begin with these:
Start with an agent: Deploy one early so applications never connect to a backend directly
Set limits from day one: Add the memory limiter and batch processor to every pipeline
Trim the build: Run a distribution with only the components you use
Secure every endpoint: Turn on TLS encryption and authentication for receivers that accept remote traffic
Watch the Collector itself: Track its health and throughput, since a silent pipeline failure hides incidents and pushes up MTTD, the mean time to detect an issue
Explore More IT Terms
Browse our comprehensive IT glossary to learn more about technology terminology.