diff options
author | 2018-04-25 15:27:25 +0100 | |
---|---|---|
committer | 2018-04-25 15:27:25 +0100 | |
commit | d3f2d4a291318607e084d57cd1b5e8f4882abbb5 (patch) | |
tree | bd104ffbaf953334e2bbd19b0037e940c66fe19a /plugin/trace/setup.go | |
parent | 7a507e34ca880344dfc98b6331508c0e9bef54f5 (diff) | |
download | coredns-d3f2d4a291318607e084d57cd1b5e8f4882abbb5.tar.gz coredns-d3f2d4a291318607e084d57cd1b5e8f4882abbb5.tar.zst coredns-d3f2d4a291318607e084d57cd1b5e8f4882abbb5.zip |
core: remove HostAddresses() (#1728)
* core: remove HostAddresses()
config.HostAddresses() is a weird function that gathers
some data from the server and returns a string.
It is *only* used the trace plugin, to figure out what
server starts the trace.
Looks to be better to fit in the with metrics.WithServer label
on the trace itself to show which server handled the trace.
Remove HostAddresses() and cleanup trace a small bit.:w
* lint
Diffstat (limited to 'plugin/trace/setup.go')
-rw-r--r-- | plugin/trace/setup.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugin/trace/setup.go b/plugin/trace/setup.go index 881ddc357..1614cc177 100644 --- a/plugin/trace/setup.go +++ b/plugin/trace/setup.go @@ -41,7 +41,8 @@ func traceParse(c *caddy.Controller) (*trace, error) { ) cfg := dnsserver.GetConfig(c) - tr.ServiceEndpoint = cfg.HostAddresses() + tr.serviceEndpoint = cfg.ListenHosts[0] + ":" + cfg.Port + for c.Next() { // trace var err error args := c.RemainingArgs() |