Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging prefix for call chains on a distributed system #36

Open
EliAndrewC opened this issue Sep 14, 2016 · 2 comments
Open

Logging prefix for call chains on a distributed system #36

EliAndrewC opened this issue Sep 14, 2016 · 2 comments

Comments

@EliAndrewC
Copy link
Contributor

Moved here from the original (now private) issue tracker.

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.

@binary1230
Copy link
Contributor

YEA, also awesome. I was thinking about the exact same thing for cherrypy, implementing some kind of request_id for logging

@EliAndrewC
Copy link
Contributor Author

Agreed, I didn't necessarily make this clear in the ticket description, but I intend this as a general feature and not just for websocket call chains.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants