Notes / Observability / 06 Opentelemetry / 9 Collector Architecture

9 — OTel Collector Pipeline Design

Receivers, processors, and exporters chained into a pipeline; why a platform runs more than one; and the agent/gateway topology that tail sampling specifically forces on that design.

Updated July 17, 2026 · §202607132153-5 ·

9 — OTel Collector Pipeline Design

The SDK chapter drew the line between what happens inside the application process and what the Collector — a separate process — does with telemetry after it leaves. This chapter is what happens inside that separate process: how a receiver, a chain of processors, and an exporter compose into a pipeline, and why a real deployment runs more than one.


The three building blocks

Receiver → Processor → Processor → ... → Exporter
  • Receiver — how telemetry gets into the collector: an OTLP gRPC/HTTP listener (the common case, fed by application SDKs), a Prometheus-style scrape endpoint, a filelog receiver tailing container stdout, a hostmetrics receiver reading /proc. Each receiver is specific to a protocol and, usually, a signal type.
  • Processor — transforms, filters, or enriches data already inside the pipeline, in order:
    • batch — groups individual spans/metrics/logs into fewer, larger export requests. This is almost always present and almost always last, because a processor that inspects or drops data should run before batching, not after, or it’s inspecting batches instead of records.
    • memory_limiter — the collector’s own backpressure valve: sheds or refuses load before the process OOMs under a traffic spike, rather than crashing and dropping everything. This is 05 — Backpressure applied to the collector itself, not just the services it observes.
    • resource/attributes — add, rename, or drop attributes in flight (e.g. stamping k8s.pod.name via the k8sattributes processor). This is where a 5 — Label & Attribute Schema Design naming mistake either gets fixed in transit or gets baked in — the last point where a fix doesn’t require redeploying every instrumented service.
    • filter — drops telemetry matching a rule before it’s exported at all, the mechanism behind most head-based sampling and noisy-signal suppression.
    • tail_sampling — the sampling decision itself, made after seeing a request’s full trace (see Head vs. Tail Sampling for head vs. tail as a design choice — this processor is what makes the tail option possible).
  • Exporter — how telemetry gets out: OTLP to a backend (Tempo, Mimir, Loki), or OTLP to a second, downstream Collector — pipelines chain across processes just as easily as they chain within one.

A pipeline is one ordered chain, per signal

A collector config declares pipelines under service.pipelines.<traces|metrics|logs>, each one an explicit list: receivers: [...], processors: [...], exporters: [...]. Processor order inside that list is not cosmetic — a filter before batch drops records before they’re bundled; the same filter after batch would have to inspect and partially rewrite batches instead, if it could even run there at all. Most processors are explicitly documented as position-sensitive for exactly this reason.


Why one pipeline usually isn’t enough

A single pipeline processes one signal type one way, for one destination. Real platforms need more than one, for reasons that show up almost immediately at any scale:

  • Different destinations, same signal — dual-writing traces to two backends during a migration, or splitting “hot” recent data to a fast store and a downsampled copy to cheap long-term storage.
  • Different tenants, different treatment — a noisy tenant’s pipeline can carry a stricter filter/rate-limit than everyone else’s, without throttling tenants who didn’t cause the problem — see Rate-Limiting Architecture.
  • Deriving a new signal from an existing one — a connector (a newer OTel construct) can sit between two pipelines, so one pipeline’s output becomes another’s input inside the same process. The canonical example is a spanmetrics connector: it consumes the traces pipeline’s spans and emits RED metrics (request rate, error rate, duration) derived from them — one signal type produced entirely from another, without touching application code. 2 — The Signals covers metrics and traces as separate signal types; a connector is the pipeline-level mechanism that turns one into the other after the fact.

Topology: agent tier and gateway tier

Most production deployments split the Collector into two tiers rather than running one flat fleet:

Service pod ──► Agent collector (sidecar/DaemonSet)
                     │  resource enrichment, batching, minimal filtering

              Gateway collector (centralized tier)
                     │  tail sampling, tenant routing, heavy processing

                  Backend

