[PR #3428] [MERGED] Additional recursive resolver metrics, general metrics tidying #3838

Closed
opened 2026-03-16 12:05:24 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/3428
Author: @cpu
Created: 1/7/2026
Status: Merged
Merged: 1/14/2026
Merged by: @cpu

Base: mainHead: cpu-moar-metrics_dev


📝 Commits (10+)

  • 337754e resolver: gate all opp enc metrics equivalently
  • 65449f4 resolver: consolidate metrics into a module
  • 7d5b6e7 resolver: export metric names as pub
  • 0e5585a bin: extract metrics to separate module
  • 6ee1833 bin: export metric names
  • 81a73d3 server: lift metrics into top-level module
  • 7873127 server: export metric names
  • 8a400db server: blocklist entries metric name consistency
  • 8277891 bin: test that histogram metrics are not summaries
  • 4055073 bin: propagate DoH/DoT/DoQ features to hickory-resolver

📊 Changes

27 files changed (+2271 additions, -1390 deletions)

View changed files

📝 bin/Cargo.toml (+6 -6)
📝 bin/src/config/tests.rs (+1 -1)
📝 bin/src/lib.rs (+5 -135)
bin/src/metrics.rs (+142 -0)
📝 bin/src/prometheus_server.rs (+52 -7)
📝 bin/tests/integration/named_metrics_tests.rs (+191 -127)
📝 crates/resolver/src/cache.rs (+15 -0)
📝 crates/resolver/src/lib.rs (+2 -0)
crates/resolver/src/metrics.rs (+526 -0)
📝 crates/resolver/src/name_server.rs (+240 -276)
📝 crates/resolver/src/recursor/handle.rs (+43 -42)
📝 crates/resolver/src/recursor/mod.rs (+25 -4)
📝 crates/resolver/src/recursor/tests.rs (+77 -6)
📝 crates/server/src/lib.rs (+2 -0)
crates/server/src/metrics.rs (+820 -0)
crates/server/src/server/metrics.rs (+0 -277)
📝 crates/server/src/server/mod.rs (+5 -25)
📝 crates/server/src/store/blocklist.rs (+2 -50)
📝 crates/server/src/store/file.rs (+1 -1)
crates/server/src/store/metrics.rs (+0 -75)

...and 7 more files

📄 Description

A continuation of previous metrics work, largely focused on metrics that will be helpful for https://github.com/hickory-dns/hickory-dns/issues/2725 based on gaps between what hickory-dns offers today, and what metrics unbound_exporter offers.

Some highlights:

  • Metric names are now exported pub items. This both reduces fragile duplication of the string literals across crate boundaries and also makes the question of "What metrics does Hickory expose?" easier to answer using rustdoc. More detail in commit message
  • New histograms for overall recursive resolver request processing time (separated for cache hits vs cache misses, which requires some care w.r.t bucket sizes. More detail in commit message)
  • New counters for recursive resolver DNSSEC answer security status
  • New counters for outbound resolver queries, broken down by protocol
  • New gauges for the recursive resolver answer cache sizes (separated for the DNSSEC validated answer cache and the normal recursive resolver answer cache)
  • New gauge for the recursive resolver name server connection cache size
  • New gauge for the overall count of recursive resolver queries in-flight at a given time

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hickory-dns/hickory-dns/pull/3428 **Author:** [@cpu](https://github.com/cpu) **Created:** 1/7/2026 **Status:** ✅ Merged **Merged:** 1/14/2026 **Merged by:** [@cpu](https://github.com/cpu) **Base:** `main` ← **Head:** `cpu-moar-metrics_dev` --- ### 📝 Commits (10+) - [`337754e`](https://github.com/hickory-dns/hickory-dns/commit/337754e5e701d55135f73f3b45a59554b080edcc) resolver: gate all opp enc metrics equivalently - [`65449f4`](https://github.com/hickory-dns/hickory-dns/commit/65449f493e118c6880d832fd4664c1cc828cd097) resolver: consolidate metrics into a module - [`7d5b6e7`](https://github.com/hickory-dns/hickory-dns/commit/7d5b6e7e700707ce2f1376f0aaa9b2098ed3c629) resolver: export metric names as pub - [`0e5585a`](https://github.com/hickory-dns/hickory-dns/commit/0e5585adb013543213ed03cacdb135a2a14b4401) bin: extract metrics to separate module - [`6ee1833`](https://github.com/hickory-dns/hickory-dns/commit/6ee1833bc5d53ccad443b0a75d81e4d1a0a7e3fe) bin: export metric names - [`81a73d3`](https://github.com/hickory-dns/hickory-dns/commit/81a73d3fe587a40b24cfbbee226e73bd044b10e0) server: lift metrics into top-level module - [`7873127`](https://github.com/hickory-dns/hickory-dns/commit/7873127a52bcf5eba623294b9a709576b2162fa5) server: export metric names - [`8a400db`](https://github.com/hickory-dns/hickory-dns/commit/8a400db20d6c544e88530a176cc0b401d7da1089) server: blocklist entries metric name consistency - [`8277891`](https://github.com/hickory-dns/hickory-dns/commit/82778915445367d55ddef21c69c833e7d854c612) bin: test that histogram metrics are not summaries - [`4055073`](https://github.com/hickory-dns/hickory-dns/commit/4055073468f7fd5da1cd396b268d8449deac56b8) bin: propagate DoH/DoT/DoQ features to hickory-resolver ### 📊 Changes **27 files changed** (+2271 additions, -1390 deletions) <details> <summary>View changed files</summary> 📝 `bin/Cargo.toml` (+6 -6) 📝 `bin/src/config/tests.rs` (+1 -1) 📝 `bin/src/lib.rs` (+5 -135) ➕ `bin/src/metrics.rs` (+142 -0) 📝 `bin/src/prometheus_server.rs` (+52 -7) 📝 `bin/tests/integration/named_metrics_tests.rs` (+191 -127) 📝 `crates/resolver/src/cache.rs` (+15 -0) 📝 `crates/resolver/src/lib.rs` (+2 -0) ➕ `crates/resolver/src/metrics.rs` (+526 -0) 📝 `crates/resolver/src/name_server.rs` (+240 -276) 📝 `crates/resolver/src/recursor/handle.rs` (+43 -42) 📝 `crates/resolver/src/recursor/mod.rs` (+25 -4) 📝 `crates/resolver/src/recursor/tests.rs` (+77 -6) 📝 `crates/server/src/lib.rs` (+2 -0) ➕ `crates/server/src/metrics.rs` (+820 -0) ➖ `crates/server/src/server/metrics.rs` (+0 -277) 📝 `crates/server/src/server/mod.rs` (+5 -25) 📝 `crates/server/src/store/blocklist.rs` (+2 -50) 📝 `crates/server/src/store/file.rs` (+1 -1) ➖ `crates/server/src/store/metrics.rs` (+0 -75) _...and 7 more files_ </details> ### 📄 Description A continuation of previous metrics work, largely focused on metrics that will be helpful for https://github.com/hickory-dns/hickory-dns/issues/2725 based on gaps between what `hickory-dns` offers today, and what metrics [`unbound_exporter`](https://github.com/letsencrypt/unbound_exporter) offers. Some highlights: * Metric names are now exported `pub` items. This both reduces fragile duplication of the string literals across crate boundaries and also makes the question of "What metrics does Hickory expose?" easier to answer using `rustdoc`. More detail in commit message * New histograms for overall recursive resolver request processing time (separated for cache hits vs cache misses, which requires some care w.r.t bucket sizes. More detail in commit message) * New counters for recursive resolver DNSSEC answer security status * New counters for outbound resolver queries, broken down by protocol * New gauges for the recursive resolver answer cache sizes (separated for the DNSSEC validated answer cache and the normal recursive resolver answer cache) * New gauge for the recursive resolver name server connection cache size * New gauge for the overall count of recursive resolver queries in-flight at a given time --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 12:05:24 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#3838
No description provided.