Skip to content

Show the task ID attributes (ti_id, task_id, etc.) once, not on every log line#66036

Merged
bbovenzi merged 1 commit into
apache:mainfrom
astronomer:task-identity-not-on-every-log-line
Apr 29, 2026
Merged

Show the task ID attributes (ti_id, task_id, etc.) once, not on every log line#66036
bbovenzi merged 1 commit into
apache:mainfrom
astronomer:task-identity-not-on-every-log-line

Conversation

@ashb
Copy link
Copy Markdown
Member

@ashb ashb commented Apr 28, 2026

A recent PR (#65458) changed the structured log output to include these attributes on every log message, which is very helpful for when the task logs make it to an external system, but when viewing them in Airflow directly it quickly becomes "noise" as they never change.

This PR "extracts" them out and shows them once at the the start just after the source info and removes it from every other message.

They are also injected back in to the copy and download content

Before:
Screenshot 2026-04-28 at 17 45 28

After:

Screenshot 2026-04-28 at 17 43 25

(It's much more noticeable on longer logs)

@ashb ashb added the backport-to-v3-2-test Mark PR with this label to backport to v3-2-test branch label Apr 28, 2026
@boring-cyborg boring-cyborg Bot added the area:UI Related to UI/UX. For Frontend Developers. label Apr 28, 2026
@kaxil kaxil added this to the Airflow 3.2.2 milestone Apr 28, 2026
Comment thread airflow-core/src/airflow/ui/rules/core.js Outdated
Comment thread airflow-core/src/airflow/ui/src/pages/TaskInstance/Logs/utils.ts
Comment thread airflow-core/src/airflow/ui/src/queries/useLogs.tsx Outdated
Comment thread airflow-core/src/airflow/ui/src/components/renderStructuredLog.tsx Outdated
Copy link
Copy Markdown
Contributor

@amoghrajesh amoghrajesh left a comment

Choose a reason for hiding this comment

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

LGTM thanks!

… log line

A recent PR changed the structured log output to include these attributes on
every log message, which is very helpful for when the task logs make it to an
external system, but when viewing them in Airflow directly it quickly becomes
"noise" as they never change.

This PR "extracts" them out and shows them once at the the start just after
the source info and removes it from every other message.

They are also injected back in to the copy and download content
@ashb ashb force-pushed the task-identity-not-on-every-log-line branch from d7d868a to 169b055 Compare April 29, 2026 12:34
@ashb ashb requested a review from bbovenzi April 29, 2026 12:35
Copy link
Copy Markdown
Contributor

@bbovenzi bbovenzi left a comment

Choose a reason for hiding this comment

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

Yeah this is good. Later on we need to clean up our frontend log processing code.

@bbovenzi bbovenzi merged commit d139d37 into apache:main Apr 29, 2026
81 checks passed
@bbovenzi bbovenzi deleted the task-identity-not-on-every-log-line branch April 29, 2026 16:44
@github-actions
Copy link
Copy Markdown
Contributor

Backport failed to create: v3-2-test. View the failure log Run details

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
v3-2-test Commit Link

You can attempt to backport this manually by running:

cherry_picker d139d37 v3-2-test

This should apply the commit to the v3-2-test branch and leave the commit in conflict state marking
the files that need manual conflict resolution.

After you have resolved the conflicts, you can continue the backport process by running:

cherry_picker --continue

If you don't have cherry-picker installed, see the installation guide.

seruman pushed a commit to seruman/airflow that referenced this pull request Apr 30, 2026
… log line (apache#66036)

A recent PR changed the structured log output to include these attributes on
every log message, which is very helpful for when the task logs make it to an
external system, but when viewing them in Airflow directly it quickly becomes
"noise" as they never change.

This PR "extracts" them out and shows them once at the the start just after
the source info and removes it from every other message.

They are also injected back in to the copy and download content
ashb added a commit that referenced this pull request May 5, 2026
… log line (#66036)

A recent PR changed the structured log output to include these attributes on
every log message, which is very helpful for when the task logs make it to an
external system, but when viewing them in Airflow directly it quickly becomes
"noise" as they never change.

This PR "extracts" them out and shows them once at the the start just after
the source info and removes it from every other message.

They are also injected back in to the copy and download content

(cherry picked from commit d139d37)
ashb added a commit that referenced this pull request May 5, 2026
… log line (#66036) (#66421)

A recent PR changed the structured log output to include these attributes on
every log message, which is very helpful for when the task logs make it to an
external system, but when viewing them in Airflow directly it quickly becomes
"noise" as they never change.

This PR "extracts" them out and shows them once at the the start just after
the source info and removes it from every other message.

They are also injected back in to the copy and download content

(cherry picked from commit d139d37)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:UI Related to UI/UX. For Frontend Developers. backport-to-v3-2-test Mark PR with this label to backport to v3-2-test branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants