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

Assign UUID to each incoming message #147

Open
dongxinEric opened this issue Apr 8, 2019 · 2 comments
Open

Assign UUID to each incoming message #147

dongxinEric opened this issue Apr 8, 2019 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@dongxinEric
Copy link
Contributor

Right now it's hard to debug a specific bug that's reproducible by a query on a running production server since it's hard to locate the log (trace event log) that is related to this specific message. Thus if DocLayer can assign a UUID for each incoming message and somehow attach that UUID with all loggings produced when processing it, future debugging will be much easier.

@dongxinEric dongxinEric added enhancement New feature or request good first issue Good for newcomers labels Apr 8, 2019
@apkar
Copy link
Contributor

apkar commented Apr 8, 2019

Yeah, this would be super helpful.

We should probably have some kind of request context which we pass around across all functions. For example, Plan::execute() functions are unaware of the user request they are working on. We could imagine a better version of ExtMsg as the request context. Although the way current code is structured, it makes sense for it to be part of DocTransaction, as almost all functions have access to it. Considering the plan to reduce the dependency on DocTransaction we have to see what is the better fit here.

Another aspect of this problem is tracing, TraceEvent doesn't work like Java log4j framework, we can't change the log/trace level on the fly. All trace events are logged all the time. We probably don't want to enable request level tracing all the time. That would roll over logs very quickly. We should come up with a scheme to have request level logs disabled by default. We should be able to enable them with a custom MongoDB command.

@dongxinEric
Copy link
Contributor Author

Yes. This also means that once we have such UUID ready, we need to attach that UUID to the reply message we sent to the user too.

@apkar apkar added this to the 1.8.0 milestone Apr 8, 2019
@apkar apkar modified the milestones: 1.8.0, 2.0.0 Aug 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants