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
This commit is contained in:
Miek Gieben
2018-04-25 15:27:25 +01:00
committed by GitHub
parent 7a507e34ca
commit d3f2d4a291
3 changed files with 7 additions and 24 deletions

View File

@@ -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()