[DCV-3942] Document DAG parse times via the Airflow REST API - #60
Open
gams87 wants to merge 4 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_timeper DAG andGET /api/v2/dagsexposes both, so users can get the real parsing-time report (the numbers that matter for scheduling latency, unlike runningairflow dags reporton 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/tokenvia 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-logsreport), 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 existingdatacoves my parse-logscommand 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/dagsreturned 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