ashb commented on code in PR #43941:
URL: https://github.com/apache/airflow/pull/43941#discussion_r2026517570


##########
airflow-core/src/airflow/jobs/scheduler_job_runner.py:
##########
@@ -872,36 +892,36 @@ def process_executor_events(
         return len(event_buffer)
 
     @classmethod
-    def _set_span_attrs__process_executor_events(cls, span, state, ti):
+    def set_ti_span_attrs(cls, span, state, ti):
         span.set_attributes(
             {
-                "category": "scheduler",
-                "task_id": ti.task_id,
-                "dag_id": ti.dag_id,
-                "state": ti.state,
-                "error": True if state == TaskInstanceState.FAILED else False,
-                "start_date": str(ti.start_date),
-                "end_date": str(ti.end_date),
-                "duration": ti.duration,
-                "executor_config": str(ti.executor_config),
-                "logical_date": str(ti.logical_date),
-                "hostname": ti.hostname,
-                "log_url": ti.log_url,
-                "operator": str(ti.operator),
-                "try_number": ti.try_number,
-                "executor_state": state,
-                "pool": ti.pool,
-                "queue": ti.queue,
-                "priority_weight": ti.priority_weight,
-                "queued_dttm": str(ti.queued_dttm),
-                "queued_by_job_id": ti.queued_by_job_id,
-                "pid": ti.pid,
+                "airflow.category": "scheduler",
+                "airflow.task.task_id": ti.task_id,

Review Comment:
   ```suggestion
                   "airflow.task.id": ti.id,
                   "airflow.task.task_id": ti.task_id,
   ```



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