TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Launch HN: Patchwork (YC S24) – Automatically add structured logs to your code

104 点作者 benjaminfh9 个月前
Hey HN! We are Sam, Alex and Ben from Patchwork Technologies (<a href="https:&#x2F;&#x2F;getpatchwork.io">https:&#x2F;&#x2F;getpatchwork.io</a>). Patchwork automatically adds actionable structured logs to your code. Big picture: we are building a next generation logging and observability platform which gives engineers the rich debugging context they need.<p>There’s a demo video (<a href="https:&#x2F;&#x2F;youtu.be&#x2F;ObIepiXfVx0" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;ObIepiXfVx0</a>), as well as a demo^ instance with some results for you to explore at <a href="https:&#x2F;&#x2F;hackernews.getpatchwork.io">https:&#x2F;&#x2F;hackernews.getpatchwork.io</a> (no sign-in required!) The demo shows the analysis and improvement (against a style guide) of existing logs. It’s set up for two OSS repositories, <a href="https:&#x2F;&#x2F;github.com&#x2F;elastic&#x2F;cloud-on-k8s">https:&#x2F;&#x2F;github.com&#x2F;elastic&#x2F;cloud-on-k8s</a> and our awesome friends at Glasskube (<a href="https:&#x2F;&#x2F;github.com&#x2F;glasskube&#x2F;glasskube">https:&#x2F;&#x2F;github.com&#x2F;glasskube&#x2F;glasskube</a>). We welcome suggestions of other OSS Go repositories that you would like to see added!<p>Why we are building this: At our previous company, we relied heavily on actionable, context-rich structured logs. They were the unsexy but critical tool for managing complex software at scale. When they’re implemented well, they allow you to understand the application state when things break. Structured logs are easier to search and run analytics on. The trouble is that they are time-consuming to implement properly – if you’re reading this, you know it’s a chore. We all know it’s usually an SRE (like Alex) that finds out at 2 am that logs were added as an afterthought. Unstructured and spammy – <i>Error: Failed to do task.</i> Datadog made metrics easy; we are creating that moment for logs.<p>We&#x27;ve grappled with some tough technical challenges to build our product. First, identifying log statements in codebases where logger symbols are inconsistently named or output directly to stdout&#x2F;stderr. We solved this with SCIP, indexing symbol references at compile time. Next, we needed to provide the LLM with method context and variable types to ensure we accurately understand what the code is doing. This is achieved using tree-sitter for parsing and SCIP for repo navigation. Finally, we addressed the critical need to reason whether specific data can&#x2F;should be logged before bringing this all together in an improved logging statement. We’re staring down the next challenge – where should logging statements go in new code?<p>Refactoring the logs in existing code bases today is a manual slog. Even finding the existing logging and <i>printf</i> statements is tricky at scale. It’s possible to rely on Copilot in VS Code or Cursor to help construct logs as you write new code. However, there are many more reasoning steps required than these tools are designed to do. They are general purpose, zero-shot machines.<p>Our first goal is to reliably improve existing logging statements (as in the demo). In the next couple of weeks we aim to prove-out adding logs to new applications. Structured logs provide downstream benefits when it comes to storage and query time – our final goal is to build a storage layer that exploits this.<p>Your honest feedback would mean a lot to us. We have a lot of conviction that observability needs a shake up, and that going back and getting the basics right is valuable. We’d love to hear what you think works and doesn’t work in current approaches, and whether Patchwork solves a problem for you. Chat with us on Discord: <a href="https:&#x2F;&#x2F;discord.gg&#x2F;fkVTgX5s" rel="nofollow">https:&#x2F;&#x2F;discord.gg&#x2F;fkVTgX5s</a>.<p>^If you&#x27;d like to enrol additional repos and run analysis on them, there&#x27;s a magic link step.

13 条评论

btown9 个月前
This looks really, really cool. In the Python world, we can rely on tools like Sentry to be able to say &quot;on any exception or logger.warning, crawl the stack and show me all the variables at every level.&quot; And we&#x27;ve also set up Honeycomb to record log entries as OpenTelemetry spans, which lets us see logs in context of database queries etc., and do structured queries about when and how certain things occur. Which means that we can just instruct our team to &quot;err on the side of adding simple log statements, even if it&#x27;s just a static string without variables; we can dig for those reactively.&quot;<p>But in a codebase where far more of the complexity is in native code and doesn&#x27;t cross network boundaries, I imagine folks feel like they&#x27;re flying blind without those tools that we Python devs can take for granted. So Patchwork is desperately needed. I&#x27;d be very curious to see how your larger observability platform integrates with the broader world of OpenTelemetry, where the native code might be part of a broader distributed system. It&#x27;s cool to see this space moving forward so quickly!
评论 #41392737 未加载
carlsverre9 个月前
Really cool idea! You may want to update the explainer video to use a different example of incorrect logger usage though. The current example (<a href="https:&#x2F;&#x2F;youtu.be&#x2F;ObIepiXfVx0?si=-lumV_0ShKLpNl_h&amp;t=203" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;ObIepiXfVx0?si=-lumV_0ShKLpNl_h&amp;t=203</a>) claims that the use of Println is incorrect and logger.Info should be used instead. However, that would break the command in question as the command is outputting the current configuration as YAML. By using logger.Info, the additional logging prefix would make the user&#x27;s life more difficult when they presumably output the command into a file or attempt to copy and paste the output. I&#x27;m sure that over time Patchwork will learn how to filter out these false-positives, but perhaps it&#x27;s not the best thing to show off in the demo.
评论 #41394544 未加载
devneelpatel9 个月前
OneUptime.com already does it with the copilot feature. It also fixes exceptions, add structured logs, optimizes functions &#x2F; spans that take a long time to complete and integrates with OpenTelemetry natively.<p>It&#x27;s also 100% open-source.
评论 #41401448 未加载
DistractionRect9 个月前
Congrats on the launch! I&#x27;m probably just missing it as I only know enough python to be dangerous, but where can I find your MoA implementation in the source code?<p>The write up [0] sounds really useful, and says it&#x27;s open source, but for the life of me I can&#x27;t find it.<p>[0] <a href="https:&#x2F;&#x2F;www.patched.codes&#x2F;blog&#x2F;patched-moa-optimizing-inference-for-diverse-software-development-tasks">https:&#x2F;&#x2F;www.patched.codes&#x2F;blog&#x2F;patched-moa-optimizing-infere...</a>
评论 #41401466 未加载
aviperl9 个月前
On the topic of structured logs, can anyone point me towards where I might learn more about what people have learned over time?<p>I&#x27;m new to the world of querying through my logs, but I can already see a benefit to logging with JSON...<p>This is what I&#x27;ve defined as a solution for a need of mine for the moment: <a href="https:&#x2F;&#x2F;gist.github.com&#x2F;avi-perl&#x2F;b173fdc30219155eb9ee4bb3a21c4104" rel="nofollow">https:&#x2F;&#x2F;gist.github.com&#x2F;avi-perl&#x2F;b173fdc30219155eb9ee4bb3a21...</a>
评论 #41394127 未加载
ucarion9 个月前
This is really cool. Is the &quot;standards&quot; thing basically some sort of LLM prompt? Like, do I just say in words &quot;use slog, discourage logrus&quot;?
评论 #41392798 未加载
spimmy9 个月前
Excited to see this!! Very much on board with this sort of approach to the future -- wide, structured logs, a balance between machines doing the heavy lifting + humans adding intent to the signal. Also VERY excited to see honeycomb customers already popping up in the comments .. i can&#x27;t wait to see what these tools can do together.
评论 #41401488 未加载
mrgoldenbrown9 个月前
Am I missing where they explain what languages&#x2F;logging frameworks they support? Their blog page is somewhat broken on Firefox (Android) so maybe I just can&#x27;t see something? If it&#x27;s only for one language shouldn&#x27;t the headline include that important detail
评论 #41403004 未加载
brap9 个月前
Your landing page sucks, I don’t care about your team or your marketing text, I want to see the code!
评论 #41394200 未加载
anushnaidu9 个月前
It looks awesome..<p>Does it checks the Log Levels and whether it&#x27;s appropriate or not
评论 #41392851 未加载
willks9 个月前
This looks really cool, this would be very valuable for us a small team. Do you have plans for pricing levels?
评论 #41401524 未加载
fnord1239 个月前
&gt; Refactoring the logs in existing code bases today is a manual slog.<p>Nice.
评论 #41395994 未加载
andrewshadura9 个月前
Sorry, but the name&#x27;s already taken: Patchwork is an online patch review tool.
评论 #41394691 未加载