Skip to content
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

support more params #729

Merged
merged 1 commit into from Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions agent/logs_endpoints.go
Expand Up @@ -187,11 +187,11 @@ func NewEndpoints(main logsconfig.Endpoint, useProto bool, typ string) *logsconf
Additionals: nil,
UseProto: useProto,
Type: typ,
BatchWait: time.Duration(logsConfig.BatchWait) * time.Second,
// TODO support custom param
BatchMaxConcurrentSend: 0,
BatchMaxSize: 100,
BatchMaxContentSize: 1000000,

BatchWait: time.Duration(logsConfig.BatchWait) * time.Second,
BatchMaxConcurrentSend: coreconfig.BatchConcurrence(),
BatchMaxSize: coreconfig.BatchMaxSize(),
BatchMaxContentSize: coreconfig.BatchMaxContentSize(),
}
}

Expand Down
2 changes: 1 addition & 1 deletion conf/logs.toml
Expand Up @@ -28,7 +28,7 @@ frame_size = 9000
chan_size = 1000
## pipeline num , default 4
## 有多少线程处理日志
pipelin=4
pipeline=4
## configuration for kafka
## 指定kafka版本
kafka_version="3.3.2"
Expand Down
3 changes: 3 additions & 0 deletions config/logs.go
Expand Up @@ -120,6 +120,9 @@ func BatchMaxSize() int {
if Config.Logs.BatchMaxSize == 0 {
Config.Logs.BatchMaxSize = 100
}
if Config.Logs.BatchMaxSize < Config.Logs.ChanSize {
Config.Logs.BatchMaxSize = Config.Logs.ChanSize
}
return Config.Logs.BatchMaxSize
}

Expand Down