You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/02/21 07:05:15 UTC
[GitHub] drewsonne commented on a change in pull request #4748:
[AIRFLOW-3153] Send DAG processing stats to statsd
drewsonne commented on a change in pull request #4748: [AIRFLOW-3153] Send DAG processing stats to statsd
URL: https://github.com/apache/airflow/pull/4748#discussion_r258800819
##########
File path: airflow/utils/dag_processing.py
##########
@@ -966,11 +966,31 @@ def _log_file_processing_stats(self, known_file_paths):
rows = []
for file_path in known_file_paths:
last_runtime = self.get_last_runtime(file_path)
+ file_name = os.path.basename(file_path)
+ file_name = os.path.splitext(file_name)[0].replace(os.sep, '.')
+ if last_runtime:
+ Stats.gauge(
+ 'dag_processing.last_runtime.{}'.format(file_name),
+ last_runtime
+ )
+
processor_pid = self.get_pid(file_path)
processor_start_time = self.get_start_time(file_path)
runtime = ((timezone.utcnow() - processor_start_time).total_seconds()
if processor_start_time else None)
last_run = self.get_last_finish_time(file_path)
+ if last_run:
+ unixtime = int(last_run.strftime("%s"))
Review comment:
This feels like it should be a log rather than a gauge. Would this not be a time series of timestamps?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services