{"by":"vadman97","descendants":110,"id":35643255,"kids":[35649666,35658613,35655714,35659051,35668259,35646010,35657763,35657710,35660853,35660441,35657035,35658018,35660475,35668618,35662311,35655547,35659719,35661806,35660748,35656540,35643317],"score":192,"text":"Hey hn! I&#x27;m one of the co-founders of highlight.io, an open source monitoring tool.<p>Today we&#x27;re sharing a ClickHouse-based logging solution we&#x27;ve been working on. We wanted to showcase how we built it and share how you could try it out to give feedback.\nSince we started working on highlight.io, we&#x27;ve been hyper-focused on &quot;cohesion&quot;, or ensuring that when you install your monitoring stack, all of the resources in that stack (user interactions, requests, traces, logs, etc.) are connected in a consumable way. We&#x27;ve written up more about our philosophy on this here [1].<p>We started building towards this by connecting your client-side app and your server-side exceptions with session replay and exception monitoring; i.e. if an error happened in a server-side app, we would make it easy (with session replay) to trace all the steps that a user took leading up to it.<p>Especially for larger companies using highlight.io, the request to tie in logs came up repeatedly, and we wanted to build this with the same philosophy in mind. Now, you&#x27;ll see client-side and server-side logs all in one place, brought together in the context of a user session, as well as logs in the context of an error.<p>Like the rest of our stack, this project is written in Go and Typescript, and for log ingestion&#x2F;querying, we&#x27;re using ClickHouse [2]. Before deciding on ClickHouse, we were planning to use OpenSearch (an aws fork of elasticsearch [3]) for this part of our product, but as our traffic has increased, we encountered quite a few pains with write throughput for OpenSearch. After evaluating a few options, we eventually landed with ClickHouse (their cloud offering was icing on the cake), which has also proven to be much more cost-effective so far.<p>Building with ClickHouse from scratch has been an exciting journey. Eric (the mastermind behind this project) wrote a blog post [4] on a handful of ClickHouse learnings we&#x27;ve gathered since starting the project.<p>For those wanting to try out the product locally, you can run the following commands [5]:<p>git clone --recurse-submodules <a href=\"https:&#x2F;&#x2F;github.com&#x2F;highlight&#x2F;highlight\">https:&#x2F;&#x2F;github.com&#x2F;highlight&#x2F;highlight</a>\ncd highlight&#x2F;docker;\n.&#x2F;run-hobby.sh;<p>To send logs to highlight, you can use your own OpenTelemetry implementation [6] or use our SDKs [7] which provide lightweight wrappers over OTEL.<p>Like the rest of highlight.io, we plan to make money from this with our hosted cloud offering. For those interested in trying out the cloud-hosted version, you can get setup at app.highlight.io.<p>To open the floor for feedback, we would love to get some thoughts on what we&#x27;ve built so far. Beyond that, what are parts of a logging product you wish you had with your current setup? And are there any notable pain-points of using a hosted monitoring product? (We&#x27;re toying with the idea of an enterprise deployment). Excited to hear from everyone.<p>[1]: <a href=\"https:&#x2F;&#x2F;highlight.io&#x2F;docs&#x2F;general&#x2F;company&#x2F;product-philosphy\">https:&#x2F;&#x2F;highlight.io&#x2F;docs&#x2F;general&#x2F;company&#x2F;product-philosphy</a><p>[2]: <a href=\"https:&#x2F;&#x2F;clickhouse.com\" rel=\"nofollow\">https:&#x2F;&#x2F;clickhouse.com</a><p>[3]: <a href=\"https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26780848\" rel=\"nofollow\">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26780848</a><p>[4]: <a href=\"https:&#x2F;&#x2F;www.highlight.io&#x2F;blog&#x2F;how-we-built-logging-with-clickhouse\">https:&#x2F;&#x2F;www.highlight.io&#x2F;blog&#x2F;how-we-built-logging-with-clic...</a><p>[5]: <a href=\"https:&#x2F;&#x2F;www.highlight.io&#x2F;docs&#x2F;getting-started&#x2F;self-host&#x2F;self-hosted-hobby-guide\">https:&#x2F;&#x2F;www.highlight.io&#x2F;docs&#x2F;getting-started&#x2F;self-host&#x2F;self...</a><p>[6]: <a href=\"https:&#x2F;&#x2F;www.highlight.io&#x2F;docs&#x2F;getting-started&#x2F;backend-logging&#x2F;http\">https:&#x2F;&#x2F;www.highlight.io&#x2F;docs&#x2F;getting-started&#x2F;backend-loggin...</a><p>[7]: <a href=\"https:&#x2F;&#x2F;www.highlight.io&#x2F;docs&#x2F;getting-started&#x2F;overview#for-your-backend-logging\">https:&#x2F;&#x2F;www.highlight.io&#x2F;docs&#x2F;getting-started&#x2F;overview#for-y...</a>","time":1682011591,"title":"Show HN: We built a ClickHouse-based logging service","type":"story","url":"https://github.com/highlight/highlight/blob/main/README.md"}