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

app/log: decrease default log filter from 1h to 12s #2467

Merged
merged 2 commits into from
Jul 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/log/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ type filter struct {
limit rate.Limit
}

// defaultFilter returns the default filter with a period of 1 hour.
// defaultFilter returns the default filter with a period of 1 slot.
func defaultFilter() filter {
return filter{limit: rate.Every(time.Hour)}
return filter{limit: rate.Every(time.Second * 12)}
}

// Filter returns a stateful structure logging field that results in
Expand All @@ -39,7 +39,7 @@ func defaultFilter() filter {
// for event := range eventPipe() {
// err := process(event)
// if err != nil {
// log.Error(ctx, "This error should only be logged max once an hour", err, filter)
// log.Error(ctx, "This error should only be logged max once a slot (12s)", err, filter)
// }
// }
func Filter(opts ...FilterOption) z.Field {
Expand Down
Loading