aboutsummaryrefslogtreecommitdiff
path: root/plugin/pkg/dnsutil
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2021-03-19 12:59:26 +0100
committerGravatar GitHub <noreply@github.com> 2021-03-19 12:59:26 +0100
commited3f287fe8114255739b2c1757a7621ba913244c (patch)
tree279fcbee38817383aae3246ec4631553332dff10 /plugin/pkg/dnsutil
parent634e3fe8f5f8511736b7caf4dbd9ab5541b29fac (diff)
downloadcoredns-ed3f287fe8114255739b2c1757a7621ba913244c.tar.gz
coredns-ed3f287fe8114255739b2c1757a7621ba913244c.tar.zst
coredns-ed3f287fe8114255739b2c1757a7621ba913244c.zip
metrics: remove RR type (#4534)
To combat label cardinality explosions remove the type from metrics. This was most severe in the histogram for request duration, remove it there. It's also highlighted difference between grpc and forward code, where forward did use type and grpc didn't; getting rid of all that "fixes" that discrepancy Move monitor.go back into the vars directory and make it private again. Also name it slightly better Fixes: #4507 Signed-off-by: Miek Gieben <miek@miek.nl>
Diffstat (limited to 'plugin/pkg/dnsutil')
-rw-r--r--plugin/pkg/dnsutil/monitor.go37
1 files changed, 0 insertions, 37 deletions
diff --git a/plugin/pkg/dnsutil/monitor.go b/plugin/pkg/dnsutil/monitor.go
deleted file mode 100644
index b86f8e43a..000000000
--- a/plugin/pkg/dnsutil/monitor.go
+++ /dev/null
@@ -1,37 +0,0 @@
-package dnsutil
-
-import (
- "github.com/miekg/dns"
-)
-
-var monitorType = map[uint16]struct{}{
- dns.TypeAAAA: {},
- dns.TypeA: {},
- dns.TypeCNAME: {},
- dns.TypeDNSKEY: {},
- dns.TypeDS: {},
- dns.TypeMX: {},
- dns.TypeNSEC3: {},
- dns.TypeNSEC: {},
- dns.TypeNS: {},
- dns.TypePTR: {},
- dns.TypeRRSIG: {},
- dns.TypeSOA: {},
- dns.TypeSRV: {},
- dns.TypeTXT: {},
- // Meta Qtypes
- dns.TypeIXFR: {},
- dns.TypeAXFR: {},
- dns.TypeANY: {},
-}
-
-const other = "other"
-
-// QTypeMonitorLabel returns dns type label based on a list of monitored types.
-// Will return "other" for unmonitored ones.
-func QTypeMonitorLabel(qtype uint16) string {
- if _, known := monitorType[qtype]; known {
- return dns.Type(qtype).String()
- }
- return other
-}