mirror of
https://github.com/coredns/coredns.git
synced 2025-09-13 09:40:59 +02:00
Implement per server metrics in autopath; also don't export the metric. Updated readme as well.
21 lines
392 B
Go
21 lines
392 B
Go
package autopath
|
|
|
|
import (
|
|
"sync"
|
|
|
|
"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"})
|
|
)
|
|
|
|
var once sync.Once
|