Chapter 5: Full-Stack Observability — Vector, ClickHouse, and Distributed Tracing at Scale

Multi-Language Edition: This chapter is also available in Vietnamese at 📖 Bản tiếng Việt (Vietnamese Edition). Previous Chapter: Chapter 4 — Database Scalability: From MySQL to TiDB | Series Hub Answer-First: Operating thousands of microservices generating billions of daily transactions makes naive logging (Elasticsearch/ELK) financially prohibitive and computationally unsustainable. Shopee adopted a next-generation observability stack: Rust-based Vector edge daemons parsing telemetry with SIMD acceleration, Apache Kafka buffering ingestion bursts, ClickHouse columnar storage compressing petabyte-scale logs by 12x with sparse indexing, OpenTelemetry (OTel) collectors executing tail-based adaptive sampling (retaining 100% of errors and p99 latency anomalies while discarding 99% of normal traces), and eBPF continuous profiling diagnosing production CPU/memory bottlenecks with sub-1% runtime overhead. ...