Adds a dedicated Prometheus metrics endpoint on port 9098 (configurable via METRICS_PORT env var) with counters for HTTP requests, histograms for request duration, gauges for uptime and active WebSocket connections, and counters for WebSocket messages. Metrics are registered using once_cell Lazy statics with abort-on-failure to satisfy the crate's deny(unwrap) lint policy. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
62 lines
1.2 KiB
TOML
62 lines
1.2 KiB
TOML
[package]
|
|
name = "web-gateway"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
rust-version.workspace = true
|
|
authors.workspace = true
|
|
license.workspace = true
|
|
description = "REST + WebSocket gateway for Foxhunt web dashboard"
|
|
|
|
[[bin]]
|
|
name = "web-gateway"
|
|
path = "src/main.rs"
|
|
|
|
[dependencies]
|
|
# HTTP server
|
|
axum = { workspace = true, features = ["ws"] }
|
|
tower.workspace = true
|
|
tower-http = { workspace = true, features = ["cors", "trace"] }
|
|
|
|
# gRPC client
|
|
tonic = { workspace = true, features = ["transport", "tls-ring", "tls-webpki-roots"] }
|
|
tonic-prost.workspace = true
|
|
prost.workspace = true
|
|
|
|
# Async runtime
|
|
tokio.workspace = true
|
|
tokio-stream.workspace = true
|
|
futures-util.workspace = true
|
|
|
|
# Serialization
|
|
serde = { workspace = true, features = ["derive"] }
|
|
serde_json.workspace = true
|
|
|
|
# Auth
|
|
jsonwebtoken.workspace = true
|
|
|
|
# Error handling & logging
|
|
anyhow.workspace = true
|
|
thiserror.workspace = true
|
|
tracing.workspace = true
|
|
tracing-subscriber.workspace = true
|
|
|
|
# Shared types
|
|
common.workspace = true
|
|
|
|
# Metrics
|
|
prometheus.workspace = true
|
|
once_cell.workspace = true
|
|
|
|
# Time and IDs
|
|
chrono.workspace = true
|
|
uuid.workspace = true
|
|
|
|
[build-dependencies]
|
|
tonic-prost-build.workspace = true
|
|
|
|
[dev-dependencies]
|
|
tokio-test.workspace = true
|
|
|
|
[lints]
|
|
workspace = true
|