plugin/metrics: add panic counter (#1778)

Count and export number of panics we see.

Fixes #1294
This commit is contained in:
Miek Gieben
2018-05-05 19:47:41 +02:00
committed by GitHub
parent 41f1a1434a
commit 7c27577707
4 changed files with 14 additions and 7 deletions

View File

@@ -59,6 +59,12 @@ var (
Name: "response_rcode_count_total",
Help: "Counter of response status codes.",
}, []string{"server", "zone", "rcode"})
Panic = prometheus.NewCounter(prometheus.CounterOpts{
Namespace: plugin.Namespace,
Name: "panic_count_total",
Help: "A metrics that counts the number of panics.",
})
)
const (