middleware/metrics: proto in size response as well
This commit is contained in:
parent
4c00e444f3
commit
11094409ac
3 changed files with 3 additions and 2 deletions
|
@ -17,6 +17,7 @@ Each counter has a label `zone` which is the zonename used for the request/respo
|
||||||
holds the transport of the response ("udp" or "tcp") and the address family of the transport (1
|
holds the transport of the response ("udp" or "tcp") and the address family of the transport (1
|
||||||
= IP (IP version 4), 2 = IP6 (IP version 6)).
|
= IP (IP version 4), 2 = IP6 (IP version 6)).
|
||||||
The `response_rcode_count_total` has an extra label `rcode` which holds the rcode of the response.
|
The `response_rcode_count_total` has an extra label `rcode` which holds the rcode of the response.
|
||||||
|
The `*_size_bytes` counters also hold the protocol in the `proto` label ("udp" or "tcp").
|
||||||
|
|
||||||
If monitoring is enabled queries that do not enter the middleware chain are exported under the fake
|
If monitoring is enabled queries that do not enter the middleware chain are exported under the fake
|
||||||
domain "dropped" (without a closing dot).
|
domain "dropped" (without a closing dot).
|
||||||
|
|
|
@ -49,6 +49,6 @@ func Report(state middleware.State, zone, rcode string, size int, start time.Tim
|
||||||
requestDo.WithLabelValues(zone).Inc()
|
requestDo.WithLabelValues(zone).Inc()
|
||||||
}
|
}
|
||||||
|
|
||||||
responseSize.WithLabelValues(zone).Observe(float64(size))
|
responseSize.WithLabelValues(zone, net).Observe(float64(size))
|
||||||
responseRcode.WithLabelValues(zone, rcode).Inc()
|
responseRcode.WithLabelValues(zone, rcode).Inc()
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,7 +103,7 @@ func define() {
|
||||||
Name: "response_size_bytes",
|
Name: "response_size_bytes",
|
||||||
Help: "Size of the returns response in bytes.",
|
Help: "Size of the returns response in bytes.",
|
||||||
Buckets: []float64{0, 100, 200, 300, 400, 511, 1023, 2047, 4095, 8291, 16e3, 32e3, 48e3, 64e3},
|
Buckets: []float64{0, 100, 200, 300, 400, 511, 1023, 2047, 4095, 8291, 16e3, 32e3, 48e3, 64e3},
|
||||||
}, []string{"zone"})
|
}, []string{"zone", "proto"})
|
||||||
|
|
||||||
responseRcode = prometheus.NewCounterVec(prometheus.CounterOpts{
|
responseRcode = prometheus.NewCounterVec(prometheus.CounterOpts{
|
||||||
Namespace: middleware.Namespace,
|
Namespace: middleware.Namespace,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue