-
Notifications
You must be signed in to change notification settings - Fork 36
TASK-113041: New configuration options for debug throttling #810
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
base: main
Are you sure you want to change the base?
Changes from 5 commits
4b49ced
7c06452
b185ac1
c66ad99
25f71f3
7bc2d21
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| --- | ||
| 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: | ||
|
|
||
| ``` | ||
| <timestamp> Message received from: <mailfrom> | ||
| ``` | ||
|
|
||
| then all messages that match this pattern will be considered the same for throttling purposes, regardless of the actual | ||
| values of `<timestamp>` and `<mailfrom>`. 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. | ||
|
||
|
|
||
| <a name="conf.ref.debug_throttle"></a> | ||
| # 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** | ||
|
|
||
| <a name="conf.ref.debug_throttle_max_num_same_message"></a> | ||
| ## Maximum number of the same message | ||
|
|
||
| <a name="conf.ref.debug_throttle_max_num_same_message.name"></a> | ||
| ### Name | ||
|
|
||
| `debug_throttle_max_num_same_message` | ||
|
|
||
| <a name="conf.ref.debug_throttle_max_num_same_message.description"></a> | ||
| ### 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. | ||
|
|
||
| <a name="conf.ref.debug_throttle_period_secs.example"></a> | ||
| ### Example | ||
|
|
||
| ``` | ||
| debug_throttle_max_num_same_message = 5 | ||
| ``` | ||
|
|
||
| With this configuration, only five lines of the same debug message will be logged during the time interval specified by | ||
| `debug_throttle_period_secs`. | ||
|
|
||
| <a name="conf.ref.debug_throttle_period_secs"></a> | ||
| ## Time interval of throttling | ||
|
|
||
| <a name="conf.ref.debug_throttle_period_secs.name"></a> | ||
| ### Name | ||
| `debug_throttle_period_secs` | ||
|
|
||
| <a name="conf.ref.debug_throttle_period_secs.description"></a> | ||
| ### 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. | ||
|
|
||
| <a name="conf.ref.debug_throttle_period_secs.example"></a> | ||
| ### 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 for `debug_throttle_max_num_same_message`, only five lines of the same debug message will be logged every | ||
| 30 seconds. | ||
|
|
||
| <a name="conf.ref.debug_throttle.scope"></a> | ||
| # Scope | ||
|
|
||
| Debug throttling options are valid in the global scope. | ||
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.
Curious how we do this matching, and what parts are considered to be dedupe-able? We might want to consider documenting the exact semantic as the behavior observed in logs will be customer visible.
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.
Please look at the updated paragraph.