Age | Commit message (Collapse) | Author | Files | Lines | |
---|---|---|---|---|---|
2018-04-22 | all: fix plugin import ordering (#1717) | 1 | -2/+2 | ||
Got a bit messed up with stb lib "context" usage. | |||||
2018-04-20 | global: move to context (#1699) | 1 | -1/+1 | ||
* global: move to context Move from golang.org/x/net/context to std lib's context. Change done with: for i in $(grep -l '/context' **/*.go); do sed -e 's|golang.org/x/net/context|context|' -i $i; echo $i; done for i in **/*.go; do goimports -w $i; done * drop from dns.pb.go as well | |||||
2018-04-18 | plugin/metrics: add 'server' label (#1682) | 1 | -8/+2 | ||
* 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 | |||||
2018-04-01 | Metrics (#1579) | 1 | -0/+24 | ||
* 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) |