cfcb1afcec
--metrics-port (0.0.0.0, в отличие от --health-port — тот 127.0.0.1-only) отдаёт netrunner_connections_active/total, netrunner_auth_validate_duration_seconds, netrunner_auth_failures_total, netrunner_circuit_breaker_open. Тот же hand-rolled HTTP-паттерн, что и health.rs — без HTTP-фреймворка ради одного эндпоинта. scripts/generate-prometheus-targets.mjs генерит список scrape-таргетов из nodes.json — job update-observability-targets в deploy.yml гоняет его при каждом деплое нод и заливает на VPS с данными (netrunner-data/observability/targets/nodes.json), чтобы центральный Prometheus не терял из виду ноды без ручной правки конфига. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
20 lines
597 B
TOML
20 lines
597 B
TOML
[package]
|
|
name = "netrunner-server"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
|
|
[dependencies]
|
|
netrunner-core = { path = "../core" }
|
|
netrunner-logger = { path = "../tools/log" }
|
|
tracing = "0.1"
|
|
tokio = { version = "1.36", features = ["full"] }
|
|
clap = { version = "4.4", features = ["derive"] }
|
|
tokio-util = { version = "0.7", features = ["rt"] }
|
|
serde_json = "1"
|
|
serde = { version = "1", features = ["derive"] }
|
|
reqwest = { version = "0.13.2", features = ["json"] }
|
|
async-trait = "0.1.89"
|
|
dashmap = "6.1.0"
|
|
metrics = "0.24.3"
|
|
metrics-exporter-prometheus = { version = "0.18.1", default-features = false }
|