-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Provide some more pointers for logger overload protection #13855
Conversation
The previous docs didn't mention that logger may drop messages entirely, which I think is important to call out (and not just because I finished a long debugging journey to find these :) ). This should give a fair overview of the built-in overload protections, similar to what I tried to do in erlang/otp#8855 I think this can really help folks be aware of some of these.
* Alternates between sync and async modes to remain | ||
performant when required but also apply back-pressure | ||
when under stress. | ||
* Provides multiple forms of [overload protection](https://www.erlang.org/doc/apps/kernel/logger_chapter.html#protecting-the-handler-from-overload): |
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.
The line is too long, unsure how to break it up or if there's a better way to link to it - but I found calling out the specific chapter for details valuable.
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.
It's fine, no worries!
* Provides multiple forms of [overload protection](https://www.erlang.org/doc/apps/kernel/logger_chapter.html#protecting-the-handler-from-overload): | ||
* keeps track of its message queue and switches to sync mode to apply | ||
back pressure or even drop messages | ||
* limits the number of logs emitted defaulting to 500 per second |
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'm unsure what level of detail to provide as defaults may change, however I found it surprising how compartively low this limit is and so I found it worth calling out
CI failed on something unrelated, I can't restart it - I could push an empty commit but that probably wouldn't be great 🤔
|
That was a race, it should be fixed here: #13856 |
Neat! |
* Alternates between sync and async modes to remain | ||
performant when required but also apply back-pressure | ||
when under stress. | ||
* Provides multiple forms of [overload protection](https://www.erlang.org/doc/apps/kernel/logger_chapter.html#protecting-the-handler-from-overload): |
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.
It's fine, no worries!
Thanks @PragTob! 💟 |
The previous docs didn't mention that logger may drop messages entirely, which I think is important to call out (and not just because I finished a long debugging journey to find these :) ).
This should give a fair overview of the built-in overload protections, similar to what I tried to do in erlang/otp#8855
I think this can really help folks be aware of some of these.
As always, thank you a lot for all your work 💚