epoch8 / airflow-exporter

Airflow plugin to export dag and task based metrics to Prometheus.
Other
247 stars 75 forks source link

Fix negative val for airflow_dag_run_duration #38

Closed ebartels closed 5 years ago

ebartels commented 5 years ago

When using MySQL the value is negative:

# HELP airflow_dag_run_duration Duration of currently running dag_runs in seconds
# TYPE airflow_dag_run_duration gauge
airflow_dag_run_duration{dag_id="dummy_dag",run_id="manual__2018-12-10T15:01:47.297748+00:00"} -2.0

This addresses this issue.

elephantum commented 5 years ago

Oh, wow. That's embarrassing. Thanks for the fix.

ebartels commented 5 years ago

Not a problem. We already had a fix as mentioned but it was slightly different so just added this part.

We've also done some work on the mysql docker files and will add this as a separate PR.