diff options
author | 2020-11-10 20:03:14 +0100 | |
---|---|---|
committer | 2020-11-10 19:03:14 +0000 | |
commit | b7814204a49f05ecb9f5920bb28038b0f09e4cd8 (patch) | |
tree | d5a999b7e096a7b95fc0cd6cb358b4f7ed907ff9 /plugin/trace/setup.go | |
parent | dd2a1bfc82ea340e96b2a6639b836fba699bf807 (diff) | |
download | coredns-b7814204a49f05ecb9f5920bb28038b0f09e4cd8.tar.gz coredns-b7814204a49f05ecb9f5920bb28038b0f09e4cd8.tar.zst coredns-b7814204a49f05ecb9f5920bb28038b0f09e4cd8.zip |
plugin/trace: Fix zipkin json_v2 (#4180)
Automatically submitted.
Diffstat (limited to 'plugin/trace/setup.go')
-rw-r--r-- | plugin/trace/setup.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugin/trace/setup.go b/plugin/trace/setup.go index 93d11766f..ad964bdc1 100644 --- a/plugin/trace/setup.go +++ b/plugin/trace/setup.go @@ -35,7 +35,9 @@ func traceParse(c *caddy.Controller) (*trace, error) { ) cfg := dnsserver.GetConfig(c) - tr.serviceEndpoint = cfg.ListenHosts[0] + ":" + cfg.Port + if cfg.ListenHosts[0] != "" { + tr.serviceEndpoint = cfg.ListenHosts[0] + ":" + cfg.Port + } for c.Next() { // trace var err error @@ -115,7 +117,7 @@ func normalizeEndpoint(epType, ep string) (string, string, error) { if epType == "zipkin" { if !strings.Contains(ep, "http") { - ep = "http://" + ep + "/api/v1/spans" + ep = "http://" + ep + "/api/v2/spans" } } |