aboutsummaryrefslogtreecommitdiff
path: root/plugin/kubernetes/metrics.go
diff options
context:
space:
mode:
authorGravatar Ben Kochie <superq@gmail.com> 2020-03-31 20:03:18 +0200
committerGravatar GitHub <noreply@github.com> 2020-03-31 20:03:18 +0200
commita29a594e5c2283496af0577bd5c64dc2b439dee6 (patch)
treed5d13667c459328221d233ba78220fc961306cc6 /plugin/kubernetes/metrics.go
parente2ece87035f67bbf6012b9feb8b7e79c9dba1353 (diff)
downloadcoredns-a29a594e5c2283496af0577bd5c64dc2b439dee6.tar.gz
coredns-a29a594e5c2283496af0577bd5c64dc2b439dee6.tar.zst
coredns-a29a594e5c2283496af0577bd5c64dc2b439dee6.zip
Update more metrics names (#3799)
The subsystem of a metric must be it's plugin name. "dns" is reserved for the core. Use a const convention to avoid copy-paste mistakes in naming. Fix dns64 and acl plugin. Signed-off-by: Ben Kochie <superq@gmail.com>
Diffstat (limited to 'plugin/kubernetes/metrics.go')
-rw-r--r--plugin/kubernetes/metrics.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/plugin/kubernetes/metrics.go b/plugin/kubernetes/metrics.go
index 5547add89..7c6bfa1b0 100644
--- a/plugin/kubernetes/metrics.go
+++ b/plugin/kubernetes/metrics.go
@@ -9,10 +9,6 @@ import (
api "k8s.io/api/core/v1"
)
-const (
- subsystem = "kubernetes"
-)
-
var (
// DnsProgrammingLatency is defined as the time it took to program a DNS instance - from the time
// a service or pod has changed to the time the change was propagated and was available to be
@@ -27,7 +23,7 @@ var (
// * headless_without_selector
DnsProgrammingLatency = prometheus.NewHistogramVec(prometheus.HistogramOpts{
Namespace: plugin.Namespace,
- Subsystem: subsystem,
+ Subsystem: pluginName,
Name: "dns_programming_duration_seconds",
// From 1 millisecond to ~17 minutes.
Buckets: prometheus.ExponentialBuckets(0.001, 2, 20),