File 0104-Provide-an-overview-of-logger-overload-protection.patch of Package erlang

From 420d3f9ee60a589c95fb40d080ce346221fb9a3f Mon Sep 17 00:00:00 2001
From: Tobias Pfeiffer <pragtob@gmail.com>
Date: Tue, 24 Sep 2024 13:35:39 +0200
Subject: [PATCH] Provide an overview of logger overload protection

Digging into the topic of logger overload protection I found it
somewhat hard to follow and keep track of what all the systems
do on a high level.

It probably doesn't solve this for everything, but I think
providing a high level overview of the measures in place can
help others to better understand the mechanisms and dive into
the one they care the most about.
---
 lib/kernel/doc/guides/logger_chapter.md | 21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)

diff --git a/lib/kernel/doc/guides/logger_chapter.md b/lib/kernel/doc/guides/logger_chapter.md
index 1d809b5766..dec252db8a 100644
--- a/lib/kernel/doc/guides/logger_chapter.md
+++ b/lib/kernel/doc/guides/logger_chapter.md
@@ -973,10 +973,23 @@ do_log(Fd, LogEvent, #{formatter := {FModule, FConfig}}) ->
 
 ## Protecting the Handler from Overload
 
-The default handlers, `m:logger_std_h` and `m:logger_disk_log_h`, feature an
-overload protection mechanism, which makes it possible for the handlers to
-survive, and stay responsive, during periods of high load (when huge numbers of
-incoming log requests must be handled). The mechanism works as follows:
+The default handlers, `m:logger_std_h` and `m:logger_disk_log_h`, feature
+multiple overload protection mechanisms, which make it possible for the
+handlers to survive, and stay responsive, during periods of high load
+(when huge numbers of incoming log requests must be handled).
+
+The mechanisms are as follows:
+* [**message queue length**](#message-queue-length): the handler process tracks
+its message queue length and takes actions depending on its size, from turning
+on a sync mode to dropping messages.
+* [**limit the number of logs emitted**](#controlling-bursts-of-log-requests):
+the handlers will handle a maximum number of log events per time unit,
+defaulting to 500 per second.
+* [**terminate an overloaded handler**](#terminating-an-overloaded-handler):
+a handler can be terminated and restarted automatically if it exceeds message
+queue length or memory thresholds - this is disabled by default.
+
+These mechanisms are described in more detail in the following sections.
 
 ### Message Queue Length
 
-- 
2.43.0

openSUSE Build Service is sponsored by