-
-
Notifications
You must be signed in to change notification settings - Fork 173
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
Rate limiting ignored #258
Comments
Hi there :-) Your config looks okay in principle. Could you please provide some context? E.g. what you mean by "goes bonkers", if this only happens with Slack, if you have any reproducible example, etc. |
I think my issue here was I was expecting rate limiting to occur at the appender level (i.e. stop flooding our Slack channel), but instead it's at the error source level. So it was working, just wasn't really doing what I expected. |
@deepxg, I think I had the same doubt about the rate limit configuration. After reading the source code and executing some tests, I concluded the rate limit is message-dependent. We need to think of the rate limit for each possible logging message. If all logging messages are different, no rate limit kicks in. Is my observation correct, @ptaoussanis? |
The first time I tried to test the rate limit my logging messages had the value of a counter, and no limit was ever imposed. I saw the limits kicking in when I logged only two different messages in a loop. |
Hi there! Timbre uses this heuristic for identifying logging calls for the purposes of rate-limiting, etc. I.e. each unique combination of the following identifies an individual rate-limiter:
I.e. you can think of the default limiter behaviour as per (logging callsite and argument content). If you'd prefer alternative behaviour, you can either:
Hope that helps! Cheers :-) [R1] e.g. |
Thanks for the quick response, @ptaoussanis! My tests confirm everything you said. I was able to find the hash composition here after your comment. Wouldn't be worth it to add a link to your comment in |
Will add some documentation on the next release 👍 |
Rate limiting behaviour will be explained in more detail in forthcoming release, thanks Andre! |
I have an appender that sends stuff to Slack, and I had hoped that I'd rate limited it properly, but it occasionally goes bonkers. Is there any obvious issue with this config?
I'd assumed that meant it'd send no more than 1 message a second, but that's not the case.
The text was updated successfully, but these errors were encountered: