25 - Latency Monitor
Overview
Architecture Diagram
┌──────────────────────────────────────────────────────────────────────────────┐
│ Latency Monitoring Architecture │
└──────────────────────────────────────────────────────────────────────────────┘
Order Request
│
▼
┌─────────────────────────────────────────────────────────────────────────────┐
│ Latency Tracking Points │
│ │
│ T0: Request Received ───────────────────────────────────────────────────► │
│ │ │
│ ▼ │
│ ┌─────────────────┐ │
│ │ Validation │ ← T1: validation_latency_ms │
│ │ (API key, │ │
│ │ schema) │ │
│ └────────┬────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────┐ │
│ │ Broker API │ ← T2: rtt_ms (Round-Trip Time) │
│ │ Request/ │ │
│ │ Response │ │
│ └────────┬────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────┐ │
│ │ Response │ ← T3: response_latency_ms │
│ │ Processing │ │
│ └────────┬────────┘ │
│ │ │
│ ▼ │
│ T4: Response Sent ─────────────────────────────────────────────────────► │
│ │
│ total_latency_ms = T4 - T0 │
│ overhead_ms = validation_ms + response_ms │
└─────────────────────────────────────────────────────────────────────────────┘Metrics Tracked
Latency Components
Metric
Description
Database Schema
Implementation
Latency Tracker Class
Decorator Usage
Dashboard
Access
Dashboard View
SLA Targets
Performance Thresholds
Metric
Target
Description
SLA Calculation
Broker Comparison
Per-Broker Stats
Alerting
Threshold Alerts
HTTP Client Integration
Connection Timing
Analytics Queries
Common Queries
Key Files Reference
File
Purpose
Last updated