From 5787a384f90ec73b786b944635bdb8dd751713fd Mon Sep 17 00:00:00 2001 From: mountain Date: Tue, 28 Nov 2023 22:40:48 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B0=99=EC=9D=80=20=EB=A9=94=ED=8A=B8?= =?UTF-8?q?=EB=A6=AD=EC=9D=80=20=EB=93=B1=EB=A1=9D=20=ED=8C=A8=EC=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- metric/prometheus.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/metric/prometheus.go b/metric/prometheus.go index 32d4d81..9a32756 100644 --- a/metric/prometheus.go +++ b/metric/prometheus.go @@ -103,6 +103,10 @@ func (pe *prometheusExporter) loop() { case nm := <-pe.registerChan: var nextmetrics map[string]*prometheusMetricDesc if collector != nil { + if collector.metrics[nm.key] != nil { + break + } + nextmetrics = collector.metrics prometheus.Unregister(collector) nextmetrics[nm.key] = nm