From 4b49ced2941a1034d91cf49cd68f54e79bdfcf6f Mon Sep 17 00:00:00 2001 From: Doug Koerich Date: Wed, 29 Oct 2025 10:58:07 -0300 Subject: [PATCH 1/6] TASK-113041: New configuration options for debug throttling Signed-off-by: Doug Koerich --- content/momentum/4/config-options-summary.md | 2 + .../momentum/4/config/ref-debug-throttle.md | 86 +++++++++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 content/momentum/4/config/ref-debug-throttle.md diff --git a/content/momentum/4/config-options-summary.md b/content/momentum/4/config-options-summary.md index abbbb8b3e..e1aa6cdef 100644 --- a/content/momentum/4/config-options-summary.md +++ b/content/momentum/4/config-options-summary.md @@ -111,6 +111,8 @@ The `Version` column indicated the version(s) of Momentum that support the optio | [debug](/momentum/4/config/ref-debug-flags) – Set the debug level | na |   | 4.0 and later | debug_flags | | [debug_flags](/momentum/4/config/ref-debug-flags) *(scope)* – Configure debug verbosity | na |   | 4.0 and later | global | | [debug_level](/momentum/4/4-module-config) – Set the module debug level (applicable to all modules) (cluster-specific) | na | error | 4.0 and later | cluster | +| [debug_throttle_max_num_same_message](/momentum/4/config/ref-debug-throttle) – Maximum number of identical debug messages to log within an interval | na | 0 | 5.2 and later | global | +| [debug_throttle_period_secs](/momentum/4/config/ref-debug-throttle) – Time interval for debug message throttling, in seconds | na | 1 | 5.2 and later | global | | [default_binding](/momentum/4/config/ref-default-binding) – Control the default binding | sending | normal | 4.0 and later | global | | [default_charset](/momentum/4/config/ref-default-charset) – Control the character set | both | us-ascii | 4.0 and later | global, pathway, pathway_group | | [delay_dsn_max_retry_interval](/momentum/4/config/ref-delay-dsn-max-retry-interval) – Maximum interval for sending DSNs to the sender of a message that has not yet been delivered | sending | 43200 | 4.0 and later | binding, binding_group, domain, global | diff --git a/content/momentum/4/config/ref-debug-throttle.md b/content/momentum/4/config/ref-debug-throttle.md new file mode 100644 index 000000000..221b53831 --- /dev/null +++ b/content/momentum/4/config/ref-debug-throttle.md @@ -0,0 +1,86 @@ +--- +lastUpdated: "12/31/2025" +title: "Throttling Debug Messages" +description: "Configure throttling to tell Momentum how to suppress repeated debug messages. When using the default logging module the messages will appear in the paniclog. The throttle is a decimal number representing the maximum number of repeated debug messages to log within a specified time interval" +--- + +When using the default logging module, debug messages will appear in the [paniclog](/momentum/4/log-formats-paniclog) +depending on subsystem and level settings configured in [Debug_Flags](/momentum/4/config/ref-debug-flags). `Debug_Flags` is +usually empty, so very few events are written to the `paniclog`. However, under certain circumstances, you need to get more +information about some subsystem's behavior (e.g., SMTP), then by setting `Debug_Flags`, you can enable more verbose logging +into `paniclog`. On the other hand, depending on the chosen level, `paniclog` may get populated with several lines of the same +message, including some that might not be of your interest. + +Momentum’s debug throttling configuration allows you to suppress repeated debug messages. The throttle suppresses the logging +of repeated messages beyond a specified limit during a time interval also specified. It is a global setting that applies to +messages of all subsystems. + +> **NOTE:** Debug throttling global configuration **DOES NOT** apply to messages logged at the `CRITICAL`, `ERROR`, or +> `WARNING` levels of any subsystem, due to their relevance for operation and diagnosis. + +It is important to note that debug throttling is applied not necessarily to *identical* messages, but to messages that are +considered the same after removing variable parts such as timestamps, IP addresses, or other dynamic content. In other words, +if the source of the message is something like this: + +``` + Message received from: +``` + +then all messages that match this pattern will be considered the same for throttling purposes, regardless of the actual +values of `` and ``. This ensures that the throttling mechanism effectively reduces log noise while still capturing relevant information. + + +# Configuration options + +Debug throttling is configured using the following options in the global scope of your `ecelerity.conf` file: +- **debug_throttle_max_num_same_message** +- **debug_throttle_period_secs** + + +## Maximum number of the same message + + +### Name + +`debug_throttle_max_num_same_message` + + +### Description + +Sets the maximum number of repeated debug messages to log within a specified time interval. The default is `0`, which means no +throttling is applied to the logging of repeated debug messages. + + +### Example + +``` +debug_throttle_max_num_same_message = 5 +``` + +With this configuration, only five lines debug messages will be logged during the time interval specified by +`debug_throttle_period_secs`. + + +## Time interval of throttling + + +### Name +`debug_throttle_period_secs` + + +### Description + +Sets the time interval in seconds during which repeated debug messages are counted for throttling purposes. The default is +`1` second, with a maximum of `60` seconds. + + +### Example +``` +debug_throttle_period_secs = 30 +``` +With this configuration, the time interval for counting repeated debug messages is set to 30 seconds. Combined with the previous example, only five lines of the same debug message will be logged every 30 seconds. + + +# Scope + +debug_flags is valid in the global scope. From 7c0645239b8b10c93f797a2304e6abd9cd7565c7 Mon Sep 17 00:00:00 2001 From: Doug Koerich Date: Wed, 29 Oct 2025 11:06:51 -0300 Subject: [PATCH 2/6] TASK-113041: Unrelated change to clear build error Signed-off-by: Doug Koerich --- content/momentum/3/3-push/push-http-request-eval.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/momentum/3/3-push/push-http-request-eval.md b/content/momentum/3/3-push/push-http-request-eval.md index 53783b18f..d921cd53c 100644 --- a/content/momentum/3/3-push/push-http-request-eval.md +++ b/content/momentum/3/3-push/push-http-request-eval.md @@ -32,7 +32,7 @@ function mod:http_request_eval(sess) DzyjAI8maYIogujSPtq-jSUG0WybCQ0mT1eGOZsgy0" local request = "{ \"registration_ids\": [ \"" .. reg_id .. "\" ], \"dry_run\": true, » \"data\": { \"message\": \"Push message to send over GCM\" } }" - local auth_key = "AIzaSyA09R1jflwVV4T79OIuLtTxQyXKFlOVQfs" + local auth_key = "REDACTED" -- print new json request to paniclog.ec for ref print ("new json request = ", request) @@ -69,4 +69,4 @@ You must use require `("msys.httpclnt")` to enable this hook point and to access After changing HTTP session data, be sure to use the `sess:request_finalize` function. -The [ob_get_current_message](/momentum/3/3-reference/3-reference-lua-ref-msys-delivery-ob-get-current-message) function uses this parameter to return a message. See also [Lua Functions](/momentum/3/3-reference/3-reference-lua-summary-table) for more information about the functions used in [“http_response_eval example”](/momentum/3/3-push/push-http-response-eval#push.http_response_eval.example). \ No newline at end of file +The [ob_get_current_message](/momentum/3/3-reference/3-reference-lua-ref-msys-delivery-ob-get-current-message) function uses this parameter to return a message. See also [Lua Functions](/momentum/3/3-reference/3-reference-lua-summary-table) for more information about the functions used in [“http_response_eval example”](/momentum/3/3-push/push-http-response-eval#push.http_response_eval.example). From b185ac1427d7f6082e8121bf1228d5b77c498a9b Mon Sep 17 00:00:00 2001 From: Doug Koerich Date: Wed, 29 Oct 2025 11:23:41 -0300 Subject: [PATCH 3/6] TASK-113041: Fixing bad copy & paste Signed-off-by: Doug Koerich --- content/momentum/4/config/ref-debug-throttle.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/momentum/4/config/ref-debug-throttle.md b/content/momentum/4/config/ref-debug-throttle.md index 221b53831..f01957a74 100644 --- a/content/momentum/4/config/ref-debug-throttle.md +++ b/content/momentum/4/config/ref-debug-throttle.md @@ -83,4 +83,4 @@ With this configuration, the time interval for counting repeated debug messages # Scope -debug_flags is valid in the global scope. +Debug throttling options are valid in the global scope. From c66ad99877b51c968b89695420e677300177d246 Mon Sep 17 00:00:00 2001 From: Doug Koerich Date: Wed, 29 Oct 2025 11:28:26 -0300 Subject: [PATCH 4/6] TASK-113041: Better writing Signed-off-by: Doug Koerich --- content/momentum/4/config/ref-debug-throttle.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/content/momentum/4/config/ref-debug-throttle.md b/content/momentum/4/config/ref-debug-throttle.md index f01957a74..c85cdddbf 100644 --- a/content/momentum/4/config/ref-debug-throttle.md +++ b/content/momentum/4/config/ref-debug-throttle.md @@ -57,7 +57,7 @@ throttling is applied to the logging of repeated debug messages. debug_throttle_max_num_same_message = 5 ``` -With this configuration, only five lines debug messages will be logged during the time interval specified by +With this configuration, only five lines of the same debug message will be logged during the time interval specified by `debug_throttle_period_secs`. @@ -78,7 +78,9 @@ Sets the time interval in seconds during which repeated debug messages are count ``` debug_throttle_period_secs = 30 ``` -With this configuration, the time interval for counting repeated debug messages is set to 30 seconds. Combined with the previous example, only five lines of the same debug message will be logged every 30 seconds. +With this configuration, the time interval for counting repeated debug messages is set to 30 seconds. Combined with the +previous example for `debug_throttle_max_num_same_message`, only five lines of the same debug message will be logged every +30 seconds. # Scope From 25f71f373e3600cf45fc6e7d3264e6422d1ebf8a Mon Sep 17 00:00:00 2001 From: Doug Koerich Date: Thu, 6 Nov 2025 17:01:53 -0300 Subject: [PATCH 5/6] TASK-113041: Better clarification on message sameness for throttling Signed-off-by: Doug Koerich --- content/momentum/4/config/ref-debug-throttle.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/content/momentum/4/config/ref-debug-throttle.md b/content/momentum/4/config/ref-debug-throttle.md index c85cdddbf..76f5d4b26 100644 --- a/content/momentum/4/config/ref-debug-throttle.md +++ b/content/momentum/4/config/ref-debug-throttle.md @@ -27,7 +27,8 @@ if the source of the message is something like this: ``` then all messages that match this pattern will be considered the same for throttling purposes, regardless of the actual -values of `` and ``. This ensures that the throttling mechanism effectively reduces log noise while still capturing relevant information. +values of `` and ``. This happens because the default logging module is based on `printf`-style +formatting, which allows variable content in log messages, and it is the formatting that determines message sameness. # Configuration options From 7bc2d21c09c1353104b4e01661f1607207b983dc Mon Sep 17 00:00:00 2001 From: Doug Koerich Date: Fri, 7 Nov 2025 11:55:12 -0300 Subject: [PATCH 6/6] TASK-113041: Rewording Signed-off-by: Doug Koerich --- content/momentum/4/config/ref-debug-throttle.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/momentum/4/config/ref-debug-throttle.md b/content/momentum/4/config/ref-debug-throttle.md index 76f5d4b26..359a20394 100644 --- a/content/momentum/4/config/ref-debug-throttle.md +++ b/content/momentum/4/config/ref-debug-throttle.md @@ -28,7 +28,7 @@ if the source of the message is something like this: then all messages that match this pattern will be considered the same for throttling purposes, regardless of the actual values of `` and ``. This happens because the default logging module is based on `printf`-style -formatting, which allows variable content in log messages, and it is the formatting that determines message sameness. +format strings, which allows variable content in log messages, and it is the format string that determines message sameness. # Configuration options