From 5bc59de935dd8b7828fb95f85590c5add3f73d8b Mon Sep 17 00:00:00 2001 From: cuiweixie Date: Sat, 13 Jun 2026 18:56:00 +0800 Subject: [PATCH] cmd/utils: keep metrics tag values containing '=' SplitTagsFlag split each "k=v" tag on every "=" with strings.Split, producing more than two parts whenever the value itself contained an "=" (e.g. build=release=2026). Such a tag failed the len(kv) == 2 check and was silently dropped. Use strings.SplitN(t, "=", 2) so the split happens only on the first "=", keeping the remainder as the value. A tag list like 'host=node1,build=release=2026' now retains the build tag. --- cmd/utils/flags.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index d7f09d9cfd24..8f97184a5d9f 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -2268,7 +2268,7 @@ func SplitTagsFlag(tagsFlag string) map[string]string { for _, t := range tags { if t != "" { - kv := strings.Split(t, "=") + kv := strings.SplitN(t, "=", 2) if len(kv) == 2 { tagsMap[kv[0]] = kv[1]