Skip to content

Commit 4b49ced

Browse files
committed
TASK-113041: New configuration options for debug throttling
Signed-off-by: Doug Koerich <[email protected]>
1 parent bee6896 commit 4b49ced

File tree

2 files changed

+88
-0
lines changed

2 files changed

+88
-0
lines changed

content/momentum/4/config-options-summary.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ The `Version` column indicated the version(s) of Momentum that support the optio
111111
| [debug](/momentum/4/config/ref-debug-flags) – Set the debug level | na |   | 4.0 and later | debug_flags |
112112
| [debug_flags](/momentum/4/config/ref-debug-flags) *(scope)* – Configure debug verbosity | na |   | 4.0 and later | global |
113113
| [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 |
114+
| [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 |
115+
| [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 |
114116
| [default_binding](/momentum/4/config/ref-default-binding) – Control the default binding | sending | normal | 4.0 and later | global |
115117
| [default_charset](/momentum/4/config/ref-default-charset) – Control the character set | both | us-ascii | 4.0 and later | global, pathway, pathway_group |
116118
| [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 |
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
---
2+
lastUpdated: "12/31/2025"
3+
title: "Throttling Debug Messages"
4+
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"
5+
---
6+
7+
When using the default logging module, debug messages will appear in the [paniclog](/momentum/4/log-formats-paniclog)
8+
depending on subsystem and level settings configured in [Debug_Flags](/momentum/4/config/ref-debug-flags). `Debug_Flags` is
9+
usually empty, so very few events are written to the `paniclog`. However, under certain circumstances, you need to get more
10+
information about some subsystem's behavior (e.g., SMTP), then by setting `Debug_Flags`, you can enable more verbose logging
11+
into `paniclog`. On the other hand, depending on the chosen level, `paniclog` may get populated with several lines of the same
12+
message, including some that might not be of your interest.
13+
14+
Momentum’s debug throttling configuration allows you to suppress repeated debug messages. The throttle suppresses the logging
15+
of repeated messages beyond a specified limit during a time interval also specified. It is a global setting that applies to
16+
messages of all subsystems.
17+
18+
> **NOTE:** Debug throttling global configuration **DOES NOT** apply to messages logged at the `CRITICAL`, `ERROR`, or
19+
> `WARNING` levels of any subsystem, due to their relevance for operation and diagnosis.
20+
21+
It is important to note that debug throttling is applied not necessarily to *identical* messages, but to messages that are
22+
considered the same after removing variable parts such as timestamps, IP addresses, or other dynamic content. In other words,
23+
if the source of the message is something like this:
24+
25+
```
26+
<timestamp> Message received from: <mailfrom>
27+
```
28+
29+
then all messages that match this pattern will be considered the same for throttling purposes, regardless of the actual
30+
values of `<timestamp>` and `<mailfrom>`. This ensures that the throttling mechanism effectively reduces log noise while still capturing relevant information.
31+
32+
<a name="conf.ref.debug_throttle"></a>
33+
# Configuration options
34+
35+
Debug throttling is configured using the following options in the global scope of your `ecelerity.conf` file:
36+
- **debug_throttle_max_num_same_message**
37+
- **debug_throttle_period_secs**
38+
39+
<a name="conf.ref.debug_throttle_max_num_same_message"></a>
40+
## Maximum number of the same message
41+
42+
<a name="conf.ref.debug_throttle_max_num_same_message.name"></a>
43+
### Name
44+
45+
`debug_throttle_max_num_same_message`
46+
47+
<a name="conf.ref.debug_throttle_max_num_same_message.description"></a>
48+
### Description
49+
50+
Sets the maximum number of repeated debug messages to log within a specified time interval. The default is `0`, which means no
51+
throttling is applied to the logging of repeated debug messages.
52+
53+
<a name="conf.ref.debug_throttle_period_secs.example"></a>
54+
### Example
55+
56+
```
57+
debug_throttle_max_num_same_message = 5
58+
```
59+
60+
With this configuration, only five lines debug messages will be logged during the time interval specified by
61+
`debug_throttle_period_secs`.
62+
63+
<a name="conf.ref.debug_throttle_period_secs"></a>
64+
## Time interval of throttling
65+
66+
<a name="conf.ref.debug_throttle_period_secs.name"></a>
67+
### Name
68+
`debug_throttle_period_secs`
69+
70+
<a name="conf.ref.debug_throttle_period_secs.description"></a>
71+
### Description
72+
73+
Sets the time interval in seconds during which repeated debug messages are counted for throttling purposes. The default is
74+
`1` second, with a maximum of `60` seconds.
75+
76+
<a name="conf.ref.debug_throttle_period_secs.example"></a>
77+
### Example
78+
```
79+
debug_throttle_period_secs = 30
80+
```
81+
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.
82+
83+
<a name="conf.ref.debug_throttle.scope"></a>
84+
# Scope
85+
86+
debug_flags is valid in the global scope.

0 commit comments

Comments
 (0)