-
Notifications
You must be signed in to change notification settings - Fork 93
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
Demote many log lines from info to debug #452
Conversation
s.Logger.DebugContext(ctx, s.Name+logPrefixRanSuccessfully, | ||
slog.Int("num_jobs_deleted", res.NumJobsDeleted), | ||
) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's some argument to be made that these changes are detrimental to debugging tests, but I generally find that if I'm debugging anything non-trivial I need to add more log statements anyway because the existing ones just aren't enough.
s.Logger.InfoContext(ctx, s.Name+": Rescued batch of jobs", | ||
slog.Int64("num_jobs_discarded", res.NumJobsDiscarded), | ||
slog.Int64("num_jobs_retried", res.NumJobsRetried), | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of these services sort of had doubled up run lines. I took one half out and just left the line above.
We've had reports that a running River client can be quite a noisy affair, producing too much logging in general. Here, we move many log lines from info to debug. I suspect the most impactful is that we had a bunch in the elector and notifier that would fire quite often during run of the mill operation. I left a couple in place, although I'm not 100% sure it's the right thing: * The 5 second heartbeat loop in the client that prints job statistics. I figure that if this is the _main_ log line being emitted, with others being quite rare, it might be okay. We could also consider moving it to be more infrequent like every 10 seconds. * I left the maintenance service "done run" log lines as info for the time being, but I changed them so that they only print in case there were >0 results, so I think the result is that most of them are silent most of the time, except perhaps in an actual production situation. I figure we can try this as a pass, see how it is, and then possibly demote more if it's still annoying.
dcd9637
to
eff824b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤫
Thanks! |
We've had reports that a running River client can be quite a noisy
affair, producing too much logging in general.
Here, we move many log lines from info to debug. I suspect the most
impactful is that we had a bunch in the elector and notifier that would
fire quite often during run of the mill operation.
I left a couple in place, although I'm not 100% sure it's the right
thing:
The 5 second heartbeat loop in the client that prints job statistics.
I figure that if this is the main log line being emitted, with
others being quite rare, it might be okay. We could also consider
moving it to be more infrequent like every 10 seconds.
I left the maintenance service "done run" log lines as info for the
time being, but I changed them so that they only print in case there
were >0 results, so I think the result is that most of them are silent
most of the time, except perhaps in an actual production situation.
I figure we can try this as a pass, see how it is, and then possibly
demote more if it's still annoying.