From 92711de4a1160dd3a78edd47abbe228cc46c6c01 Mon Sep 17 00:00:00 2001 From: mountain Date: Sun, 26 Nov 2023 18:42:05 +0900 Subject: [PATCH] =?UTF-8?q?location=20=EB=A0=88=EC=9D=B4=EB=B8=94=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- metric/metric.go | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/metric/metric.go b/metric/metric.go index aa27eec..0d4b0ae 100644 --- a/metric/metric.go +++ b/metric/metric.go @@ -131,7 +131,7 @@ func init() { logger.Println("metrics are going to be generated for houston") go mc.metricWriter() NewMetric = newMetricImpl - ConcurrentUser = NewMetric(MetricGuage, "concurrent_user", "concurrent user count", map[string]string{"location": "lobby"}) + ConcurrentUser = NewMetric(MetricGuage, "concurrent_user", "concurrent user count", map[string]string{"game": "lobby"}) } else { logger.Println("metrics are NOT going to be generated. parent is not houston :", filename, string(fn)) } @@ -147,15 +147,6 @@ func newMetricImpl(mt MetricType, name string, help string, constLabels map[stri hash := md5.New() hash.Write([]byte(name)) - if constLabels == nil { - constLabels = make(map[string]string) - } - - hn, _ := os.Hostname() - sn := path.Base(os.Args[0]) - constLabels["hostname"] = hn - constLabels["service"] = sn - key := hex.EncodeToString(hash.Sum(nil))[:metric_key_size] temp, _ := json.Marshal(MetricDescription{ Key: key,