dstandish commented on code in PR #63308:
URL: https://github.com/apache/airflow/pull/63308#discussion_r2943264880
##########
airflow-core/src/airflow/models/dagrun.py:
##########
@@ -1025,17 +1028,22 @@ def _emit_dagrun_span(self, state: DagRunState):
"airflow.dag_run.run_id": self.run_id,
}
if self.logical_date:
- attributes["airflow.dag_run.logical_date"] =
str(self.logical_date)
+ attributes["airflow.dag_run.logical_date"] =
str(self.logical_date.timestamp() * 1e9)
if self.partition_key:
- attributes["airflow.dag_run.partition_key"] =
str(self.partition_key)
+ attributes["airflow.dag_run.partition_key"] =
self.partition_key
span = tracer.start_span(
name=f"dag_run.{self.dag_id}",
- start_time=int((self.start_date or
timezone.utcnow()).timestamp() * 1e9),
+ start_time=int((self.triggered_at or
timezone.utcnow()).timestamp() * 1e9),
attributes=attributes,
context=context.Context(),
)
status_code = StatusCode.OK if state == DagRunState.SUCCESS else
StatusCode.ERROR
span.set_status(status_code)
+ span.add_event(
+ "airflow.dag_run.start_time",
+ attributes=attributes,
+ timestamp=int((self.start_date and self.start_date.timestamp()
or timezone.utcnow()) * 1e9),
Review Comment:
actually looks like i alrady did that locally
--
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]