Open will-misslin opened 5 years ago
Looks like Airflow provides this functionality already. We are experiencing issue #44 and had to revert as our scheduler was crashing so I cannot test the env vars, but if you can confirm that this is expected behavior when gcp is not installed and airflow-metrics
is installed, that would help me confirm what I am seeing.
airflow-metrics
does try to enable all the metrics by default, and currently only gives the option to disable the metrics through the airflow.cfg
. One of the default metrics requires the use of gcp, so I believe this to be the reason your scheduler is crashing.
Seems like the solution here should be to disable the metrics that require additional dependencies by default, and allow them to be toggled the same way as other airflow configurations.
airflow-metrics does try to enable all the metrics by default, and currently only gives the option to disable the metrics through the airflow.cfg.
This doesn't seem great. Especially the fact that everything is enabled by default. In my experience with Airflow, the preference these days is to use environment variables (this is the order of precedence when Airflow resolves configuration as well).
Are there plans to support configuration a la Airflow via environment variables?
As an aside, I don't suspect this is related to the scheduler crashing: the scheduler runs for hours before dying inexplicably.
Upon installing airflow-metrics via poetry, we began receiving this error in Sentry.
We believe the cause to be that the
airflow_metrics_bq_enabled
option is enabled by default.Here is the traceback:
Our docker-compose airflow instance intentionally does not use the
airflow.cfg
config file in our code base, relying instead on the default provided by airflow. Ideally, we would like to set airflow-metric configuration options through environment variables.