Add request_id Column to Error Log Table
- Dominant language
- Python
- Stars
- 670
- Forks
- 183
- Avg merge
- 17h 7m
- Merged PRs (30d)
- 358
Description
## Motivation
The `error_logs` table currently lacks a `request_id` column, making it impossible to correlate errors with specific API requests and audit log entries. This prevents effective debugging and auditing of errors.
- Cannot link error logs to audit logs for the same request
- Cannot filter errors by request ID for debugging specific issues
## Required Features
- Create Alembic migration to add `request_id` column to `error_logs` table
- Column type: `String` (to match audit_logs.request_id)
- Add index on `request_id` for efficient querying
- Column should be nullable (existing records will have NULL)
## Impact
- `src/ai/backend/manager/models/error_logs.py`
- New Alembic migration file in `src/ai/backend/manager/models/alembic/versions/`
## Testing Scenarios
- Verify migration runs successfully (upgrade and downgrade)
- Verify new column is created with correct type and index
- Verify existing data is preserved after migration
JIRA Issue: BA-3724
Contributor guide
Assessment
This issue has not been assessed yet.