mirror of
https://github.com/linka-cloud/coredns-split.git
synced 2024-11-16 01:36:24 +00:00
21 lines
533 B
Go
21 lines
533 B
Go
package split
|
|
|
|
import (
|
|
"sync"
|
|
|
|
"github.com/coredns/coredns/plugin"
|
|
|
|
"github.com/prometheus/client_golang/prometheus"
|
|
"github.com/prometheus/client_golang/prometheus/promauto"
|
|
)
|
|
|
|
// requestCount exports a prometheus metric that is incremented every time a query is seen by the example plugin.
|
|
var requestCount = promauto.NewCounterVec(prometheus.CounterOpts{
|
|
Namespace: plugin.Namespace,
|
|
Subsystem: "split",
|
|
Name: "request_count_total",
|
|
Help: "Counter of requests made.",
|
|
}, []string{"server"})
|
|
|
|
var once sync.Once
|