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

Commit

Permalink
config: add DD_CONNECTION_LIMIT env var (#451)
Browse files Browse the repository at this point in the history
  • Loading branch information
gbbr committed Jul 12, 2018
1 parent 0e234b0 commit 85678e0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions config/merge_env.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,19 @@ const (
envIgnoreResources = "DD_IGNORE_RESOURCE" // ignored resources
envLogLevel = "DD_LOG_LEVEL" // logging level
envAnalyzedSpans = "DD_APM_ANALYZED_SPANS" // spans to analyze for transactions
envConnectionLimit = "DD_CONNECTION_LIMIT" // limit of unique connections
)

// loadEnv applies overrides from environment variables to the trace agent configuration
func (c *AgentConfig) loadEnv() {
if v, ok := os.LookupEnv(envConnectionLimit); ok {
limit, err := strconv.Atoi(v)
if err != nil {
log.Errorf("failed to parse DD_CONNECTION_LIMIT: %v", err)
} else {
c.ConnectionLimit = limit
}
}
if v := os.Getenv(envAPMEnabled); v == "true" {
c.Enabled = true
} else if v == "false" {
Expand Down

0 comments on commit 85678e0

Please sign in to comment.