Repository navigation
Statistics not updated after failure #52254
Description
Activity
- addedkind:bugThis is a clearly a bugThis is a clearly a bugneeds-triagelabel for new issues that we didn't triage yetlabel for new issues that we didn't triage yet
on Jun 25, 2025 Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.
Can confirm also seeing the same thing, I think #52336 also has the same issue but for a different metric.
- addedaffected_version:3.0Issues Reported for 3.0Issues Reported for 3.0and removedneeds-triagelabel for new issues that we didn't triage yetlabel for new issues that we didn't triage yet
on Jul 18, 2025 Yes, I believe this is the same issue. I tested on Airflow 2.11.0 and both
ti_successesandti_failuresmetrics are emitted, but they no longer appear in 3.0.0 or later.I use version 3.0.3, both
ti_failuresandti_successesare not emitted.The metrics below are from my statsd-exporter logs after I triggered a DAG that later failed. As the logs show, only
task_instance_createdwas emitted.I use airflow version
3.0.32025-08-04 11:45:45 time=2025-08-04T03:45:45.059Z level=DEBUG source=listener.go:96 msg="Incoming line" proto=udp line=airflow.serde.load_serializers:8.303375|ms 2025-08-04 11:45:47 time=2025-08-04T03:45:47.928Z level=DEBUG source=listener.go:96 msg="Incoming line" proto=udp line=airflow.serde.load_serializers:2.348084|ms 2025-08-04 11:46:03 time=2025-08-04T03:46:03.859Z level=DEBUG source=listener.go:96 msg="Incoming line" proto=udp line=airflow.serde.load_serializers:2.921875|ms 2025-08-04 11:46:03 time=2025-08-04T03:46:03.879Z level=DEBUG source=listener.go:96 msg="Incoming line" proto=udp line=airflow.serde.load_serializers:3.580958|ms 2025-08-04 11:46:48 time=2025-08-04T03:46:48.204Z level=DEBUG source=listener.go:96 msg="Incoming line" proto=udp line=airflow.serde.load_serializers:6.642375|ms 2025-08-04 11:46:48 time=2025-08-04T03:46:48.209Z level=DEBUG source=listener.go:96 msg="Incoming line" proto=udp line=airflow.serde.load_serializers:7.632917|ms 2025-08-04 11:46:52 time=2025-08-04T03:46:52.237Z level=DEBUG source=listener.go:96 msg="Incoming line" proto=udp line=airflow.serde.load_serializers:39.680208|ms 2025-08-04 11:47:04 time=2025-08-04T03:47:04.355Z level=DEBUG source=listener.go:96 msg="Incoming line" proto=udp line=airflow.serde.load_serializers:4.704292|ms 2025-08-04 11:47:05 time=2025-08-04T03:47:05.901Z level=DEBUG source=listener.go:96 msg="Incoming line" proto=udp line=airflow.task_instance_created_BashOperator:1|c 2025-08-04 11:47:05 time=2025-08-04T03:47:05.903Z level=DEBUG source=listener.go:96 msg="Incoming line" proto=udp line=airflow.task_instance_created:1|c 2025-08-04 11:47:05 time=2025-08-04T03:47:05.903Z level=DEBUG source=listener.go:96 msg="Incoming line" proto=udp line=airflow.task_instance_created_HttpOperator:1|c 2025-08-04 11:47:05 time=2025-08-04T03:47:05.903Z level=DEBUG source=listener.go:96 msg="Incoming line" proto=udp line=airflow.task_instance_created:1|c 2025-08-04 11:47:08 time=2025-08-04T03:47:08.776Z level=DEBUG source=listener.go:96 msg="Incoming line" proto=udp line=airflow.serde.load_serializers:195.017208|ms 2025-08-04 11:47:14 time=2025-08-04T03:47:14.907Z level=DEBUG source=listener.go:96 msg="Incoming line" proto=udp line=airflow.serde.load_serializers:2.884000|msAlso, I noticed that sometimes even
task_instance_createdmetrics were not emitted.I was looking through this, I think it's related to this PR, particularly the
task_instance.pychanges and similar issue to this one too.Almost all the stats that used to get emitted in
task_instance.pywere removed or not migrated properly.I'm happy to try and open a PR for this, but probably need some guidance.
12 remaining items
Apache Airflow version
3.0.2
If "Other Airflow 2 version" selected, which one?
No response
What happened?
After a task failed the values for ti_failures are not increased.
As we are using statsd/prometheus to monitor airflow_ti_failures for task failures we are not alarmed about this.
What you think should happen instead?
A failing task should increase ti_failures
How to reproduce
Environment
Activate statsd server
Dag:
Operating System
Ubuntu 22.04.5 LTS
Versions of Apache Airflow Providers
Default with apache-airflow 3.0.2 docker image
Deployment
Docker-Compose
Deployment details
No response
Anything else?
No response
Are you willing to submit PR?
Code of Conduct