Hey PH! I'm Christian, one of the developers of Trench.
We're building Trench as a modern open-source analytics infrastructure designed for tracking events, page views, and user identities, powered by ClickHouse and Kafka.
Why did we build this? At our startup, Frigade, we hit a wall with our Postgres-based events table, which became costly and slow to scale as our user base grew. It's a common problem for companies scaling up: the initial events table in a relational database works for a while but quickly turns into a bottleneck when scaling to 1M+ users. Trench aims to solve this pain point with a scalable, production-ready tracking system that keeps costs down and performance up.
Some of the main features include:
1. 💼 Segment compatibility: Fully compatible with the Segment tracking spec (e.g., track(), identify(), group()), so you don’t need to rewrite tracking code.
2. ⚡ Built for scale: Trench is designed to handle thousands of events per second on a single node, ensuring fast and efficient event tracking.
3. 🔍 Real-time queries: Run analytics with read-after-write guarantees in real-time, which gives a huge edge for live insights.
4. 🚀 Simple deployment: Just one Docker image that packages everything you need—no need to manage Kafka, ClickHouse, or node setup.
5. 🔌 Seamless integration: Plug into any cloud-hosted ClickHouse or Kafka provider like ClickHouse Cloud or Confluent.
Use Cases:
- Real-Time Monitoring: Set up alerts for critical metrics like error rates or usage spikes and get notified instantly.
- Event Replay & Debugging: Capture every interaction for easy event replay and debugging.
- A/B Testing: Use real-time segmentation and event capture to tailor experiences on the fly for different user groups.
- SaaS Product Analytics: Integrate Trench with your SaaS product to power audit logs or user tracking features.
- Custom RAG (Retrieval-Augmented Generation) Models: Use event data in real-time to power search or personalized responses with SQL queries, which can enhance your app's AI capabilities.
Trench is open source (MIT licensed), and we're exploring future features like Elastic Search integration, direct data exports (Redshift, S3), and an admin UI for managing queries and webhooks.
Would love to hear your thoughts on how you’ve tackled the scaling challenges of event tracking or if you have any feedback on Trench!
Report
Love that there is an open source version. Are there UI components, templates to use or do you need to create your own?
This event tracking infrastructure is impressive. Well done keep up the amazing work.
Report
I would be ever so grateful if you could be so kind as to prepare a thoroughly elucidative video demonstration. The present assortment of screenshots, while no doubt crafted with the best intentions, has left me rather adrift in a sea of perplexity. A comprehensive video, I daresay, would provide the clarity and coherence one so ardently seeks.
Great job on launching Trench! This open source analytics infrastructure looks like a game-changer for businesses looking to track events quickly and efficiently. I'm curious, how does Trench stand out from other analytics solutions on the market?
@ihuzaifashoukat When we looked for existing solutions, all the existing OSS projects we found were either bloated with unnecessary features, UIs and spaghetti code, or simply antiquated. Another big problem was that many OSS solutions were built on simply inserting events into row-based databases (such as MySQL or Postgres), which simply doesn't scale when you hit 1M+ MAUs. ClickHouse and Kafka provide a columnar datastore with queued data ingestion, which scales incredibly well for querying big datasets and inserting a lot of data in real time.
Report
Kafka never made click for me, this looks this couples the basic set you need to get going with great developer experience and abstraction - will definitely give it a try!
Frigade
Frigade
IntroJoy
Frigade
IntroJoy
Frigade
Frigade