lablup / lablup/backend.ai

Error Log Service Layer Implementation and Audit Log Integration

Open
#7,746 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

Error logs currently lack integration with the audit log system, making it difficult to correlate errors with specific user actions. The error log handling is not structured through the service layer pattern, which is inconsistent with the codebase architecture.

- Error logs table does not have `request_id` column to link with audit logs
- Error log handling is not implemented in the service/repository layer pattern
- Audit log API does not return associated error information

## Objective

Implement Error Log through the service layer pattern and integrate with Audit Log via request_id for comprehensive error tracking.

- Add `request_id` column to error_logs table
- Implement ErrorLogRepository and ErrorLogService following existing patterns
- Extend Audit Log API to return associated error messages (without traceback)

## Expected Sub Issues

- Add request_id Column to Error Log Table (Alembic Migration)
- Implement Error Log Repository Layer
- Implement Error Log Service Layer
- Extend Audit Log API to Return Associated Error Messages

JIRA Issue: BA-3718

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.