
Trench
Open source analytics infrastructure powered by ClickHouse
Replaces Amplitude, Mixpanel, Snowflake

Who it's for
Use Trench when product events need to stay in infrastructure you control while still supporting Segment-style tracking calls.
You need a fully managed analytics suite with polished non-technical reporting out of the box.
Use Trench as a base event pipeline for dashboards, observability, RAG, or internal analytics systems.
Your workload is a small marketing site where a hosted analytics snippet is enough.
The problem
Product analytics can become expensive and opaque as event volume grows. Hosted tools make tracking easy, but teams often lose control over raw events, retention, data deletion, and how analytics data feeds internal systems. Building an event pipeline from scratch is also hard. Kafka, ClickHouse, ingestion APIs, privacy controls, and dashboards all need to work together before product teams can ask useful questions.
How it works
Processes event data through Kafka and stores analytics in ClickHouse, giving teams a high-volume architecture for real-time event workloads.
Supports Segment-style Track, Identify, and Group calls, which lowers migration work for teams already using familiar analytics event patterns.
The official README describes a production-ready Docker image, making the first deployment simpler than assembling every analytics component by hand.
Features
- Kafka and ClickHouse event pipeline
- Segment-compatible tracking
- Single Docker image deployment
Recommended for this setup
Strengths
- Raw analytics infrastructure ownership: Trench gives teams more control over event ingestion, storage, and deletion than closed hosted analytics dashboards.
- Built for high event volume: The project describes processing thousands of events per second on a single node, which matters for teams outgrowing basic product analytics tools.
Trade-offs
- Infrastructure skills required: Trench simplifies the stack, but Kafka and ClickHouse still need operational understanding, backup planning, upgrades, and capacity management.
Tech stack
FAQ
Trench is used for self-hosted event tracking and real-time analytics infrastructure built on Kafka and ClickHouse.
Yes. Trench supports Segment-style Track, Identify, and Group events according to the official README.
Trench fits engineering teams that want to own analytics event infrastructure instead of sending all raw product events to a hosted analytics vendor.