Remove hardcoded url schema
This commit is contained in:
parent
e46da5a181
commit
94a1601ab2
@ -18,11 +18,15 @@ const (
|
||||
func NewElasticSearchTransport(connectionString string) (TracerTransport, error) {
|
||||
conUrl, err := url.Parse(connectionString)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
username := conUrl.User.Username()
|
||||
password, _ := conUrl.User.Password()
|
||||
cfg := elasticsearch.Config{
|
||||
Addresses: []string{
|
||||
"https://" + conUrl.Host,
|
||||
conUrl.Scheme + conUrl.Host,
|
||||
},
|
||||
Username: username,
|
||||
Password: password,
|
||||
|
Loading…
Reference in New Issue
Block a user