-
Notifications
You must be signed in to change notification settings - Fork 625
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
Ignore ELASTICSEARCH_URL when config set? #113
Comments
I think the motivation was to prevent surprises about what happens when both are set: does one take precedence over the other? Do they get merged? (Eg., in your case, if the environment variable gets set suddenly in a test environment, should it be picked up by the client?) I'm fine with removing the restriction, but we need to figure out a clear solution to the case when both are set. Intuitively, I'd say that when |
Agreed, I'd expect code to take precedence over environment variables. |
I've merged the 86a626c commit into |
Per
go-elasticsearch/elasticsearch.go
Lines 86 to 100 in cb4ea94
ELASTICSEARCH_URL
in the environment and pass in addresses - I'd like to reconsider this limitation, perhaps some background on why would help? I don't see the same restriction in the python client.APM Server recently started using go-elasticsearch and coincidentally someone introduced
ELASTICSEARCH_URL
into the test environment, causing tests fail as the es client could not be created. This was surprising since APM Server always creates a client withconfig.Addresses
.The text was updated successfully, but these errors were encountered: