Skip to content

Commit 77cefb4

Browse files
committed
feat: Increase session aggr max entries default value
1 parent 3efe03d commit 77cefb4

File tree

6 files changed

+12
-6
lines changed

6 files changed

+12
-6
lines changed

agent/src/config/config.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1796,7 +1796,7 @@ impl Default for RequestLogTunning {
17961796
fn default() -> Self {
17971797
Self {
17981798
payload_truncation: 1024,
1799-
session_aggregate_max_entries: 16384,
1799+
session_aggregate_max_entries: 65536,
18001800
consistent_timestamp_in_l7_metrics: false,
18011801
}
18021802
}

agent/src/config/handler.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ use super::{
4949
config::{
5050
ApiResources, Config, DpdkSource, ExtraLogFields, ExtraLogFieldsInfo, HttpEndpoint,
5151
HttpEndpointMatchRule, OracleConfig, PcapStream, PortConfig, ProcessorsFlowLogTunning,
52-
SessionTimeout, TagFilterOperator, UserConfig,
52+
RequestLogTunning, SessionTimeout, TagFilterOperator, UserConfig,
5353
},
5454
ConfigError, KubernetesPollerType,
5555
};
@@ -1003,7 +1003,8 @@ impl Default for LogParserConfig {
10031003
fn default() -> Self {
10041004
Self {
10051005
l7_log_collect_nps_threshold: 0,
1006-
l7_log_session_aggr_max_entries: 16384,
1006+
l7_log_session_aggr_max_entries: RequestLogTunning::default()
1007+
.session_aggregate_max_entries,
10071008
l7_log_session_aggr_max_timeout: SessionTimeout::DEFAULT,
10081009
l7_log_session_aggr_timeout: HashMap::new(),
10091010
l7_log_dynamic: L7LogDynamicConfig::default(),

agent/src/flow_generator/protocol_logs/parser.rs

+5
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,11 @@ impl SessionQueue {
672672

673673
fn flush_till(&mut self, time: Timestamp) {
674674
self.entries.forward_time(time, |item| {
675+
self.counter.cached.fetch_sub(1, Ordering::Relaxed);
676+
self.counter.cached_request_resource.fetch_sub(
677+
item.l7_info.get_request_resource_length() as u64,
678+
Ordering::Relaxed,
679+
);
675680
self.bs.send(item.clone(), Some(L7ResponseStatus::Timeout));
676681
None
677682
});

server/agent_config/README-CH.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7792,7 +7792,7 @@ LRU 策略淘汰以减少内存占用。注意,被淘汰的 l7_flow_log 条目
77927792
processors:
77937793
request_log:
77947794
tunning:
7795-
session_aggregate_max_entries: 16384
7795+
session_aggregate_max_entries: 65536
77967796
```
77977797

77987798
**模式**:

server/agent_config/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8012,7 +8012,7 @@ The following metrics can be used as reference data for adjusting this configura
80128012
processors:
80138013
request_log:
80148014
tunning:
8015-
session_aggregate_max_entries: 16384
8015+
session_aggregate_max_entries: 65536
80168016
```
80178017

80188018
**Schema**:

server/agent_config/template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5458,7 +5458,7 @@ processors:
54585458
# ch: |-
54595459
# 会话聚合最大条目数。
54605460
# 如果 l7_flow_log 条目总数超过该配置,最老的条目将被丢弃,并设置其 response 状态为 `Unknown`。
5461-
session_aggregate_max_entries: 16384
5461+
session_aggregate_max_entries: 65536
54625462
# type: bool
54635463
# name:
54645464
# en: Consistent Timestamp in L7 Metrics

0 commit comments

Comments
 (0)