ashb commented on code in PR #63568:
URL: https://github.com/apache/airflow/pull/63568#discussion_r2974566564
##########
airflow-core/src/airflow/models/dagrun.py:
##########
@@ -1020,21 +1026,33 @@ def is_effective_leaf(task):
return leaf_tis
def _emit_dagrun_span(self, state: DagRunState):
+ # just to be safe
+ if not isinstance(self.context_carrier, dict):
+ return
+
ctx = TraceContextTextMapPropagator().extract(self.context_carrier)
span = trace.get_current_span(context=ctx)
span_context = span.get_span_context()
with override_ids(span_context.trace_id, span_context.span_id):
- attributes = {
+ attributes: dict[str, str] = {
"airflow.dag_id": str(self.dag_id),
"airflow.dag_run.run_id": self.run_id,
}
+ if self.start_date:
+ attributes["airflow.dag_run.start_date"] = str(self.start_date)
Review Comment:
@nickstenning Dates in attributes -- should they be ISO8601 strings, or
epoch (floating point) seconds?
--
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]