Skip to content

fix: rate limit logging based on tenant id and error op code#1785

Closed
filipecabaco wants to merge 1 commit intomainfrom
fix/rate-limit-logger
Closed

fix: rate limit logging based on tenant id and error op code#1785
filipecabaco wants to merge 1 commit intomainfrom
fix/rate-limit-logger

Conversation

@filipecabaco
Copy link
Copy Markdown
Member

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

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
@filipecabaco filipecabaco force-pushed the fix/rate-limit-logger branch from ec1541f to e31b53e Compare April 2, 2026 14:13

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})
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@filipecabaco
Copy link
Copy Markdown
Member Author

#1793

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants