Airflow prometheus exporter
Exposes dag and task based metrics from Airflow to a Prometheus compatible endpoint.
Compatibility with Airflow versions
3.*
Versions >=2.0.0 will support only Airflow 3.0+
2.*
Versions >=1.7.0,<2 are compatible with Airflow 2.*
Development of Airflow 2 compatible version happens from airflow-2 branch
Install
pip install airflow-exporter
That's it. You're done.
Exporting extra labels to Prometheus
It is possible to add extra labels to DAG-related metrics by providing labels
dict to DAG params.
Example
dag = DAG(
'dummy_dag',
schedule_interval=timedelta(hours=5),
default_args=default_args,
catchup=False,
params={
'labels': {
'env': 'test'
}
}
)
Label env with value test will be added to all metrics related to
dummy_dag:
airflow_dag_status{dag_id="dummy_dag",env="test",owner="owner",status="running"} 12.0
Metrics
Metrics will be available at
http://<your_airflow_host_and_port>/admin/metrics/
airflow_task_status
Labels:
dag_idtask_idownerstatus
Value: number of tasks in a specific status.
airflow_dag_status
Labels:
dag_idownerstatuspaused
Value: number of dags in a specific status.
airflow_dag_run_duration
Labels:
dag_id: unique identifier for a given DAG
Value: duration in seconds of the longest DAG Run for given DAG. This metric is not available for DAGs that have already finished.
airflow_dag_last_status
Labels:
dag_idownerstatuspaused
Value: 0 or 1 depending on wherever the current state of each dag_id is status.
The "last" DAG run is the one with the most recent updated_at (not
logical_date, which is NULL for manually triggered runs).
License
Distributed under the MIT license. See LICENSE for more information.
Metadata
Release files for airflow-exporter 2.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| airflow_exporter-2.1.0.tar.gz | 9.9 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| airflow_exporter-2.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.6 kB
Release files / airflow_exporter-2.1.0.tar.gz
| Download URL | airflow_exporter-2.1.0.tar.gz |
|---|---|
| Size | 9.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f60e4cd15dcc1986912913de0c897fdad314eafb517f328ee4d60d4c29c200d4
|
|
BLAKE2b-256 checksum How to use checksums |
9c8fb529f65926f756bfad2d6c755d9133e20b52d59acc5a1475fad71b2808e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 5, 2026.
Transparency logRelease files / airflow_exporter-2.1.0-py3-none-any.whl
| Download URL | airflow_exporter-2.1.0-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
acced2ef4446e18cd97417896e3f24985e08d61fa824bed63470d44cdcad4623
|
|
BLAKE2b-256 checksum How to use checksums |
9ca568e819e2d6498aec35b194c190cbfcf189398bb2f9e8085a4c52536140a7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 5, 2026.
Transparency logSecurity for airflow-exporter 2.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for airflow_exporter-2.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 5, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.