Skip to content

[DJM-812] Airflow task logs child pipeline #20233

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 16, 2025

Conversation

aboitreaud
Copy link
Contributor

@aboitreaud aboitreaud commented May 7, 2025

What does this PR do?

This PR updates the Airflow integration logs pipeline to extract dag_id, run_id, and task_id from the dirname tag. Extraction is performed in a children subpipeline, which query checks for the presence of dag_id in dirname tag so that it's guaranteed that pipeline will find the attributes to be extracted.

Motivation

Airflow DJM traces to logs correlation is made on dag_id, run_id, and task_id attributes so they need to be present on the logs. See correlation logic here.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Add the qa/skip-qa label if the PR doesn't need to be tested during QA.
  • If you need to backport this PR to another branch, you can add the backport/<branch-name> label to the PR and it will automatically open a backport PR once this one is merged

@aboitreaud aboitreaud requested review from a team as code owners May 7, 2025 11:07
@aboitreaud aboitreaud force-pushed the adrien.boitreaud/airflow-task-logs-subpipeline branch 3 times, most recently from 4394592 to 9fb4333 Compare May 9, 2025 17:05
@baturalp-dd baturalp-dd added the assets/deploy-logs-staging ONLY USED BY Logs Backend - Validates that a PR is OK to go to staging label May 23, 2025
baturalp-dd
baturalp-dd previously approved these changes May 23, 2025
@temporal-github-worker-1 temporal-github-worker-1 bot dismissed baturalp-dd’s stale review May 26, 2025 07:52

Review from baturalp-dd is dismissed. Related teams and files:

  • logs-backend
    • airflow/assets/logs/airflow.yaml
  • logs-integrations-reviewers
    • airflow/assets/logs/airflow.yaml
@aboitreaud
Copy link
Contributor Author

aboitreaud commented May 26, 2025

👋 Thanks for the review !
Here are some screenshots of a log that went through the newly added subpipeline and of the pipeline itself.

image
Screenshot 2025-05-26 at 9 49 45 AM

I just flipped the Preserve source attribute and Override on conflict bools to true to make the attribute has the correct value and we also keep the origin tag just in case.

@aboitreaud aboitreaud requested a review from baturalp-dd May 27, 2025 20:43
@aboitreaud
Copy link
Contributor Author

Hi @baturalp-dd, would you mind taking a look again please? I'm sorry I dismissed your review with the changes I made after checking the deployed pipeline on staging.

@aboitreaud
Copy link
Contributor Author

Hi @baturalp-dd , gentle bump on this 🙇

baturalp-dd
baturalp-dd previously approved these changes Jun 16, 2025
@aboitreaud aboitreaud force-pushed the adrien.boitreaud/airflow-task-logs-subpipeline branch from 7f783d4 to b8ada63 Compare June 16, 2025 16:47
@temporal-github-worker-1 temporal-github-worker-1 bot dismissed baturalp-dd’s stale review June 16, 2025 16:47

Review from baturalp-dd is dismissed. Related teams and files:

  • logs-backend
    • airflow/assets/logs/airflow.yaml
    • airflow/assets/logs/airflow_tests.yaml
  • logs-integrations-reviewers
    • airflow/assets/logs/airflow.yaml
    • airflow/assets/logs/airflow_tests.yaml
@aboitreaud
Copy link
Contributor Author

/merge

@dd-devflow
Copy link

dd-devflow bot commented Jun 16, 2025

View all feedbacks in Devflow UI.

2025-06-16 17:18:08 UTC ℹ️ Start processing command /merge


2025-06-16 17:18:14 UTC ℹ️ MergeQueue: waiting for PR to be ready

This merge request is not mergeable yet, because of pending checks/missing approvals. It will be added to the queue as soon as checks pass and/or get approvals.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2025-06-16 17:28:53 UTC ⚠️ MergeQueue: This merge request was unqueued

adrien.boitreaud@datadoghq.com unqueued this merge request

@aboitreaud
Copy link
Contributor Author

/merge -c

@dd-devflow
Copy link

dd-devflow bot commented Jun 16, 2025

View all feedbacks in Devflow UI.

2025-06-16 17:28:44 UTC ℹ️ Start processing command /merge -c

@baturalp-dd baturalp-dd added this pull request to the merge queue Jun 16, 2025
Merged via the queue into master with commit ace3a96 Jun 16, 2025
42 of 45 checks passed
@baturalp-dd baturalp-dd deleted the adrien.boitreaud/airflow-task-logs-subpipeline branch June 16, 2025 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants