Skip to content

[knot-resolver 6] Prometheus metrics improvements. #115

@Jean-Daniel

Description

@Jean-Daniel

Hello,

I'd like to suggest a way to improve prometheus metrics.
I think it would be better to export specific metrics using labels, instead of creating one series per tag;
For instance:

resolver_request_total. Instead of having one metric per kind, resolver_request_udp_total, resolver_request_tcp_total, …
it would be more practical to get a single resolver_request_total metric with a kind label.

It makes it easier to query prometheus and create graphs in Grafana. You can create a single graph in Grafana with a single request grouped by kind instead of having to known every kind in advance, and create a query per kind.

For instance: sum(rate(resolver_request_total[$__rate_interval])) by (kind) will display on line per kind, and if a new kind is released (doq), no need to update the Grafana dashboard.

Ditto for resolver_answer_total and rcode. Having resolver_answer_total{rcode=""} would make querying easier.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions