mirror of
				https://github.com/coredns/coredns.git
				synced 2025-11-04 03:03:14 -05:00 
			
		
		
		
	* introduce metric naming test Signed-off-by: zounengren <zounengren@cmss.chinamobile.com> * Update metrics.go Signed-off-by: zounengren <zounengren@cmss.chinamobile.com>
		
			
				
	
	
		
			32 lines
		
	
	
		
			941 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			941 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package dnssec
 | 
						|
 | 
						|
import (
 | 
						|
	"github.com/coredns/coredns/plugin"
 | 
						|
 | 
						|
	"github.com/prometheus/client_golang/prometheus"
 | 
						|
)
 | 
						|
 | 
						|
var (
 | 
						|
	// cacheSize is the number of elements in the dnssec cache.
 | 
						|
	cacheSize = prometheus.NewGaugeVec(prometheus.GaugeOpts{
 | 
						|
		Namespace: plugin.Namespace,
 | 
						|
		Subsystem: "dnssec",
 | 
						|
		Name:      "cache_entries",
 | 
						|
		Help:      "The number of elements in the dnssec cache.",
 | 
						|
	}, []string{"server", "type"})
 | 
						|
	// cacheHits is the count of cache hits.
 | 
						|
	cacheHits = prometheus.NewCounterVec(prometheus.CounterOpts{
 | 
						|
		Namespace: plugin.Namespace,
 | 
						|
		Subsystem: "dnssec",
 | 
						|
		Name:      "cache_hits_total",
 | 
						|
		Help:      "The count of cache hits.",
 | 
						|
	}, []string{"server"})
 | 
						|
	// cacheMisses is the count of cache misses.
 | 
						|
	cacheMisses = prometheus.NewCounterVec(prometheus.CounterOpts{
 | 
						|
		Namespace: plugin.Namespace,
 | 
						|
		Subsystem: "dnssec",
 | 
						|
		Name:      "cache_misses_total",
 | 
						|
		Help:      "The count of cache misses.",
 | 
						|
	}, []string{"server"})
 | 
						|
)
 |