o-nikolas commented on code in PR #61079:
URL: https://github.com/apache/airflow/pull/61079#discussion_r2733213200
##########
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
+ Stats.timing(f"dag_processing.last_duration.{file_name}",
stat.last_duration)
Review Comment:
I'll look into this. What are we worried about here in particular? We
weren't sanitizing the filename before
--
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]