Skip to content

[DCV-3942] Document DAG parse times via the Airflow REST API - #60

Open
gams87 wants to merge 4 commits into
mainfrom
DCV-3942-dag-parse-times-docs
Open

[DCV-3942] Document DAG parse times via the Airflow REST API#60
gams87 wants to merge 4 commits into
mainfrom
DCV-3942-dag-parse-times-docs

Conversation

@gams87

@gams87 gams87 commented Aug 19, 2026

Copy link
Copy Markdown
Contributor
Screenshot 2026-08-19 at 9 22 47 AM

Adds a "Find Slow-Parsing DAGs with the REST API" how-to under How-tos > Airflow, covering how to get per-DAG parse durations for Team Airflow on Airflow 3 environments.

On Airflow 3 the dag-processor records last_parse_duration / last_parsed_time per DAG and GET /api/v2/dags exposes both, so users can get the real parsing-time report (the numbers that matter for scheduling latency, unlike running airflow dags report on a worker) with a plain API call -- no dag-processor pod access, no extra RBAC.

The guide's primary auth path is the environment's Airflow API Token from the launchpad (Environments > Keys), used directly as a Bearer token against the Airflow API URL shown on that same page. An "authenticate as your own user" section covers the alternative flow for long-lived automation and multi-environment use: exchanging a personal Datacoves API key for a short-lived JWT at POST /auth/token via the __datacoves_token__ sentinel username (per-user permissions, non-expiring key, works against any environment the user can access).

Includes the paginated Python script that prints DAGs slowest-first (same shape as the datacoves my parse-logs report), guidance on interpreting parse times, and the Airflow 2 limitation note (its API does not expose parse durations). My Airflow users are pointed at the existing datacoves my parse-logs command instead, which is why the page lives under Team Airflow how-tos.

Verified end-to-end on a live Airflow 3 environment: launchpad token + Bearer against /api/v2/dags returned the full slowest-first report (24 DAGs), and the sentinel exchange flow was verified against the auth manager code and a real cluster's routing (public /api/ and /auth/ bypass pomerium).

🤖 Generated with Claude Code

@gams87
gams87 requested a review from noel August 19, 2026 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant