Skip to content

Migrate error log to batched logging system #8543

@HyeockJinKim

Description

@HyeockJinKim

Objective

Migrate error log creation from direct DB writes to the batched logging system.

Implementation Details

Repository Changes

  1. Update ErrorLogDBSource
    • Add bulk_create() method using BulkCreator
    • Keep existing create() for backward compatibility
  2. Update ErrorLogRepository
    • Route create() calls to queue manager
    • Add flush() method

Service Changes

  1. Update ErrorLogService
    • Change create() to enqueue
    • Return immediately

Configuration

  • Batch size: 100 (default)
  • Flush interval: 5 seconds
  • Redis backup: disabled (not critical)

Testing

  • Test error log enqueueing
  • Test batch creation
  • Integration tests

Acceptance Criteria

  • Error logs written in batches
  • No functional regression
  • Reduced DB load
  • All tests passing

JIRA Issue: BA-4235

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Story.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions