diff options
author | 2018-04-18 09:42:20 +0100 | |
---|---|---|
committer | 2018-04-18 09:42:20 +0100 | |
commit | 08443a9f009fa0529a6d5cbb4708790165c16a0c (patch) | |
tree | ce8af5908e61dde11c271e025175aa9704adc926 /plugin/proxy/metrics.go | |
parent | 573ad62b770b7320f5499a1fc64a70b8f118e3b9 (diff) | |
download | coredns-08443a9f009fa0529a6d5cbb4708790165c16a0c.tar.gz coredns-08443a9f009fa0529a6d5cbb4708790165c16a0c.tar.zst coredns-08443a9f009fa0529a6d5cbb4708790165c16a0c.zip |
plugin/metrics: add 'server' label (#1682)
* plugin/metrics: add 'server' label
This uses the new WithServer(ctx) to get the current server from the
context.
First in a larger refactor to make all plugins do this.
* compile
* compile
* lala test
* compile and test
* typos
* Dont duplicate the code
Diffstat (limited to 'plugin/proxy/metrics.go')
-rw-r--r-- | plugin/proxy/metrics.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugin/proxy/metrics.go b/plugin/proxy/metrics.go index e0dd3fe98..e5d6139b4 100644 --- a/plugin/proxy/metrics.go +++ b/plugin/proxy/metrics.go @@ -15,14 +15,14 @@ var ( Subsystem: "proxy", Name: "request_count_total", Help: "Counter of requests made per protocol, proxy protocol, family and upstream.", - }, []string{"proto", "proxy_proto", "family", "to"}) + }, []string{"server", "proto", "proxy_proto", "family", "to"}) RequestDuration = prometheus.NewHistogramVec(prometheus.HistogramOpts{ Namespace: plugin.Namespace, Subsystem: "proxy", Name: "request_duration_seconds", Buckets: plugin.TimeBuckets, Help: "Histogram of the time (in seconds) each request took.", - }, []string{"proto", "proxy_proto", "family", "to"}) + }, []string{"server", "proto", "proxy_proto", "family", "to"}) ) // familyToString returns the string form of either 1, or 2. Returns |