mirror of
https://github.com/hanzoai/dns.git
synced 2026-10-30 18:40:55 +00:00
Mechanical migration following the beego v2.3.8 fork precedent (bc7b075). Same exposition surface, zero prometheus/client_golang in the dep graph.
26 lines
746 B
Go
26 lines
746 B
Go
package reload
|
|
|
|
import (
|
|
"github.com/coredns/coredns/plugin"
|
|
|
|
metric "github.com/luxfi/metric"
|
|
)
|
|
|
|
// Metrics for the reload plugin
|
|
var (
|
|
// failedCount is the counter of the number of failed reload attempts.
|
|
failedCount = metric.NewCounter(metric.CounterOpts{
|
|
Namespace: plugin.Namespace,
|
|
Subsystem: "reload",
|
|
Name: "failed_total",
|
|
Help: "Counter of the number of failed reload attempts.",
|
|
})
|
|
// reloadInfo is record the hash value during reload.
|
|
reloadInfo = metric.NewGaugeVec(metric.GaugeOpts{
|
|
Namespace: plugin.Namespace,
|
|
Subsystem: "reload",
|
|
Name: "version_info",
|
|
Help: "A metric with a constant '1' value labeled by hash, and value which type of hash generated.",
|
|
}, []string{"hash", "value"})
|
|
)
|