shahar1 commented on code in PR #67927:
URL: https://github.com/apache/airflow/pull/67927#discussion_r3565718097


##########
airflow-core/src/airflow/jobs/triggerer_job_runner.py:
##########
@@ -1374,6 +1389,12 @@ async def create_triggers(self):
                 trigger_instance.asset_state_store = AssetStateStoreAccessors(
                     inlets=[Asset(name=name, uri=uri) for name, uri in 
workload.watched_assets.items()]
                 )
+            if workload.queued_at is not None:
+                stats.timing(
+                    "triggerer.trigger_queue_delay",
+                    int((time.monotonic() - workload.queued_at) * 1000),

Review Comment:
   There might be an issue to use time.monotonic() - it's stamped in the 
supervisor process but subtracted in the runner subprocess, and its zero point 
isn't guaranteed to line up across processes, so the delay is only really 
trustworthy because both happen to run on the same host.



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