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 2020/11/07 12:45:11 UTC

[GitHub] [airflow] potiuk commented on a change in pull request #12158: StatsD metrics have tags + generate reference docs

potiuk commented on a change in pull request #12158:
URL: https://github.com/apache/airflow/pull/12158#discussion_r519174035



##########
File path: airflow/models/dagbag.py
##########
@@ -471,7 +471,7 @@ def collect_dags(
             # file_stat.file similar format: /subdir/dag_name.py
             # TODO: Remove for Airflow 2.0
             filename = file_stat.file.split('/')[-1].replace('.py', '')
-            Stats.timing(f'dag.loading-duration.{filename}', file_stat.duration)
+            Stats.timing('dag.loading-duration.{filename}', file_stat.duration, labels={"filename": filename})

Review comment:
       Should we also add (on top of existing ones) new metrics that have just "short" name and the variables are only passed as labels? 
   
   For example in this case:
   
   ```
   Stats.timing('dag.loading-duration', file_stat.duration, labels={"filename": filename})
   ```
   
   I think those will be much easier to aggregate in some tools.
   
   
   




----------------------------------------------------------------
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:
users@infra.apache.org