mirror of
https://github.com/prometheus/prometheus
synced 2024-12-24 15:32:48 +00:00
This breaks people if they are depending on the contents of __address__ label. Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>
This commit is contained in:
parent
ab3cdb9500
commit
f988af7235
@ -181,6 +181,9 @@ func (d *Discovery) refresh(ctx context.Context, name string, ch chan<- []*targe
|
||||
target := model.LabelValue("")
|
||||
switch addr := record.(type) {
|
||||
case *dns.SRV:
|
||||
// Remove the final dot from rooted DNS names to make them look more usual.
|
||||
addr.Target = strings.TrimRight(addr.Target, ".")
|
||||
|
||||
target = hostPort(addr.Target, int(addr.Port))
|
||||
case *dns.A:
|
||||
target = hostPort(addr.A.String(), d.port)
|
||||
|
Loading…
Reference in New Issue
Block a user