hanxdatadog commented on code in PR #71793:
URL: https://github.com/apache/airflow/pull/71793#discussion_r4699063782
##########
task-sdk/src/airflow/sdk/execution_time/task_runner.py:
##########
@@ -1298,6 +1298,13 @@ def startup(msg: StartupDetails) ->
tuple[RuntimeTaskInstance, Context, Logger]:
with _airflow_parsing_context_manager(dag_id=msg.ti.dag_id,
task_id=msg.ti.task_id):
ti = parse(msg, log)
+
+ if conf.getboolean("logging", "dag_tags_in_logs", fallback=False) and
ti.task.dag.tags:
+ # Nested under one key so free-form tags can't overwrite standard log
fields.
+ bind_contextvars(
Review Comment:
Went back to showing `dag_tags` in the preamble, consistent with the other
per-attempt fields. To avoid scanning the whole log when the option is off,
`extractTIContext` now looks at most 100 records past the first TI record.
---
Drafted-by: Claude Code (Opus 5.5); reviewed by @hanxdatadog before posting
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]