EliAndrewC / sideboard

BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Logging prefix #52

Closed EliAndrewC closed 8 years ago

EliAndrewC commented 10 years ago

As a developer trying to debug a problem in production, I'd like a common logging prefix to be shown on all related requests across multiple servers, to help me isolate relevant log messages.

Let's say a user on example.com makes a websocket request to foo.bar. Behind the scenes, that method makes a separate request to baz.baf, which is a remote service running on example.org, so we make an websocket RPC request.

When debugging a problem, it can be tricky and annoying to link the requests on different servers to one another. Since all logging goes through sideboard.lib.log, it would be pretty easy to generate a random logging token and prepend that to our log messages. When making any outgoing request, we'd add a log_token field to the websocket JSON, which would be used if present.

EliAndrewC commented 8 years ago

Moved to https://github.com/magfest/sideboard/issues/36