mik-laj commented on a change in pull request #4858: [AIRFLOW-4033] record stats of task duration URL: https://github.com/apache/airflow/pull/4858#discussion_r263207228
########## File path: airflow/models/__init__.py ########## @@ -1400,6 +1403,14 @@ def signal_handler(signum, frame): task_copy.post_execute(context=context, result=result) + end_time = time.time() + duration = end_time - start_time + Stats.timing( + '{dag_id}.{task_id}.duration'.format( Review comment: Can you update the documentation in file `docs/metrics.rst`? I would be happy if you would also add other missing keys. Reference: My WIP PR that add missing keys - https://github.com/PolideaInternal/airflow/pull/79/commits/bed9e3bd26a242abb5a0ef1bf35e7d44ab1426f1 ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services