5 ms·
I'm surprised there's no mention of tagging with some kind of correlation ID. I find that even generating a quick one-off GUID at the beginning of the request
by tombert 5y ago
I'm surprised there's no mention of tagging with some kind of correlation ID. I find that even generating a quick one-off GUID at the beginning of the request (to be used across the entire request) makes tracing server logs substantially easier. I just tag every log (and exception) with that ID, so when searching with grep or Splunk or whatever, I have a quick and easy way to disambiguate which log is connected to other logs.
- wainstead 5y agoAnd there's a standard for it: https://www.w3.org/TR/trace-context/ https://www.w3.org/TR/trace-context/ Many libraries and tools support the standard now.
- kerblang 5y agoJust an opinion, but I tend to think of this as distributed monolithic development... the more log correlation is needed, the more likely a requirement has been chopped up and then duct-taped back together over HTTP.
- NovemberWhiskey 5y agoNot sure I follow that logic? If you have a heavily used service, it's likely to have many concurrent requests logging into the same log stream and you absolutely need a request correlation identifier to be able to thread the log statements for a single request back together. That's essential even if you don't actually call any other services as part of your implementation.
- hinkley 5y agoCorrelationIDs aren’t just good for hard failures. They’re also good for figuring out why your backend started getting 20% more traffic on Monday for no reason. Someone introduced a duplicate call somewhere. But where?
- kerblang 5y agoLate reply: This scenario is reasonable and I usually handle it by logging the thread ID in multi-threaded systems, which amounts to a "free" global variable.
- jniedrauer 5y agoWhat about distributed systems? I had to reach for this tool recently to trace requests as they propagate through up to 5 separate devices. Not everything is a web app.