mirror of
https://github.com/coredns/coredns.git
synced 2025-11-10 14:02:16 -05:00
add zones label to cache metrics (#5124)
* add zones to cache metrics Signed-off-by: Elijah Andrews <elijahcandrews@gmail.com>
This commit is contained in:
2
plugin/cache/setup.go
vendored
2
plugin/cache/setup.go
vendored
@@ -4,6 +4,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/coredns/caddy"
|
||||
@@ -185,6 +186,7 @@ func cacheParse(c *caddy.Controller) (*Cache, error) {
|
||||
}
|
||||
|
||||
ca.Zones = origins
|
||||
ca.zonesMetricLabel = strings.Join(origins, ",")
|
||||
ca.pcache = cache.New(ca.pcap)
|
||||
ca.ncache = cache.New(ca.ncap)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user