[PR #393] [CLOSED] Improve today workflow indexing observability logs #700

Closed
opened 2026-03-13 21:04:32 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/AJaySi/ALwrity/pull/393
Author: @AJaySi
Created: 3/6/2026
Status: Closed

Base: mainHead: codex/add-logging-and-counters-to-indexing


📝 Commits (1)

  • b09d058 Improve today workflow indexing observability logs

📊 Changes

1 file changed (+94 additions, -3 deletions)

View changed files

📝 backend/api/today_workflow.py (+94 -3)

📄 Description

Motivation

  • Silent exception handling around indexing and background scheduling made indexing failures invisible to logs/monitoring and impeded debugging.
  • Add lightweight counters and contextual log fields so indexing attempts, successes, and failures are observable while keeping failures non-fatal to API behavior.

Description

  • Replace silent except in _index_tasks_to_sif with structured logger.info/logger.error messages that include user_id, date, label, task_count, and lightweight counters indexing_attempts, indexing_successes, and indexing_failures.
  • Emit an informational log on indexing attempts and a success log on completion, and log errors with exception class/message on failure while returning (non-fatal).
  • Replace silent exception handling in the created / yesterday indexing scheduling block with scheduling/preparation logger.info entries including the same contextual fields and counters, and an explicit logger.error if the preparation fails.
  • Changes are implemented in backend/api/today_workflow.py and preserve existing API response semantics (failures do not change responses).

Testing

  • Ran python -m py_compile backend/api/today_workflow.py to validate syntax and it completed successfully.

Codex Task


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/AJaySi/ALwrity/pull/393 **Author:** [@AJaySi](https://github.com/AJaySi) **Created:** 3/6/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `codex/add-logging-and-counters-to-indexing` --- ### 📝 Commits (1) - [`b09d058`](https://github.com/AJaySi/ALwrity/commit/b09d0583b09afecea6f46da9ab6e47156f71d395) Improve today workflow indexing observability logs ### 📊 Changes **1 file changed** (+94 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `backend/api/today_workflow.py` (+94 -3) </details> ### 📄 Description ### Motivation - Silent exception handling around indexing and background scheduling made indexing failures invisible to logs/monitoring and impeded debugging. - Add lightweight counters and contextual log fields so indexing attempts, successes, and failures are observable while keeping failures non-fatal to API behavior. ### Description - Replace silent `except` in `_index_tasks_to_sif` with structured `logger.info`/`logger.error` messages that include `user_id`, `date`, `label`, `task_count`, and lightweight counters `indexing_attempts`, `indexing_successes`, and `indexing_failures`. - Emit an informational log on indexing attempts and a success log on completion, and log errors with exception class/message on failure while returning (non-fatal). - Replace silent exception handling in the `created` / yesterday indexing scheduling block with scheduling/preparation `logger.info` entries including the same contextual fields and counters, and an explicit `logger.error` if the preparation fails. - Changes are implemented in `backend/api/today_workflow.py` and preserve existing API response semantics (failures do not change responses). ### Testing - Ran `python -m py_compile backend/api/today_workflow.py` to validate syntax and it completed successfully. ------ [Codex Task](https://chatgpt.com/codex/tasks/task_e_69aafa5394848328b84104ea19f15b0d) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-13 21:04:32 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ALwrity#700
No description provided.