New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update tests and doc comments to use SERVER_URL #858
Conversation
The Go Agent will continue to support SERVER_URLS, but we will de-epmphasise its use in favour of using load balancer proxies with agents generally. We never actually documented SERVER_URLS in the user docs, so nothing to do there.
// use the default URL "http://localhost:8200". | ||
// - ELASTIC_APM_SERVER_URL: the APM Server URL used for sending | ||
// requests. If no URL is specified, then the transport will use the | ||
// default URL "http://localhost:8200". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a minor thing, but since ELASTIC_APM_SERVER_URLS
is deprecated, should we also change the order of how the ENV vars are parsed, so that ELASTIC_APM_SERVER_URL
is always used if provided.
apm-agent-go/transport/http.go
Lines 528 to 538 in 8b1a0fe
// initServerURLs parses ELASTIC_APM_SERVER_URLS if specified, | |
// otherwise parses ELASTIC_APM_SERVER_URL if specified. If | |
// neither are specified, then the default localhost URL is | |
// returned. | |
func initServerURLs() ([]*url.URL, error) { | |
key := envServerURLs | |
value := os.Getenv(key) | |
if value == "" { | |
key = envServerURL | |
value = os.Getenv(key) | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did think about doing that, and decided at the time to make it a purely non-functional change. I don't think it's likely to matter either way, but I'd like to avoid a breaking change unless necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume since you approved that you're good either way, so I'll merge. If you disagree with my decision, let me know and we can come back to it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I am fine either way - thanks for the explanation.
The Go Agent will continue to support SERVER_URLS,
but we will de-epmphasise its use in favour of using
load balancer proxies with agents generally. We never
actually documented SERVER_URLS in the user docs,
so nothing to do there.
Closes #850