mirror of
https://github.com/coredns/coredns.git
synced 2025-11-13 15:32:24 -05:00
plugin/metrics: add 'server' label (#1682)
* 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
This commit is contained in:
@@ -102,13 +102,15 @@ payload over HTTPS). Note that with `https_google` the entire transport is encry
|
||||
|
||||
If monitoring is enabled (via the *prometheus* directive) then the following metric is exported:
|
||||
|
||||
* `coredns_proxy_request_duration_seconds{proto, proto_proxy, family, to}` - duration per upstream
|
||||
interaction.
|
||||
* `coredns_proxy_request_count_total{proto, proto_proxy, family, to}` - query count per upstream.
|
||||
* `coredns_proxy_request_duration_seconds{server, proto, proto_proxy, family, to}` - duration per
|
||||
upstream interaction.
|
||||
* `coredns_proxy_request_count_total{server, proto, proto_proxy, family, to}` - query count per
|
||||
upstream.
|
||||
|
||||
Where `proxy_proto` is the protocol used (`dns`, `grpc`, or `https_google`) and `to` is **TO**
|
||||
specified in the config, `proto` is the protocol used by the incoming query ("tcp" or "udp").
|
||||
and family the transport family ("1" for IPv4, and "2" for IPv6).
|
||||
specified in the config, `proto` is the protocol used by the incoming query ("tcp" or "udp"), family
|
||||
the transport family ("1" for IPv4, and "2" for IPv6). `Server` is the server responsible for the
|
||||
request (and metric). See the documention in the metrics plugin.
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
Reference in New Issue
Block a user