From 5d0a12855ba40712b473133ce37df5d88f62ca58 Mon Sep 17 00:00:00 2001 From: Joey Freeland <30938344+jfreeland@users.noreply.github.com> Date: Tue, 6 Jul 2021 07:53:23 -0400 Subject: [PATCH] Update discovery/gce/gce.go Co-authored-by: Julien Pivotto Signed-off-by: Joey Freeland --- discovery/gce/gce.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discovery/gce/gce.go b/discovery/gce/gce.go index 1585f25c3..e17c60f71 100644 --- a/discovery/gce/gce.go +++ b/discovery/gce/gce.go @@ -180,7 +180,7 @@ func (d *Discovery) refresh(ctx context.Context) ([]*targetgroup.Group, error) { // Append named interface metadata for all interfaces for _, iface := range inst.NetworkInterfaces { - gceLabelNetAddress := model.LabelName(fmt.Sprintf("%sinterface_ipv4_%s", gceLabel, iface.Name)) + gceLabelNetAddress := model.LabelName(fmt.Sprintf("%sinterface_ipv4_%s", gceLabel, strutil.SanitizeLabelName(iface.Name))) labels[gceLabelNetAddress] = model.LabelValue(iface.NetworkIP) }