Ensuring reliable OpenTelemetry ingestion at scale
ClickHouse's LogHouse OpenTelemetry pipeline, ingesting 50 million events per second, absorbs database backpressure by failing over to S3 rather than buffering in memory, local WALs or Kafka. Collector file_storage WALs forced StatefulSets, drained slowly (about 4 hours per TiB) and queued fresh data behind backlog in FIFO order. The final design uses the OTel failoverconnector to route to ClickHouse first and spill to S3 only under backpressure, which limits PUT costs to outage windows. A separate scale-to-zero collector replays spilled blobs via SQS event notifications. Key details include disabling the ClickHouse exporter's sending queue so errors reach the connector, keeping inline retries, enabling the queue on the S3 exporter, and spreading keys across a wide keyspace to avoid prefix throttling.
Related posts
- Scaling our Observability platform beyond 100 Petabytes by embracing wide events and replacing OTel
ClickHouse mediumAdept
ClickHouse's internal LogHouse platform grew from 19 PiB to over 100 PB of uncompressed logs (about 500 trillion rows), mostly by replacing the OpenTelemetry pipeline for ClickHouse server telemetry with SysEx. SysEx is a pull-based Go exporter that copies system tables byte-for-byte from customer pods into LogHouse in ClickHouse's Native format. It assigns pods to scrapers with a hash ring and queries a sliding time window trailing real time by about five minutes, so internal buffers flush before rows are read. Schema drift is handled with hashed, versioned tables unified through the Merge engine. The OTel collectors needed 800+ cores for 2M logs/s and still dropped events, while SysEx ships 37M logs/s on about 70 cores with no edge loss. HyperDX now replaces the team's Grafana-based UI.
- A Quadrillion Rows across three Clouds: scaling LogHouse
ClickHouse mediumAdept
LogHouse, ClickHouse Cloud's internal logging platform, has grown to 431 PiB uncompressed (27 PiB on disk) and 1.59 quadrillion rows across 36 cells in 33 geoshards on three clouds, ingesting up to 80 GiB/s and 190M rows/s. Writes stay local to each region, with busy regions split into cells keyed by source Kubernetes cluster. Async Inserts cut part creation by 4–24x, and the largest tables moved from monthly to daily partitions once parts hit the max merge size. OTel collectors spill failed batches to S3 so that outages cause delay rather than data loss. On the read side, a three-level Distributed table hierarchy (global, regional, local SharedMergeTree) with region-named shards for pruning gives users one endpoint and sub-second cross-cloud queries.
- How we used ClickHouse to store OpenTelemetry Traces and up our Observability Game
ClickHouse mediumAdept
Resmo stores over 300 million unsampled OpenTelemetry spans per day in a self-hosted ClickHouse node, after dropping S3/Parquet/Athena because of its 2-3 second query startup and delayed data. A single c7g.xlarge with 400 GB EBS holds more than 4 billion spans at about 92% compression (275 GiB vs 3.4 TiB). LowCardinality materialized columns for tenant and user IDs speed up common queries, and joins to Aurora Postgres add account names. The post shares SQL for latency percentiles, SpanAttributes key analysis, spans-per-trace histograms and exception-message search with hasToken.
- Our New Observability Platform for 100B Logs
Railway mediumAdeptRailway rebuilt its logging backend on ClickHouse to power Log Explorer, handling about 1 billion new logs per day, 100 billion stored logs and 60 queries/sec at roughly 50ms average latency on a 2-shard/2-replica cluster. The previous system (local filesystem plus GCS, filtering in a single Go process) couldn't do cross-service search, fast far-back queries, horizontal scaling or aggregates. ClickHouse compressed 28TB of tagged logs to 5TB, and the team rolled it out within a week by dual-writing via Vector and translating their filter DSL to SQL. The main production surprise was asynchronous replication omitting recent logs, which an HAProxy primary-routing attempt didn't fix but the insert_distributed_sync setting did.
- ClickHouse and OpenTelemetry
ClickHouse mediumAdept
ClickHouse now officially supports the OpenTelemetry Collector exporter for ClickHouse, which has reached beta for logs and traces. The exporter ships a "one size fits most" default schema. For production, ClickHouse recommends disabling automatic table creation, because concurrent exporters race to create tables, and defining your own tables or materialized views keyed to your query patterns. The LogHouse schema behind ClickHouse's 43 PB internal logging platform serves as the worked example. It orders by (PodName, Timestamp), uses LowCardinality for string columns under about 10k distinct values, applies ZSTD(1) because data lives on S3, and puts Bloom-filter indexes on map keys and values, which are not yet tuned.