SameerMesiah97 opened a new pull request, #69092:
URL: https://github.com/apache/airflow/pull/69092

   **Description**
   
   This change adds the `team_name` tag to the `celery.task_timeout_error` 
metric emitted by the Celery executor when retrying workload publication after 
an `AirflowTaskTimeout`.
   
   The `celery.execute_command.failure` metric was intentionally left 
unchanged. That metric is only emitted by `execute_command()`, which is used on 
Airflow versions prior to 3.0, whereas multi-team support (and `team_name`) was 
introduced in Airflow 3.1. As a result, there is no supported execution path 
where `celery.execute_command.failure` can be associated with a team.
   
   **Rationale**
   
   The `celery.task_timeout_error` metric is used to identify workload 
publication timeouts. Adding the `team_name` tag allows these events to be 
attributed to the owning team in multi-team deployments, making it easier to 
diagnose publish failures and identify affected teams.
   
   **Tests**
   
   Added a unit test covering the previously untested workload publication 
timeout retry path. The test verifies that `celery.task_timeout_error` is 
emitted with the expected tags both with and without `team_name`.
   
   **Backwards Compatibility**
   
   This change is additive only. The `team_name` tag is only emitted when 
available; otherwise, the metric is emitted unchanged.
   
   ###### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes (please specify the tool below)
   
   Generated-by: [GPT 5.5] following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)


-- 
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]

Reply via email to