lablup / lablup/backend.ai

Extend Audit Log API to Return Associated Error Messages

Open
#7,755 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.