Summary
Slow requests are currently invisible until they appear in error logs or user reports. A warn-level log for any request exceeding a configurable threshold (default 2000ms) would give operators a proactive signal of performance degradation without requiring external APM tooling.
Scope
- Measure total request duration in the response middleware
- Emit a warn-level log when duration exceeds the threshold with fields:
method, path, status_code, duration_ms, wallet (if authenticated), slow_threshold_ms
- Threshold configurable via environment variable
SLOW_REQUEST_THRESHOLD_MS (default 2000)
- Log emitted after the response is sent, not before
- Do not log the request body or response body
Acceptance Criteria
ETA: 12 hours
Coordinate on Telegram
Summary
Slow requests are currently invisible until they appear in error logs or user reports. A warn-level log for any request exceeding a configurable threshold (default 2000ms) would give operators a proactive signal of performance degradation without requiring external APM tooling.
Scope
method,path,status_code,duration_ms,wallet(if authenticated),slow_threshold_msSLOW_REQUEST_THRESHOLD_MS(default 2000)Acceptance Criteria
ETA: 12 hours
Coordinate on Telegram