A pipeline that cannot be observed cannot be operated. Part 20 adds throughput, latency percentiles, and error breakdown by type — the three metrics that tell you whether the pipeline is healthy, where it is slow, and what is failing. This is the foundation for Prometheus and OpenTelemetry integration.
The flagship of Arc 2: a full concurrent RAG pipeline — chunk, embed, generate — where every stage from Part 11, every resilience pattern from Parts 13-15, and every flow control mechanism from Parts 16-18 comes together in one coherent system.
A goroutine that starts and never exits is a leak. Unlike memory leaks, goroutine leaks are invisible — no crash, no error, just a process that slowly accumulates blocked goroutines until memory and scheduler overhead degrade everything. This part shows how to detect them, reproduce them intentionally, and fix them.
Every previous part treated an LLM response as a single value that arrives when the call completes. Real LLM APIs stream tokens incrementally — you receive the first word in hundreds of milliseconds and the rest follow one by one. A channel between producer and consumer is the natural Go model for this.
When a producer generates work faster than consumers can process it, the queue grows without bound. A bounded channel is the fix — when it fills, the producer blocks automatically. No explicit signal, no coordination: the channel capacity is the backpressure contract.