Resilience Request ID Based Recorder Policy and Phase History
- Dominant language
- Python
- Stars
- 670
- Forks
- 183
- Avg merge
- 17h 7m
- Merged PRs (30d)
- 358
Description
## Motivation
The resilience decorator pattern in client code currently lacks request-level recording of success/failure information. Additionally, there is no way to track the execution phases and steps for debugging and auditing purposes.
- No ContextVar-based recorder for tracking resilience operation results per request
- Resilience failures are not recorded to error logs with request context
- No phase history tracking in audit logs for detailed execution tracing
- No CLI tool for administrators to query phase history
## Objective
Add request ID based recording to resilience decorators and store phase history in audit logs for comprehensive observability.
- Implement RequestRecorder and RequestRecorderContext following sokovan recorder pattern
- Add RecorderPolicy to resilience chain for automatic recording
- Connect recorder failures to Error Log Service
- Add phase_history JSONB column to audit_logs table
- Implement admin CLI for querying phase history (superadmin only)
## Expected Sub Issues
- Define Resilience Request Recorder Types and Context
- Implement RecorderPolicy and Integrate with Resilience Chain
- Connect Request Recorder Failures to Error Log
- Add phase_history Column to Audit Log Table
- Implement Admin CLI for Phase History Query
JIRA Issue: BA-3719
Contributor guide
Assessment
This issue has not been assessed yet.