Skip to content

Conversation

harshanarayana
Copy link

1. Why is this pull request needed and what does it do?

As part of this change, we are introducing a new configuration for the forward plugin named qtype_for_metrics that can be used to configure the query types that needs to be generated into metrics which contains the additional information of name and type.

The new metrics will be request_duration_seconds_with_name and will contain "proxy_name", "to", "rcode", "name", "type" as the labels/tags in the metrics.

2. Which issues (if any) are related?

#7196

3. Which documentation changes (if any) need to be made?

  1. Document on the forward plugin needs to be updated to contain the additional details. https://github.com/coredns/coredns.io/blob/master/content/plugins/forward.md

4. Does this introduce a backward incompatible change or deprecation?

No

As part of this change, we are introducing a new configuration for the
`forward` plugin named `qtype_for_metrics` that can be used to configure
the query types that needs to be generated into metrics which contains
the additional information of `name` and `type`.

The new metrics will be `request_duration_seconds_with_name`
and will contain `"proxy_name", "to", "rcode", "name", "type"` as the
labels/tags in the metrics.

Signed-off-by: Harsha Narayana <harshnar@cisco.com>
@harshanarayana harshanarayana force-pushed the ability-to-display-query-name branch from 6fbb257 to 75ab279 Compare March 11, 2025 14:36
@Shmillerov
Copy link
Contributor

Hello. I'm not a maintainer, but I have a couple of thoughts on this.

Here you add "name" (DNS domain name) as a label to the metric. In this case, each unique DNS query will be a separate row in /metrics.

I don't think this is a good idea. It will cause performance issues on the CoreDNS and metrics collector side.

You can read https://prometheus.io/docs/practices/naming/#labels CAUTION for more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants