frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Wide logging: Stripe's canonical log line pattern

https://blog.alcazarsec.com/tech/posts/wide-logging
18•alcazar•2h ago

Comments

formerly_proven•1h ago
It's strange how undercooked logging is (not just in standard libraries, but in general) given everyone and every app does it.
alcazar•1h ago
It's one of those things that keeps getting reinvented over and over. Most people don't want to put in the effort to perfect it.

For the longest time, I've done the bare minimum and just used console.log/print for whatever I thought I needed in that particular piece of code; without any coherent system.

deskamess•54m ago
Are there any restrictions on how short the error_slug should be? The meat of some of my errors can be pretty long (for example an ffmpeg error). There are also many phases to a job - call them tasks. Can a canonical log line be a collection of task log lines?
alcazar•49m ago
You should avoid dumping the raw error entirely. The idea is that error_slug is a stable grouping key.

The idea is to consolidate all that can be grouped into one logical unit. So you would do one long log line at the end, after all tasks are done.

bradleybuda•49m ago
This is all good advice but it's not what I would traditionally think of as "logging" - it's something more like what the industry calls APM or tracing.

> For a web service, that usually means one log event at the end of every request.

The point of a log, as I have seen it used, is to understand what's going on during a request. Yes, some of that is timing / success / failure information, but you also need:

- Logical tracing - at a high level, what decisions did we make (authz, business logic) when serving this request

- Partial failures or warnings - the request may have succeeded, but we may have failed or timed out a call to a dependent service and delivered a partially degraded response as a result

- Tracepoints to support active development - how often do we hit a certain codepath (to help developers roll out or deprecate features)

It's useful to distinguish between "context" (things we know about a request), timing, success, and plain old logging (using human language to describe to an operator what the system is doing). Context should be included with every line - I strongly agree with OP's proposal of wide events, don't make operators ever JOIN if you can avoid it - but it won't always be the same because we learn things about the request as we process it. Yes, if you wait until the end of a request, you will have maximal context, but at the loss of fine-grained detail during processing.

alcazar•40m ago
I don't believe this should replace traditional logging but rather complement it. It transforms breadcrumbs into unified records that are easier to query during an incident.

I completely agree with your plain-old logging list. I would add canonical log lines in addition to the normal log traces. They serve as the summary at the end.

t-writescode•35m ago
I’ve worked at a company where all we had were large, unified, post-request logs and honestly those logs were orders of magnitude easier to work with than having to coallate lots of logs into a single concept. ELK liked those giant logs more, too.

It does help that the system was built from the ground up to use the big logs.

I think the best feature was that we would extract and build a ton of keys into the full-size log, so you could find all transactions related to X really, really easily, where X was a wide variety of things.

Every place I’ve been elsewhere the logs have always been way harder to parse, process or even just find. It would always take several disparate queries to get everything.

E.g. “oh, we need to find something related to X? Well okay, that gives us 50 different separate calls, now let’s do another search on each of those calls’ unique transaction id and review each whole transaction individually” vs “I need X. Cool, here’s all 50, complete calls.”

Edit: to be clear, throughout the code it was just “context.info()”, over and over again, like regular logging, it was just shoved into a big object at the end of all non-application-crashing exceptions. And the application was built to not fully crash, like, ever. (And this worked)

whorleater•41m ago
Honestly I'm kinda down on most of FB's tech, but them pioneering Scuba was pretty sick. It has all the wide logging/apm/tracing/etc, and it's hard to describe how useful it is if you haven't seen it in action.
joaonmatos•32m ago
This is not much different than CloudWatch metric events. At Amazon we output a service log or Embedded Metrics Format event with these things.
zamalek•29m ago
This is just structured logging. Slog in go, tracing in rust, serilog in C#, etc. You should be combining this with the likes of otel or datadog, which will keep those fields structured and filterable.
stephantul•26m ago
I’ve never been so conflicted about an article. It has clearly been generated by an llm, but still has useful content. It’s a good article, but…

AI Coding Is Gambling

https://notes.visaint.space/ai-coding-is-gambling/
73•speckx•1h ago•52 comments

Death to Scroll Fade

https://dbushell.com/2026/01/09/death-to-scroll-fade/
233•PaulHoule•3h ago•117 comments

Snowflake AI Escapes Sandbox and Executes Malware

https://www.promptarmor.com/resources/snowflake-ai-escapes-sandbox-and-executes-malware
151•ozgune•2h ago•40 comments

