mirror of
				https://github.com/coredns/coredns.git
				synced 2025-11-04 02:01:07 +01:00 
			
		
		
		
	* - 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 ..
		
			
				
	
	
		
			17 lines
		
	
	
		
			363 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			363 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package autopath
 | 
						|
 | 
						|
import (
 | 
						|
	"github.com/coredns/coredns/plugin"
 | 
						|
 | 
						|
	"github.com/prometheus/client_golang/prometheus"
 | 
						|
)
 | 
						|
 | 
						|
var (
 | 
						|
	autoPathCount = prometheus.NewCounterVec(prometheus.CounterOpts{
 | 
						|
		Namespace: plugin.Namespace,
 | 
						|
		Subsystem: "autopath",
 | 
						|
		Name:      "success_count_total",
 | 
						|
		Help:      "Counter of requests that did autopath.",
 | 
						|
	}, []string{"server"})
 | 
						|
)
 |