o-nikolas commented on code in PR #61079:
URL: https://github.com/apache/airflow/pull/61079#discussion_r2733211629


##########
airflow-core/src/airflow/dag_processing/manager.py:
##########
@@ -1195,10 +1195,11 @@ def process_parse_results(
             run_count=run_count + 1,
         )
 
-    # TODO: AIP-66 emit metrics
-    # file_name = Path(dag_file.path).stem
-    # Stats.timing(f"dag_processing.last_duration.{file_name}", 
stat.last_duration)
-    # Stats.timing("dag_processing.last_duration", stat.last_duration, 
tags={"file_name": file_name})
+    # Note: relative_fileloc has a None default. In practice it is always 
provided but code defensively here in case
+    if relative_fileloc is not None and stat.last_duration is not None:
+        file_name = Path(relative_fileloc).stem

Review Comment:
   Chatted offline: Bundle name will go most of the way to ensure uniqueness. 
If users are duplicating filenames within sub directories of the same bundle 
that's pretty obscure and they will notice this and can fix that on their end 
if this metric is very important to them.



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