Extend Audit Log API to Return Associated Error Messages
- Dominant language
- Python
- Stars
- 670
- Forks
- 183
- Avg merge
- 17h 7m
- Merged PRs (30d)
- 358
Description
## Motivation
When querying audit logs, users cannot see associated errors that occurred during the audited operation. This requires separate queries and manual correlation.
- Audit log API does not include error information
- Users must manually query error logs with request_id to find related errors
## Required Features
- Extend AuditLogNode GraphQL type to include `errors` field
- API layer calls both AuditLogService and ErrorLogService
- Join audit logs with error logs via `request_id`
- Return only `message` field from error logs (exclude `traceback` for security)
- Add optional filter to include/exclude error information
## Impact
- `src/ai/backend/manager/api/gql_legacy/audit_log.py`
- `src/ai/backend/manager/api/gql/audit_log.py` (if exists)
- GraphQL schema updates
## Testing Scenarios
- Verify audit log queries return associated error messages
- Verify traceback is NOT included in response
- Verify audit logs without errors return empty errors list
- Test performance with large audit log queries
JIRA Issue: BA-3727
Contributor guide
Assessment
This issue has not been assessed yet.