You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by as...@apache.org on 2026/05/07 19:38:04 UTC

(airflow) branch main updated: Fix incorrect type warning from OTel spans (#66559)

This is an automated email from the ASF dual-hosted git repository.

ashb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 3938e46bded Fix incorrect type warning from OTel spans (#66559)
3938e46bded is described below

commit 3938e46bdede5716c0c93185d619a250e6e9ce36
Author: Ash Berlin-Taylor <as...@apache.org>
AuthorDate: Thu May 7 20:37:56 2026 +0100

    Fix incorrect type warning from OTel spans (#66559)
    
    It was rejecting the id attribute we set in the span when the task completed:
    
    > Invalid type UUID for attribute 'airflow.task_instance.id' value. Expected one of ['bool', 'str', 'bytes', 'int', 'float'] or a sequence of those types
    
    It didn't "break" anything, but should be fixed.
---
 .../src/airflow/api_fastapi/execution_api/routes/task_instances.py      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py b/airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py
index 0fccd6ad1b6..13d8245621d 100644
--- a/airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py
+++ b/airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py
@@ -493,7 +493,7 @@ def _emit_task_span(ti, state):
                 "airflow.task_instance.try_number": ti.try_number,
                 "airflow.task_instance.map_index": ti.map_index if ti.map_index is not None else -1,
                 "airflow.task_instance.state": state,
-                "airflow.task_instance.id": ti.id,
+                "airflow.task_instance.id": str(ti.id),
             }
         )
         status_code = StatusCode.OK if state == TaskInstanceState.SUCCESS else StatusCode.ERROR