2022-03-24 14:43:41 +00:00
|
|
|
package split
|
2022-03-24 14:26:15 +00:00
|
|
|
|
|
|
|
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,
|
2022-03-24 14:43:41 +00:00
|
|
|
Subsystem: "split",
|
2022-03-24 14:26:15 +00:00
|
|
|
Name: "request_count_total",
|
|
|
|
Help: "Counter of requests made.",
|
|
|
|
}, []string{"server"})
|
|
|
|
|
|
|
|
var once sync.Once
|