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

Parallel template-execution: marking console logs by thread/template #889

Open
colleenXu opened this issue Oct 17, 2024 · 3 comments
Open
Labels
enhancement New feature or request next phase for future if we're funded

Comments

@colleenXu
Copy link
Collaborator

Maybe for next phase.

With parallel template-execution, it's harder to understand the console logs (what template they're associated with). I've discussed this with Jackson.

It would be nice if each console log was marked with what template it was executing (can be the order in the templateGroup list).
Or if the console logs for each template-execution was marked with an ID, and some console logs at the beginning mapped each ID to what template was being executed.

Err...but this may be complicated to do, particularly since this (1 creative query's execution) all happens in 1 thread. And the template-execution-level logging is separate from the module keeping track of what info goes with what template.

@rjawesome
Copy link
Contributor

rjawesome commented Nov 1, 2024

PRs use Node.JS Async Hooks to annotate debug logs with the appropriate template name when running in creative mode. Ex below:

image
image

The major changes are in utils (which contains most of the new debugging code) and query graph handler (which adds the context of the template to each promise).

@tokebe
Copy link
Member

tokebe commented Nov 20, 2024

Clever solution -- however, my understanding is that async hooks are considered experimental and not for production use

@tokebe tokebe added the next phase for future if we're funded label Nov 20, 2024
@rjawesome
Copy link
Contributor

I have migrated the code to the stable AsyncLocalStorage API (and specifically the stable methods run/getStore).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request next phase for future if we're funded
Projects
None yet
Development

No branches or pull requests

3 participants