-
Notifications
You must be signed in to change notification settings - Fork 111
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
RSDK-9345 Deduplicate noisy logs #4564
base: main
Are you sure you want to change the base?
Conversation
if imp.dedupNoisyLogs { | ||
// If we have have entered a new recentMessage window, output noisy logs from | ||
// the last window. | ||
if time.Since(imp.recentMessageWindowStart) > noisyMessageWindowDuration { |
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.
I know this is not a PR, but just noting that I think most of this code would need to be wrapped in a lock.
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.
Yeah totally correct, will want a more "careful" implementation eventually.
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.
Lock added.
7696072
to
ffde341
Compare
ffde341
to
d55ea23
Compare
d55ea23
to
afe9b2e
Compare
if imp.dedupNoisyLogs { | ||
// If we have have entered a new recentMessage window, output noisy logs from | ||
// the last window. | ||
if time.Since(imp.recentMessageWindowStart) > noisyMessageWindowDuration { |
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.
Lock added.
assertLogMatches(t, notStdout, | ||
`2023-10-30T13:19:45.806Z INFO impl logging/impl_test.go:132 foo {"key":"value"}`) | ||
|
||
// TODO(benji): Add the following assertions to test more deduplication logic. |
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.
Still working on testing a bit, but thought I'd throw this into review before the holiday.
RSDK-9345
Main changes:
disable_log_deduplication
JSON flag to potentially disable the logic described in the above two pointsTesting changes: