coredns/plugin
Miek Gieben 4df416ca1d
Metrics ()
* plugin/metrics: set server address in context

Allow cross server block metrics to co-exist; for this we should label
each metric with the server label. Put this information in the context
and provide a helper function to get it out.

Abstracting with entirely away with difficult as the release client_go
(0.8.0) doesn't have the CurryWith functions yet. So current use is like
so:

define metric, with server label:

	RcodeCount = prometheus.NewCounterVec(prometheus.CounterOpts{
		Namespace: plugin.Namespace,
		Subsystem: "forward",
		Name:      "response_rcode_count_total",
		Help:      "Counter of requests made per upstream.",
	}, []string{"server", "rcode", "to"})

And report ith with the helper function metrics.WithServer:

	RcodeCount.WithLabelValues(metrics.WithServer(ctx), rc, p.addr).Add(1)
2018-04-01 13:57:03 +01:00
..
auto plugin/auto: update some comments typos 2018-03-01 17:14:53 -08:00
autopath Add OWNERS file () 2018-02-08 10:55:51 +00:00
bind just use setup () 2018-02-28 19:56:14 -08:00
cache Fix dns-01-003 () 2018-03-25 17:11:10 +01:00
chaos Add OWNERS file () 2018-02-08 10:55:51 +00:00
debug Manual pages () 2018-01-04 12:53:07 +00:00
deprecated plugin/deprecated: add an easy way to error on deprecated plugin () 2018-03-01 06:49:52 -08:00
dnssec logging: Don't use PrintF when not needed () 2018-03-09 20:42:27 +00:00
dnstap logging: Don't use PrintF when not needed () 2018-03-09 20:42:27 +00:00
erratic plugin/erratic: linkify RFC references () 2018-03-07 13:52:32 +00:00
errors return an error for multiple use of some plugins () 2018-02-28 18:16:05 -08:00
etcd plugin/kubernetes: Add upstream @self and loop count () 2018-02-14 21:11:26 +01:00
federation support for zone transfer for kubernetes () 2018-02-08 16:11:04 +00:00
file logging: Don't use PrintF when not needed () 2018-03-09 20:42:27 +00:00
forward plugin/{forward,proxy}: check for truncated () 2018-03-31 15:31:03 +01:00
health plugin/health: make reload work () 2018-03-02 21:40:14 -08:00
hosts Make examples complete Corefiles () 2018-03-25 16:48:57 +01:00
kubernetes Update README.md () 2018-03-13 16:33:11 -04:00
loadbalance logging: Don't use PrintF when not needed () 2018-03-09 20:42:27 +00:00
log plugin/log: log remote port addr as well () 2018-02-28 18:15:12 -08:00
metrics Metrics () 2018-04-01 13:57:03 +01:00
nsid return an error for multiple use of some plugins () 2018-02-28 18:16:05 -08:00
pkg plugin/log: log remote port addr as well () 2018-02-28 18:15:12 -08:00
pprof return an error for multiple use of some plugins () 2018-02-28 18:16:05 -08:00
proxy plugin/{forward,proxy}: check for truncated () 2018-03-31 15:31:03 +01:00
reload plugin/reload: enable () 2018-03-02 17:17:26 -08:00
reverse just use setup () 2018-02-28 19:56:14 -08:00
rewrite check DO bit is maintaining status () 2018-02-14 20:18:02 +01:00
root return an error for multiple use of some plugins () 2018-02-28 18:16:05 -08:00
route53 Add PTR record support for Route53 plugin () 2018-03-13 15:10:07 -07:00
secondary plugin/auto/file/secondary: Use new upstream resolver () 2018-02-16 09:44:50 +01:00
template plugin/template: add upstream option () 2018-02-16 09:45:25 +01:00
test plugin/rewrite: rewrite responses for all record types () () 2018-02-06 18:40:46 +00:00
tls Fix with gofmt -s -w for plugin/tls/tls_test.go () 2018-02-22 07:25:55 +00:00
trace Add DD support () 2018-03-09 15:08:57 -05:00
whoami just use setup () 2018-02-28 19:56:14 -08:00
backend.go plugin/kubernetes: Add upstream @self and loop count () 2018-02-14 21:11:26 +01:00
backend_lookup.go plugin/{kubernetes/etcd}: dynamic SOA () 2017-11-01 10:11:34 +00:00
normalize.go fix computation of reverse zone based on Ipv6 CIDRs () 2018-01-23 15:58:36 +00:00
normalize_test.go CIDR query routing () 2017-10-24 10:16:03 +01:00
plugin.go Metrics () 2018-04-01 13:57:03 +01:00