aboutsummaryrefslogtreecommitdiff
path: root/plugin/kubernetes/kubernetes.go
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2017-12-27 14:14:53 +0000
committerGravatar GitHub <noreply@github.com> 2017-12-27 14:14:53 +0000
commit99047aee9bea3a957e73ef774441ff881967de21 (patch)
treea5c0b2cb55c6aef81c6d97222b086fa38834046e /plugin/kubernetes/kubernetes.go
parentc655589fa3b33a28306fd501d3001374af60f9cd (diff)
downloadcoredns-99047aee9bea3a957e73ef774441ff881967de21.tar.gz
coredns-99047aee9bea3a957e73ef774441ff881967de21.tar.zst
coredns-99047aee9bea3a957e73ef774441ff881967de21.zip
plugin/metrics: convience MustRegister function (#1332)
This leave most of the code intact, but we need to stop vendoring prometheus, because, again, plugins what want to use it. Not vendoring prometheus makes my forward metrics show up again. Code looks bit convoluted, but works: ~~~ c.OnStartup(func() error { once.Do(func() { m := dnsserver.GetConfig(c).Handler("prometheus") if m == nil { return } if x, ok := m.(*metrics.Metrics); ok { x.MustRegister(RequestCount) x.MustRegister(RcodeCount) x.MustRegister(RequestDuration) x.MustRegister(HealthcheckFailureCount) x.MustRegister(SocketGauge) } }) }) ~~~
Diffstat (limited to 'plugin/kubernetes/kubernetes.go')
0 files changed, 0 insertions, 0 deletions