Files
foxhunt/crates/web-gateway/src/lib.rs
jgrusewski f0c653ab63 feat(web-gateway): add Prometheus metrics server on port 9098
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>
2026-03-01 02:14:08 +01:00

50 lines
977 B
Rust

#![deny(
clippy::unwrap_used,
clippy::expect_used,
clippy::panic,
clippy::indexing_slicing
)]
#![allow(clippy::module_name_repetitions)]
pub mod auth;
pub mod config;
pub mod error;
pub mod grpc;
pub mod metrics;
pub mod rate_limit;
pub mod routes;
pub mod state;
pub mod ws;
pub mod proto {
pub mod trading {
#![allow(
clippy::all,
clippy::pedantic,
clippy::restriction,
clippy::nursery
)]
tonic::include_proto!("foxhunt.tli");
}
pub mod ml_training {
#![allow(
clippy::all,
clippy::pedantic,
clippy::restriction,
clippy::nursery
)]
tonic::include_proto!("ml_training");
}
pub mod health {
#![allow(
clippy::all,
clippy::pedantic,
clippy::restriction,
clippy::nursery
)]
tonic::include_proto!("grpc.health.v1");
}
}