Skip to content
This repository has been archived by the owner on Aug 30, 2019. It is now read-only.

config: add "connection_limit" option to yaml config #443

Merged
merged 1 commit into from
Jun 25, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions config/merge_yaml.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ type traceAgent struct {
LogFilePath string `yaml:"log_file"`
ReplaceTags []*ReplaceRule `yaml:"replace_tags"`
ReceiverPort int `yaml:"receiver_port"`
ConnectionLimit int `yaml:"connection_limit"`
APMNonLocalTraffic *bool `yaml:"apm_non_local_traffic"`

WatchdogMaxMemory float64 `yaml:"max_memory"`
Expand Down Expand Up @@ -180,6 +181,10 @@ func (c *AgentConfig) loadYamlConfig(yc *YamlAgentConfig) {
c.ReceiverPort = yc.TraceAgent.ReceiverPort
}

if yc.TraceAgent.ConnectionLimit > 0 {
c.ConnectionLimit = yc.TraceAgent.ConnectionLimit
}

if yc.TraceAgent.ExtraSampleRate > 0 {
c.ExtraSampleRate = yc.TraceAgent.ExtraSampleRate
}
Expand Down