diff options
author | 2017-12-01 11:15:05 +0000 | |
---|---|---|
committer | 2017-12-01 11:15:05 +0000 | |
commit | 917965fa8691d54bc3edb6afcb169d5d536c0d23 (patch) | |
tree | b70a405950e574aeacffa03d4e77ef0f73b02cd7 /plugin/plugin.go | |
parent | f96555476eb616675987bcb6d6dfec6cfa06689c (diff) | |
download | coredns-917965fa8691d54bc3edb6afcb169d5d536c0d23.tar.gz coredns-917965fa8691d54bc3edb6afcb169d5d536c0d23.tar.zst coredns-917965fa8691d54bc3edb6afcb169d5d536c0d23.zip |
metrics: use exponentional buckets (#1261)
* metrics: use exponentional buckets
See https://github.com/kubernetes/dns/pull/168
Diffstat (limited to 'plugin/plugin.go')
-rw-r--r-- | plugin/plugin.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugin/plugin.go b/plugin/plugin.go index 3f2d01f9e..06d22546d 100644 --- a/plugin/plugin.go +++ b/plugin/plugin.go @@ -7,6 +7,7 @@ import ( "github.com/miekg/dns" ot "github.com/opentracing/opentracing-go" + "github.com/prometheus/client_golang/prometheus" "golang.org/x/net/context" ) @@ -102,4 +103,4 @@ func ClientWrite(rcode int) bool { const Namespace = "coredns" // TimeBuckets is based on Prometheus client_golang prometheus.DefBuckets -var TimeBuckets = []float64{0.00025, 0.0005, 0.001, 0.0025, .005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10} +var TimeBuckets = prometheus.ExponentialBuckets(0.25, 2, 16) // from 0.25ms to 8 seconds |