Closed greenpau closed 4 years ago
@greenpau nice job!
Is it ready for review?
@elephantum , not yet. I will ping you when it is done.
@elephantum , conceptually, you could try reviewing the exporter.
Also, do you think it is the code or the test itself causing the below?
It is difficult to review this PR because you did so many changes at once + renamed files.
Let’s discuss if it is possible to split this PR into several that are incremental and change only small parts of code at a time.
@elephantum, unfortunately, I don’t have much time to work on splitting it. By and large, it has these major changes:
Additionally, it:
I see. In current state this PR can not be accepted: tests are broken, diff is 100%
We will use it as a reference to fix #54, #55, #56 separately.
Resolves: epoch8/airflow-exporter#54, epoch8/airflow-exporter#55, epoch8/airflow-exporter#56
More info:
This commit adds the support for the configuration of the exporter via
prometheus_exporter
section of Airflow configuration.The keys with
expose_
prefix enable or disable the exposure of certain class of metrics. For example, Airflow variables-related metrics are not exposed by default. However, withexpose_variables
set toTrue
, the exporter will start exposing the metrics. Similarly, by default, the exporter exposes scheduler-related metrics. However, withexpose_scheduler
set toFalse
, the exporter will not export them.Additionally, when
expose_config
is being enabled, the exporter will expose a subset ofcore
andprometheus_exporter
configuration settings.It is possible to disable the exporter:
When authentication is enabled, the metrics are accessible via:
Also, when the authentication is enabled, Prometheus scrape job might look like this: