Skip to content

add bundle_name tags to missing dag processor metrics - #73717

Merged
msumit merged 13 commits into
apache:mainfrom
samraj2k:codex/processor-timeouts-bundle-name
Sep 29, 2026
Merged

msumit merged 13 commits into
apache:mainfrom
samraj2k:codex/processor-timeouts-bundle-name

Conversation

@samraj2k

@samraj2k samraj2k commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Currently, when the metric for processor_timeouts or processes is emitted, it does not carries value for bundle name. If a same filepath is present in two bundles, say 'dag_a.py`, then the metric is confusing. Thus, this PR adds the tag of bundle_name to the existing metric(s)

Test Plan

Tested in local

Local verification

  • breeze run --skip-image-upgrade-check pytest airflow-core/tests/unit/dag_processing/test_manager.py -xq: 175 passed, 5 skipped, 1 warning. The skipped tests require PostgreSQL; this run used SQLite.

  • prek run --from-ref upstream/main --stage pre-commit: passed, including Ruff, mypy, and the metrics registry check.

  • prek run --from-ref upstream/main --stage manual --skip compile-ui-assets-dev --skip view-skill-eval --skip run-skill-eval-codex: passed.

  • A controlled runtime probe exercised Airflow's processor timeout path through the configured StatsD backend and a local UDP receiver. For the same file_path, it captured:

    airflow.dag_processing.processor_timeouts,file_path=shared.py,bundle_name=bundle_alpha:1|c
    airflow.dag_processing.processor_timeouts,file_path=shared.py,bundle_name=bundle_beta:1|c
    

Was generative AI tooling used to co-author this PR?
  • Yes — Codex (GPT-6)

Generated-by: Codex (GPT-6) following the guidelines


Dag bundles can contain the same relative file path. Without bundle attribution, timeout counts for those files collapse into one metric series.
Bundle names can contain characters that require normalization before they are used as metric tags. The regression case ensures the timeout metric keeps the same tag format as other Dag processing metrics.
@samraj2k samraj2k changed the title Attribute Dag processor timeouts to bundles add bundle_name to dag processor timeouts metric Sep 25, 2026
@samraj2k
samraj2k marked this pull request as ready for review September 25, 2026 10:33
Process counts for files with the same relative path can collapse across bundles. Consistent bundle tags at every process lifecycle emission keep those series distinct.
@samraj2k samraj2k changed the title add bundle_name to dag processor timeouts metric Attribute Dag processor metrics to bundles Sep 27, 2026
The metric contract requires distinct bundle tags for identical relative paths, regardless of the order in which the packets are emitted.
@samraj2k samraj2k changed the title Attribute Dag processor metrics to bundles add bundle_name tags to missing dag processor metrics Sep 27, 2026
@msumit msumit self-assigned this Sep 28, 2026
@msumit
msumit merged commit ac88acc into apache:main Sep 29, 2026
2 checks passed
@boring-cyborg

boring-cyborg Bot commented Sep 29, 2026

Copy link
Copy Markdown

Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions.

@samraj2k
samraj2k deleted the codex/processor-timeouts-bundle-name branch September 29, 2026 04:56
@ashwaniYDV

Copy link
Copy Markdown

great 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants