diff --git a/etcdserver/api/membership/cluster.go b/etcdserver/api/membership/cluster.go index ebdf84c0520b..137ff3038958 100644 --- a/etcdserver/api/membership/cluster.go +++ b/etcdserver/api/membership/cluster.go @@ -575,9 +575,9 @@ func (c *RaftCluster) SetVersion(ver *semver.Version, onSet func(*zap.Logger, *s mustSaveClusterVersionToBackend(c.be, ver) } if oldVer != nil { - ClusterVersionMetrics.With(prometheus.Labels{"cluster_version": oldVer.String()}).Set(0) + ClusterVersionMetrics.With(prometheus.Labels{"cluster_version": version.Cluster(oldVer.String())}).Set(0) } - ClusterVersionMetrics.With(prometheus.Labels{"cluster_version": ver.String()}).Set(1) + ClusterVersionMetrics.With(prometheus.Labels{"cluster_version": version.Cluster(ver.String())}).Set(1) onSet(c.lg, ver) }