From f9bdd382ddf911c88b33d2bbd8f8aa9be2885a39 Mon Sep 17 00:00:00 2001 From: Francois Tur Date: Wed, 19 Sep 2018 05:11:24 -0400 Subject: Ensure Re-register of metrics variables after a reload (#2080) * - ensure plugins that use prometheus.MustRegister, re-register after reload - removing once.Do on the startup function was simplest way to do it. * - fix underscored names (advice of bot) * - tune existing UT for reload, and add a test verifying failing reload does not prevent correct registering for metrics * - ensure different ports for tests that can run in same time .. --- plugin/autopath/metrics.go | 4 ---- 1 file changed, 4 deletions(-) (limited to 'plugin/autopath/metrics.go') diff --git a/plugin/autopath/metrics.go b/plugin/autopath/metrics.go index c928bd2f3..ae25ab79e 100644 --- a/plugin/autopath/metrics.go +++ b/plugin/autopath/metrics.go @@ -1,8 +1,6 @@ package autopath import ( - "sync" - "github.com/coredns/coredns/plugin" "github.com/prometheus/client_golang/prometheus" @@ -16,5 +14,3 @@ var ( Help: "Counter of requests that did autopath.", }, []string{"server"}) ) - -var once sync.Once -- cgit v1.2.3