Skip to main content

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_id
  • task_id
  • owner
  • status

Value: number of tasks in a specific status.

airflow_dag_status

Labels:

  • dag_id
  • owner
  • status
  • paused

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_id
  • owner
  • status
  • paused

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

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for airflow-exporter 2.2.0
File Size Uploaded Provenance Actions
airflow_exporter-2.2.0.tar.gz 10.9 kB With provenance Details for airflow_exporter-2.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for airflow-exporter 2.2.0
File Interpreter ABI Platform Actions
airflow_exporter-2.2.0-py3-none-any.whl Python 3 none any Details for airflow_exporter-2.2.0-py3-none-any.whl

Total release size: 18.2 kB

Release files / airflow_exporter-2.2.0.tar.gz

Download URL airflow_exporter-2.2.0.tar.gz
Size 10.9 kB
Tags Source
SHA-256 checksum
How to use checksums
cea2d4bd55f48a336b723bfed508fb99c8169173225258917d1d6d76ab37da9c
BLAKE2b-256 checksum
How to use checksums
c4362b11cf146003d62afaa2810159ef6c3a8badf7f32520cad0f7a8552353a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 21, 2026.

Transparency log

Release files / airflow_exporter-2.2.0-py3-none-any.whl

Download URL airflow_exporter-2.2.0-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3dbbc37e16395daffc16af365f0e4ea6d02973a5efcf5bbdb321c0137e9401ff
BLAKE2b-256 checksum
How to use checksums
a2848d841fe5598a01e92e7271d05baeb4c59438309c6e018708f5b1c9193005
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 21, 2026.

Transparency log

Security for airflow-exporter 2.2.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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for airflow_exporter-2.2.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 Nov 21, 2026.

Transparency log

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

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page