fix: rate limit logging based on tenant id and error op code#1785
Closed
filipecabaco wants to merge 1 commit intomainfrom
Closed
fix: rate limit logging based on tenant id and error op code#1785filipecabaco wants to merge 1 commit intomainfrom
filipecabaco wants to merge 1 commit intomainfrom
Conversation
Adding new logging option that rate limits logs based on tenant and error opcode so we can prevent noisy logs at the tenant level and at the error level as a more broad approach to reduce log volume
ec1541f to
e31b53e
Compare
chasers
requested changes
Apr 2, 2026
|
|
||
| case :ets.lookup(@log_rate_table, key) do | ||
| [{^key, ^count, window_start}] when now - window_start >= window_ms -> | ||
| :ets.insert(@log_rate_table, {key, 1, now}) |
Contributor
There was a problem hiding this comment.
This creates a row per tenant, code, 300,000 milliseconds? With N tenants and N codes how many rows with this have after a day? Are we cleaning it anywhere?
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
Adding new logging option that rate limits logs based on tenant and error opcode so we can prevent noisy logs at the tenant level and at the error level as a more broad approach to reduce log volume