-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Send logs from workers to master and improve log viewer tab in the Web UI #2750
Send logs from workers to master and improve log viewer tab in the Web UI #2750
Conversation
@cyberw Opening as a draft just to check that worker logs are something we want to add and then I will add tests for this Let me know if you're also good with how the logs are displayed now |
This looks great. Can we maybe limit the number of log messages sent from workers to something like 10 per log interval? (I dont want workers spamming the master) And also, if there are no logs, skip sending the message entirely (typically the workers should be very quiet) And it needs some basic tests too. |
Side note: if we switch from mypy to pylance/pyright it might become fast enough to add it to the precommit hook. |
cd3d8cf
to
08a9585
Compare
I updated now so that we only push worker logs when we see new logs. I think this should be sufficiently quiet since the workers rarely log more than one or two logs unless there are issues |
The thing I'm worried about is if a worker does have an issue - in that case we dont want it bringing the master down with it by spamming lots of messages :) (if all workers have issues, then maybe it doesnt matter but if only one breaks down it would be nice to prevent this) |
344f8b8
to
7047966
Compare
Not suggesting adding another flag but would "worker logs being sent to master" be configurable in some way? Not sure if we're alone but not uncommon to run with hundreds -> thousands of worker processes and 100k+ users attached to a single master In larger scenarios it might get absolutely obliterated |
Good point. We might want to think a little more on this. But in the normal case, workers should be kinda quiet though? |
Normally you'd expect so yeah, don't think anyone's going to be logging out (btw the log beautification is immense, well played @andrewbaldwin44 👏) |
@mquinnfd Thanks for the comments! There is some logic for sending the logs from the workers. For example, if there are no new logs the workers won't send a message, plus it will quit sending messages all together if the worker tries to send > 10 logs at one time
|
@mquinnfd |
2939120
to
64a5662
Compare
Hero! |
Also recommending something like Colourblindly here for the log colours as the text itself is fairly narrow - don't wanna inadvertently make some entries harder to read There a good write-up on this here (but you probably already know your way around this as a FE specialist 🙇) |
64a5662
to
62a7193
Compare
62a7193
to
e912793
Compare
You know what would make this even more awesome? If you could make the headings for each worker the same color as the highest log level from that worker. |
a767486
to
0a83954
Compare
0a83954
to
baff575
Compare
Yup it's ready! 🚀 |
Proposal