Skip to content

Latest commit

 

History

History
34 lines (28 loc) · 994 Bytes

File metadata and controls

34 lines (28 loc) · 994 Bytes

Logging and Failure Triage

Log level

Set log level in .env:

LOG_LEVEL=INFO
DEBUG=false

If DEBUG=true, backend runs at DEBUG regardless of LOG_LEVEL.

Where logs go

  • API container: docker compose logs -f api
  • Celery worker: docker compose logs -f celery_worker
  • Celery beat: docker compose logs -f celery_beat

What to check when Celery tasks fail

  1. Worker startup and broker connection:
    • Look for Redis connection errors in celery_worker logs.
  2. Task execution exceptions:
    • Search for task name monitor_sla_task, monitor_portfolio_risk_task, process_document_task.
  3. Queue health:
    • Verify Redis reachable from API/worker and CELERY_BROKER_URL is correct.
  4. API behavior:
    • POST /api/v1/monitoring/alerts/run?use_async_worker=true should return a task id.

Quick commands

docker compose ps
docker compose logs --tail=200 api
docker compose logs --tail=200 celery_worker
curl -s http://localhost:8000/health