[PR #2886] [MERGED] Add metrics infrastructure and prometheus endpoint for hickory-dns #3396

Closed
opened 2026-03-16 11:41:28 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/2886
Author: @hargut
Created: 3/25/2025
Status: Merged
Merged: 3/31/2025
Merged by: @djc

Base: mainHead: feat/tracing-metrics-prometheus-server-stores


📝 Commits (2)

  • 952043c server: refactor FileAuthority struct layout
  • 881b95c server: add prometheus endpoint and initial metrics

📊 Changes

12 files changed (+509 additions, -43 deletions)

View changed files

📝 Cargo.lock (+279 -12)
📝 Cargo.toml (+4 -0)
📝 bin/Cargo.toml (+2 -0)
📝 bin/src/hickory-dns.rs (+39 -0)
📝 bin/src/lib.rs (+21 -0)
📝 bin/tests/integration/server_harness/mod.rs (+2 -0)
📝 crates/server/Cargo.toml (+2 -0)
📝 crates/server/src/store/file.rs (+47 -27)
📝 crates/server/src/store/forwarder.rs (+13 -2)
crates/server/src/store/metrics.rs (+69 -0)
📝 crates/server/src/store/mod.rs (+2 -0)
📝 crates/server/src/store/sqlite/mod.rs (+29 -2)

📄 Description

Introduces a prometheus endpoint within hickory-dns and adds initial metrics for server persisted zones.

The approach is based on the details described within:
https://github.com/hickory-dns/hickory-dns/issues/2032

Currently the implementation can be activated using the feature hickory-dns/prometheus-metrics.

Before adding more metrics I'd like to clarify:

  • is the compile time feature for the metrics required or is it sufficient to keep it on hickory-dns for the prometheus endpoint and tracing/recorder setup
  • is the approach taken corresponding to the current requirements (especially the used dependencies)

🔄 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/2886 **Author:** [@hargut](https://github.com/hargut) **Created:** 3/25/2025 **Status:** ✅ Merged **Merged:** 3/31/2025 **Merged by:** [@djc](https://github.com/djc) **Base:** `main` ← **Head:** `feat/tracing-metrics-prometheus-server-stores` --- ### 📝 Commits (2) - [`952043c`](https://github.com/hickory-dns/hickory-dns/commit/952043c43f40d5e4dda9c9e66fe6e2bcdd1a4a5f) server: refactor FileAuthority struct layout - [`881b95c`](https://github.com/hickory-dns/hickory-dns/commit/881b95c7e911e76776113ef4896ca7cb03dc2a47) server: add prometheus endpoint and initial metrics ### 📊 Changes **12 files changed** (+509 additions, -43 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.lock` (+279 -12) 📝 `Cargo.toml` (+4 -0) 📝 `bin/Cargo.toml` (+2 -0) 📝 `bin/src/hickory-dns.rs` (+39 -0) 📝 `bin/src/lib.rs` (+21 -0) 📝 `bin/tests/integration/server_harness/mod.rs` (+2 -0) 📝 `crates/server/Cargo.toml` (+2 -0) 📝 `crates/server/src/store/file.rs` (+47 -27) 📝 `crates/server/src/store/forwarder.rs` (+13 -2) ➕ `crates/server/src/store/metrics.rs` (+69 -0) 📝 `crates/server/src/store/mod.rs` (+2 -0) 📝 `crates/server/src/store/sqlite/mod.rs` (+29 -2) </details> ### 📄 Description Introduces a prometheus endpoint within hickory-dns and adds initial metrics for server persisted zones. The approach is based on the details described within: https://github.com/hickory-dns/hickory-dns/issues/2032 Currently the implementation can be activated using the feature `hickory-dns/prometheus-metrics`. Before adding more metrics I'd like to clarify: - is the compile time feature for the metrics required or is it sufficient to keep it on `hickory-dns` for the prometheus endpoint and tracing/recorder setup - is the approach taken corresponding to the current requirements (especially the used dependencies) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 11:41:28 +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#3396
No description provided.