udp: store prometheus exporter thread handle, periodically render

This commit is contained in:
Joakim Frostegård 2024-01-29 22:09:20 +01:00
parent 8f838098aa
commit 6dec985d45
3 changed files with 89 additions and 47 deletions

View file

@ -20,7 +20,7 @@ name = "aquatic_udp"
[features]
default = ["prometheus"]
# Export prometheus metrics
prometheus = ["metrics", "metrics-util", "metrics-exporter-prometheus"]
prometheus = ["metrics", "metrics-util", "metrics-exporter-prometheus", "tokio"]
# Experimental io_uring support (Linux 6.0 or later required)
io-uring = ["dep:io-uring"]
# Experimental CPU pinning support
@ -59,6 +59,7 @@ tinytemplate = "1"
metrics = { version = "0.22", optional = true }
metrics-util = { version = "0.16", optional = true }
metrics-exporter-prometheus = { version = "0.13", optional = true, default-features = false, features = ["http-listener"] }
tokio = { version = "1", optional = true, features = ["rt", "net", "time"] }
# io-uring feature
io-uring = { version = "0.6", optional = true }