Skip to content

Pull ACA console logs into Airflow via Log Analytics - #34

Merged
lassebenni merged 3 commits into
mainfrom
feat/aca-log-analytics-console-logs
Aug 27, 2026
Merged

Pull ACA console logs into Airflow via Log Analytics#34
lassebenni merged 3 commits into
mainfrom
feat/aca-log-analytics-console-logs

Conversation

@lassebenni

@lassebenni lassebenni commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

What I built

After ACA ingest/enrich jobs finish, Airflow pulls container stdout from the team's Log Analytics workspace (log-fp-<team>) and replays application log lines in the task log. Azure SDK noise is filtered out.

Why this approach

With INGEST_MODE=aca, container output never reaches Airflow directly — it lands in ContainerAppConsoleLogs_CL. Querying Log Analytics after the job completes is the same path operators use in the portal, without adding dependencies to the Airflow image. Polling every 5s (max 3 min) was verified on the teacher sandbox.

Contract impact

None

How to run

cd data
uv run pytest tests/common/test_aca.py

After merge, trigger final_project_pipeline_dev or final_project_pipeline on the team VM. The ingest task log should include a --- console log for job-ingest-... --- block with src.* / pipeline lines.

Self-check

  • I ran this and it works
  • Tests pass locally
  • No secrets, tokens, or connection strings in the diff
  • This pull request does one thing

After ingest/enrich ACA jobs finish, query ContainerAppConsoleLogs_CL
in log-fp-<team>, filter to application loggers (src.* / pipeline), and
emit the lines in the Airflow task log. Poll every 5s, cap wait at 3 min.
Pass TEAM from pipeline_dag so the workspace resolves per team.

Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot AI lite review requested due to automatic review settings August 27, 2026 12:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Lasse Benninga and others added 2 commits August 27, 2026 14:58
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@lassebenni
lassebenni merged commit d6d7294 into main Aug 27, 2026
8 of 9 checks passed
@lassebenni
lassebenni deleted the feat/aca-log-analytics-console-logs branch August 27, 2026 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants