Add Prometheus /metrics HTTP endpoint

Wire up unused metrics_port/metrics_whitelist config into working
HTTP server exposing proxy stats in Prometheus text format.
This commit is contained in:
Mikhail
2026-02-17 01:11:01 +03:00
parent 9b9c11e7ab
commit a1db082ec0
6 changed files with 217 additions and 0 deletions

View File

@@ -50,6 +50,9 @@ num-traits = "0.2"
# HTTP
reqwest = { version = "0.12", features = ["rustls-tls"], default-features = false }
hyper = { version = "1", features = ["server", "http1"] }
hyper-util = { version = "0.1", features = ["tokio", "server-auto"] }
http-body-util = "0.1"
[dev-dependencies]
tokio-test = "0.4"