Commit 0b1b2d3
deepinsight coder
Add run_type tag to dagrun.duration.failed timeout metric
When a Dag run timed out, the scheduler emitted dagrun.duration.failed with
only a dag_id tag, while every other dagrun.duration.* metric (emitted by
DagRun._emit_duration_stats_for_finished_state) also carries run_type. This
made the timeout path inconsistent and dropped run_type from dashboards and
alerts for timed-out runs.
Emit the metric with dag_run.stats_tags so it includes both dag_id and
run_type, matching the canonical completion path.
closes: #647651 parent 03c71e5 commit 0b1b2d3
3 files changed
Lines changed: 43 additions & 1 deletion
File tree
- airflow-core
- newsfragments
- src/airflow/jobs
- tests/unit/jobs
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2457 | 2457 | | |
2458 | 2458 | | |
2459 | 2459 | | |
2460 | | - | |
| 2460 | + | |
| 2461 | + | |
| 2462 | + | |
2461 | 2463 | | |
2462 | 2464 | | |
2463 | 2465 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3835 | 3835 | | |
3836 | 3836 | | |
3837 | 3837 | | |
| 3838 | + | |
| 3839 | + | |
| 3840 | + | |
| 3841 | + | |
| 3842 | + | |
| 3843 | + | |
| 3844 | + | |
| 3845 | + | |
| 3846 | + | |
| 3847 | + | |
| 3848 | + | |
| 3849 | + | |
| 3850 | + | |
| 3851 | + | |
| 3852 | + | |
| 3853 | + | |
| 3854 | + | |
| 3855 | + | |
| 3856 | + | |
| 3857 | + | |
| 3858 | + | |
| 3859 | + | |
| 3860 | + | |
| 3861 | + | |
| 3862 | + | |
| 3863 | + | |
| 3864 | + | |
| 3865 | + | |
| 3866 | + | |
| 3867 | + | |
| 3868 | + | |
| 3869 | + | |
| 3870 | + | |
| 3871 | + | |
| 3872 | + | |
| 3873 | + | |
| 3874 | + | |
| 3875 | + | |
| 3876 | + | |
3838 | 3877 | | |
3839 | 3878 | | |
3840 | 3879 | | |
| |||
0 commit comments