aboutsummaryrefslogtreecommitdiff
path: root/plugin/forward/persistent_test.go
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2018-04-01 13:57:03 +0100
committerGravatar GitHub <noreply@github.com> 2018-04-01 13:57:03 +0100
commit4df416ca1da2fff396ff84805518aa8f8b55b80b (patch)
tree2ed84dce69a0a6565505aa1ad9dab5d8f4c58a75 /plugin/forward/persistent_test.go
parent5c5a98ee292e68cf59faf66f601fdcb169ea7eed (diff)
downloadcoredns-4df416ca1da2fff396ff84805518aa8f8b55b80b.tar.gz
coredns-4df416ca1da2fff396ff84805518aa8f8b55b80b.tar.zst
coredns-4df416ca1da2fff396ff84805518aa8f8b55b80b.zip
Metrics (#1579)
* 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)
Diffstat (limited to 'plugin/forward/persistent_test.go')
0 files changed, 0 insertions, 0 deletions