aboutsummaryrefslogtreecommitdiff
path: root/plugin/cache/handler.go
diff options
context:
space:
mode:
authorGravatar Zou Nengren <zounengren@cmss.chinamobile.com> 2020-03-31 14:07:36 +0800
committerGravatar GitHub <noreply@github.com> 2020-03-31 08:07:36 +0200
commit87214a4c5c05c8918bfe73f734ff4dbd390319dd (patch)
tree9ca83d03ccdb80572f0166e84add67bb23a1184f /plugin/cache/handler.go
parent10d176b811e229f2b7bc72c342f54f6acfa69fbd (diff)
downloadcoredns-87214a4c5c05c8918bfe73f734ff4dbd390319dd.tar.gz
coredns-87214a4c5c05c8918bfe73f734ff4dbd390319dd.tar.zst
coredns-87214a4c5c05c8918bfe73f734ff4dbd390319dd.zip
introduce metric naming test (#3789)
* introduce metric naming test Signed-off-by: zounengren <zounengren@cmss.chinamobile.com> * Update metrics.go Signed-off-by: zounengren <zounengren@cmss.chinamobile.com>
Diffstat (limited to 'plugin/cache/handler.go')
-rw-r--r--plugin/cache/handler.go45
1 files changed, 0 insertions, 45 deletions
diff --git a/plugin/cache/handler.go b/plugin/cache/handler.go
index 0adc81576..20a058ed2 100644
--- a/plugin/cache/handler.go
+++ b/plugin/cache/handler.go
@@ -10,7 +10,6 @@ import (
"github.com/coredns/coredns/request"
"github.com/miekg/dns"
- "github.com/prometheus/client_golang/prometheus"
)
// ServeDNS implements the plugin.Handler interface.
@@ -128,47 +127,3 @@ func (c *Cache) exists(state request.Request) *item {
}
return nil
}
-
-var (
- cacheSize = prometheus.NewGaugeVec(prometheus.GaugeOpts{
- Namespace: plugin.Namespace,
- Subsystem: "cache",
- Name: "size",
- Help: "The number of elements in the cache.",
- }, []string{"server", "type"})
-
- cacheHits = prometheus.NewCounterVec(prometheus.CounterOpts{
- Namespace: plugin.Namespace,
- Subsystem: "cache",
- Name: "hits_total",
- Help: "The count of cache hits.",
- }, []string{"server", "type"})
-
- cacheMisses = prometheus.NewCounterVec(prometheus.CounterOpts{
- Namespace: plugin.Namespace,
- Subsystem: "cache",
- Name: "misses_total",
- Help: "The count of cache misses.",
- }, []string{"server"})
-
- cachePrefetches = prometheus.NewCounterVec(prometheus.CounterOpts{
- Namespace: plugin.Namespace,
- Subsystem: "cache",
- Name: "prefetch_total",
- Help: "The number of time the cache has prefetched a cached item.",
- }, []string{"server"})
-
- cacheDrops = prometheus.NewCounterVec(prometheus.CounterOpts{
- Namespace: plugin.Namespace,
- Subsystem: "cache",
- Name: "drops_total",
- Help: "The number responses that are not cached, because the reply is malformed.",
- }, []string{"server"})
-
- servedStale = prometheus.NewCounterVec(prometheus.CounterOpts{
- Namespace: plugin.Namespace,
- Subsystem: "cache",
- Name: "served_stale_total",
- Help: "The number of requests served from stale cache entries.",
- }, []string{"server"})
-)