htpawel opened a new issue, #37420:
URL: https://github.com/apache/airflow/issues/37420

   ### Apache Airflow version
   
   Other Airflow 2 version (please specify below)
   
   ### If "Other Airflow 2 version" selected, which one?
   
   2.7.1
   
   ### What happened?
   
   I have airflow with statsd enabled (airflow > statsd-exporter > prometheus) 
and I believe that airflow is not sending all metrics defined in 
[apache-airflow/2.7.1/metrics](https://airflow.apache.org/docs/apache-airflow/2.7.1/administration-and-deployment/logging-monitoring/metrics.html).
 I've added _dag.<dag_id>.<task_id>.scheduled_duration_ and 
_dag.<dag_id>.<task_id>.queued_duration_ to my statsd mappings file:
   `mappings:
     - match: "*.dag.*.*.scheduled_duration"
       match_metric_type: observer
       name: "af_agg_dag_task_scheduled_duration"
       labels:
         airflow_id: "$1"
         dag_id: "$2"
         task_id: "$3"
     - match: "*.dag.*.*.queued_duration"
       match_metric_type: observer
       name: "af_agg_dag_task_queued_duration"
       labels:
         airflow_id: "$1"
         dag_id: "$2"
         task_id: "$3"`
   
   And could not find it in prometheus, so I checked under /metrics on 
statsd-exporter and did not find either. Later found out that more are missing, 
eg _dag.<dag_id>.<task_id>.duration_ (I don't know if it's a coincidence but 
metrics with one or two labels, including airflow_id, works fine, but with more 
does not). Even when removing mapping entirely those metrics with default names 
are missing. There are not any logs related to those metrics either (with log 
level = debug) in statsd-exporter.
   
   ### What you think should happen instead?
   
   Metrics should be available in statsd-exporter like all the others.
   
   ### How to reproduce
   
   Enable statsd metrics on Airflow 2.7.1, then connect Airflow with 
statsd-exporter (0.26.0) and check /metrics
   
   ### Operating System
   
   Ubuntu 22.04.3 LTS
   
   ### Versions of Apache Airflow Providers
   
   Default installation from pypi - 
https://airflow.apache.org/docs/apache-airflow/stable/installation/installing-from-pypi.html
   
   ### Deployment
   
   Virtualenv installation
   
   ### Deployment details
   
   Default installation from pypi - 
https://airflow.apache.org/docs/apache-airflow/stable/installation/installing-from-pypi.html
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


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