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

Commit

Permalink
Allow ResourceBlacklist to be specified through ENV vars
Browse files Browse the repository at this point in the history
  • Loading branch information
p-lambert committed Aug 17, 2017
1 parent 2cf2a43 commit 09ac151
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ where env vars are preferrable to static files
- `DD_BIND_HOST` - overrides `[Main] bind_host`
- `DD_LOG_LEVEL` - overrides `[Main] log_level`
- `DD_RECEIVER_PORT` - overrides `[trace.receiver] receiver_port`
- `DD_RESOURCE_BLACKLIST` - overrides `[trace.config] resource_blacklist`


## Logging
Expand Down
4 changes: 4 additions & 0 deletions config/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ func mergeEnv(c *AgentConfig) {
c.ReceiverHost = v
}

if v := os.Getenv("DD_RESOURCE_BLACKLIST"); v != "" {
c.ResourceBlacklist, _ = splitString(v, ',')
}

if v := os.Getenv("DD_DOGSTATSD_PORT"); v != "" {
port, err := strconv.Atoi(v)
if err != nil {
Expand Down

0 comments on commit 09ac151

Please sign in to comment.