From 2f7fb97d53d76f29c0e09bef691116b9fee86c4b Mon Sep 17 00:00:00 2001 From: Gabriel Aszalos Date: Mon, 25 Jun 2018 15:30:31 +0200 Subject: [PATCH] config: add "connection_limit" option to yaml config (#443) This adds the `connection_limit` configuration option to the yaml configuration `apm_config` section to match the `ini` settings. --- config/merge_yaml.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config/merge_yaml.go b/config/merge_yaml.go index 70a547c29..1fe5a2e1c 100644 --- a/config/merge_yaml.go +++ b/config/merge_yaml.go @@ -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"` @@ -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 }