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

Commit

Permalink
config: add "connection_limit" option to yaml config (#443)
Browse files Browse the repository at this point in the history
This adds the `connection_limit` configuration option to the yaml
configuration `apm_config` section to match the `ini` settings.
  • Loading branch information
gbbr committed Jun 26, 2018
1 parent 2fa96fa commit 2f7fb97
Showing 1 changed file with 5 additions and 0 deletions.
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

0 comments on commit 2f7fb97

Please sign in to comment.