News for hackers. Stuff that matters.
Re:Clever Functional Design by toast0 on Wednesday August 28, 2019 @02:29AM (#20817380)
It wouldn't make sense to log most of these events outside the context of the http request -- it makes sense to smash it all into the one log line. Otherwise you have no simple way to tie everything back together; you could make an id for each request and tie everything back to that, but that is inconvenient, slow, and mostly a way to justify a Hadoop cluster you don't actually need.

That's not the key insight though. The key insight is not to try to log the time something took -- instead, log the beginning and the end, and calculate the duration later. This makes the logging apis much simpler and enables measuring times between events in different scopes without coupling the different scopes.

There are no comments on this comment yet.