Files
foxhunt/crates/common
jgrusewski 0355fb17bc perf(metrics): expose step-level DQN metrics to Prometheus gauges
Move Q-value stats, gradient norm, and training step from tracing::info!
(stdout-only, block-buffered, invisible mid-epoch) to Prometheus gauges
(atomic set, scrapable every 15s). Downgrade formatted step logs to
debug! level to eliminate allocation/serialization overhead in the hot path.

New gauge: foxhunt_training_step (current step within epoch)
Updated: foxhunt_training_q_value_mean/max, foxhunt_training_gradient_norm
now update every 500 steps instead of only at epoch boundaries.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 18:44:29 +01:00
..

common

Shared types, error handling, and utilities for the Foxhunt HFT ecosystem.

Key Types

  • FoxhuntError — unified error enum with Result alias
  • ModelType — canonical ML model enum (10 primary variants)
  • CircuitBreakerTrait — async circuit breaker interface
  • TlsProtocolVersion, ClientIdentity — TLS configuration types
  • Market data types (Tick, OrderBook) and order types (LimitOrder, MarketOrder)

Modules

  • model_types — canonical ModelType enum re-exported by ml/ and model_loader/
  • resilienceCircuitBreakerTrait async trait
  • tls — TLS types and configuration
  • questdb — QuestDB client configuration

Usage

use common::{FoxhuntError, ModelType};