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


##########
airflow-core/src/airflow/models/dagrun.py:
##########
@@ -366,7 +405,11 @@ def __init__(
         self.triggered_by = triggered_by
         self.triggering_user_name = triggering_user_name
         self.scheduled_by_job_id = None
-        self.context_carrier = {}
+
+        context_carrier = {}
+        with start_root_span():
+            TraceContextTextMapPropagator().inject(context_carrier)
+        self.context_carrier = context_carrier

Review Comment:
   > or, if you want to be absolutely certain that the dag processor root span 
doesn't have a parent (I'm not sure I'd do this if it's not needed):
   
   there will definitely be times when there is a span here.
   
   e.g. when triggering via API, there'll be a span for the API request.  we'll 
want to link that here.  but you suggested not having this dagrun span be a 
child of that "trigger dag run" span -- just a root span linked to it.
   
   so we need to make it a root span, if that is the desired structure.



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