dstandish commented on code in PR #63839:
URL: https://github.com/apache/airflow/pull/63839#discussion_r2978550854


##########
airflow-core/src/airflow/jobs/triggerer_job_runner.py:
##########
@@ -96,6 +100,34 @@
     from airflow.sdk.types import RuntimeTaskInstanceProtocol as RuntimeTI
 
 logger = logging.getLogger(__name__)
+tracer = trace.get_tracer(__name__)
+
+
+def _make_trigger_span(
+    ti: TaskInstanceDTO | None, trigger_id: int, name: str
+) -> _AgnosticContextManager[trace.Span]:
+    parent_context = (
+        TraceContextTextMapPropagator().extract(ti.context_carrier) if ti and 
ti.context_carrier else None
+    )
+    attributes: dict[str, str | int] = {
+        "airflow.trigger.name": name,
+    }
+    if ti:
+        span_name = f"trigger.{ti.task_id}" if ti else f"trigger.{trigger_id}"

Review Comment:
   will do in followup



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