Show HN: Will my flight have Starlink?

46•bblcla•55m ago•26 comments

A tiny, decentralised tool to explore the small web

https://codeberg.org/susam/wander
92•carte_blanche•2h ago•13 comments

Rob Pike's Rules of Programming (1989)

https://www.cs.unc.edu/~stotts/COMP590-059-f24/robsrules.html
615•vismit2000•8h ago•338 comments

OpenRocket

https://openrocket.info/
80•zeristor•3d ago•20 comments

I haven't used a mouse for 14 years

https://axelk.ee/i-havent-used-a-mouse-for-14-years-and-how-to-enable-three-fingers-drag-on-macos/
12•speckx•48m ago•15 comments

2025 Turing award given for quantum information science

https://awards.acm.org/about/2025-turing
21•srvmshr•8h ago•4 comments

Machine Payments Protocol (MPP)

https://stripe.com/blog/machine-payments-protocol
81•bpierre•3h ago•37 comments

Show HN: Hacker News archive (47M+ items, 11.6GB) as Parquet, updated every 5m

https://huggingface.co/datasets/open-index/hacker-news
69•tamnd•4d ago•19 comments

Nightingale – open-source karaoke app that works with any song on your computer

https://nightingale.cafe/
383•rzzzzru•10h ago•107 comments

Nvidia NemoClaw

https://github.com/NVIDIA/NemoClaw
92•hmokiguess•2h ago•56 comments

Federal Cyber Experts Called Microsoft's Cloud "A Pile of Shit", yet Approved It

https://www.propublica.org/article/microsoft-cloud-fedramp-cybersecurity-government
286•hn_acker•4h ago•124 comments

Wander – A tiny, decentralised tool (just 2 files) to explore the small web

https://susam.net/wander/
37•oystersareyum•2h ago•12 comments

Show HN: Tmux-IDE, OSS agent-first terminal IDE

https://tmux.thijsverreck.com
4•thijsverreck•38m ago•1 comments

Write up of my homebrew CPU build

https://willwarren.com/2026/03/12/building-my-own-cpu-part-3-from-simulation-to-hardware/
198•wwarren•3d ago•34 comments

Mistral AI Releases Forge

https://mistral.ai/news/forge
680•pember•21h ago•173 comments

CVE-2026-3888: Important Snap Flaw Enables Local Privilege Escalation to Root

https://blog.qualys.com/vulnerabilities-threat-research/2026/03/17/cve-2026-3888-important-snap-f...
14•askl•2h ago•5 comments

Google Engineers Launch "Sashiko" for Agentic AI Code Review of the Linux Kernel

https://www.phoronix.com/news/Sashiko-Linux-AI-Code-Review
43•speckx•2h ago•15 comments

Restoring the first recording of computer music (2018)

https://www.bl.uk/stories/blogs/posts/restoring-the-first-recording-of-computer-music
21•OJFord•4d ago•8 comments

A Decade of Slug

https://terathon.com/blog/decade-slug.html
713•mwkaufma•23h ago•69 comments

A dither generator for triangular and hexagonal pixels (2025)

https://danieltemkin.com/DitherStudies
3•strombolini•4d ago•0 comments

Americans Recognize AI as a Wealth Inequality Machine, Polls Find

https://gizmodo.com/americans-recognize-ai-as-a-wealth-inequality-machine-pollsters-find-2000734713
19•randycupertino•1h ago•2 comments

North Korean's 100k fake IT workers net $500M a year for Kim

https://www.theregister.com/2026/03/18/researchers_lift_the_lid_on/
74•speckx•2h ago•70 comments

Oil nears $110 a barrel after gas field strike

https://www.bbc.com/news/articles/c78x83lpgngo
12•tartoran•31m ago•1 comments

Ndea (YC W26) is hiring a symbolic RL search guidance lead

https://ndea.com/jobs/search-guidance
1•mikeknoop•11h ago

Using calculus to do number theory

https://hidden-phenomena.com/articles/hensels
66•cpp_frog•2d ago•10 comments

Celebrating Tony Hoare's mark on computer science

https://bertrandmeyer.com/2026/03/16/celebrating-tony-hoares-mark-on-computer-science/
96•benhoyt•11h ago•26 comments

The pleasures of poor product design

https://www.inconspicuous.info/p/the-pleasures-of-poor-product-design
218•NaOH•17h ago•76 comments