The agent tier runs close to the workload (sidecar or per-node DaemonSet), keeping its job cheap and local: attach k8s.pod.name-style Resource attributes while they’re still available, batch, and forward. The gateway tier is centralized and does the processing that genuinely needs a wider view — most importantly, tail sampling, which can only decide “keep or drop this trace” after seeing every span of it. That forces a specific routing requirement: every span belonging to the same trace_id has to land on the same gateway instance, or the instance making the sampling decision never sees the whole trace to decide on. This is usually solved with a load-balancing exporter at the agent tier that routes by trace_id hash rather than round-robin — a direct, mechanical consequence of 3 — Cross-Signal Correlation‘s shared-identifier requirement, applied to the pipeline itself rather than to storage or dashboards.


Why this matters for an Observability Architect

Every processor added to every pipeline runs on the platform’s full production volume, not a sample — a processor that’s cheap in isolation is not cheap multiplied across every span the fleet emits. The same discipline 5 — Label & Attribute Schema Design applies to reviewing a metric’s label combination rather than each label alone applies here to reviewing a pipeline’s full processor chain rather than each processor alone. And because the gateway tier is where tail sampling, tenant isolation, and cross-cutting enrichment all live, it tends to become the platform’s single most failure-critical process — its own 05 — Backpressure and retry behavior under load (see Retry Policies) deserves the same production-readiness scrutiny as any service it’s observing, not less.

Metadata

DimensionDetail
AuthorAmit Singh
Scopeobservability

Local graph

Full graph →

Linked from 12 notes

7 — Distributed Tracing Backend

How spans that arrive out of order, from different services, get assembled into one trace — and the two competing storage models (indexed search vs. object storage plus a trace-ID lookup) that trade query flexibility for cost.

2 — Driving Adoption

A paved road nobody travels on didn't help anyone — onboarding time as the leading indicator, self-service as the mechanism that actually moves it, and why migrating an existing service is a harder adoption problem than a greenfield one.

What is Telegraf

InfluxData's plugin-driven metrics/events/logs collection agent — 300+ input/output plugins, written in Go, single static binary — the collector layer in the InfluxDB (TICK-stack-descendant) ecosystem, comparable in role to Grafana Alloy.

Chapter 2 — Telemetry Pipelines

OpenTelemetry, OTLP, collectors, sampling, and aggregation as the pipeline that gets a signal from emission to storage without becoming the outage itself.

8 — Self-Observability

The bootstrapping problem — a platform can't fully trust itself to tell you it's failing — and the two mechanisms that get around it: an independent out-of-band health path, and a synthetic canary that catches silent stalls no internal metric surfaces.

1 — OpenTelemetry SDKs & Semantic Conventions

OpenTelemetry is a specification and an API/SDK, not a backend — the pieces that make it up, and the semantic-convention vocabulary that lets two unrelated teams' telemetry be queried the same way.

Chapter 1 — Telemetry Ingestion Pipeline

Principal/Staff-level design of a high-throughput telemetry ingestion pipeline — requirements, architecture, deep dives, and trade-offs at 10x scale.

7. Component Map (What Exists in the Wild)

OSS and managed-SaaS options for every layer of the telemetry ingestion pipeline, mapped against ShipSolid's own production experience.

7 — Multi-Tenancy

Two separate guarantees hiding under one name — data isolation and performance fairness — and the tenant identification, quota enforcement, and selective backpressure that make both hold under shared infrastructure.

5 — Security & Compliance

Why PII ends up in telemetry by accident rather than by design, the pipeline-layer scrubbing that catches what application discipline misses, tenant-scoped access control, and why the query audit log is itself security-relevant telemetry.

Observability Engineering

A book-shaped table of contents for observability engineering: foundations through architecture, metrics, logging, tracing, profiling, OpenTelemetry, instrumentation, Kubernetes/cloud, data platforms, visualization, alerting, SRE integration, cost, security, platform engineering, AI-driven operations, and MAANG interview preparation — cross-linking existing prometheus/grafana-cloud/kubernetes/sre/platform-engineering notes instead of duplicating them.

Chapter 5 — OpenTelemetry Collector Pipeline

Multi-pipeline routing, processor chaining, exporter fan-out.