- Remove opentelemetry-otlp internal-logs feature (OTLP feedback loop) - Switch trace sampling from AlwaysOn to 10% ratio-based - Add RUST_LOG filtering (opentelemetry/h2/tonic/hyper=warn) to all 8 services - Wire per-service latency measurement via health check → proto metadata → TUI - Replace Vec::remove(0) with VecDeque ring buffers (O(1) vs O(n)) - Add Arc<AtomicBool> connected_sent for first-connected detection across 12 streams - Add MAX_RECONNECT_ATTEMPTS (10) uniformly to all stream spawners - Change kill switch/circuit breaker fields to Option types with N/A display - Wire data_cache to real download status stream, remove dead cluster_events - Remove ServiceData::new() hardcoded stubs, add honest placeholders - Fix nanos_to_hms zero/negative guard, total_records semantic fix - Fix RwLock held across yield in broker_gateway stream_account_state - Add break after yield Err in broker/trading stream generators - Fix connected_at advancing per tick in stream_session_status - Tempo: replace emptyDir with 10Gi PVC, bump memory to 512Mi/2Gi - Remove Prometheus gitlab-annotated-pods duplicate scrape job - Wire 6 new gRPC streaming adapters (risk, trading, ml, data-acquisition) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
trading_service
Core execution engine for order placement, position keeping, risk integration, and real-time P&L tracking.
Key Types
TradingServiceImpl-- main gRPC serviceOrderExecutor-- high-throughput order handlingPositionManager-- real-time position and P&L trackingRiskIntegration-- pre-trade and post-trade compliance
gRPC Endpoints
PlaceOrder-- submit new ordersCancelOrder-- cancel existing ordersGetPosition-- query current positionsSubscribeMarketData-- market data feedsGetPnlUpdates-- real-time P&L updates
Configuration
GRPC_PORT-- gRPC listen portDATABASE_URL-- PostgreSQL connection stringTLS_ENABLED-- enable TLS 1.3 (default: false)TLS_CERT_PATH,TLS_KEY_PATH,TLS_CA_PATH-- TLS certificatesTLS_REQUIRE_CLIENT_CERT-- mutual TLS (default: false)
Testing
SQLX_OFFLINE=true cargo test -p trading_service --lib