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

config: support overriding agent endpoint via env #405

Merged
merged 1 commit into from
Apr 10, 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
4 changes: 4 additions & 0 deletions config/merge_env.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ func mergeEnv(c *AgentConfig) {
c.HostName = v
}

if v := os.Getenv("DD_APM_DD_URL"); v != "" {
c.APIEndpoint = v
}

if v := os.Getenv("DD_API_KEY"); v != "" {
vals := strings.Split(v, ",")
for i := range vals {
Expand Down