Simplify approach for creating dag run and task spans (#62554)
Previously we had a very high touch way of creating long-running spans for dag runs and tasks and keeping them alive across scheduler handoffs etc. We figured out a simpler way to do that. Additionally, we determined that there was really no need to use the custom airflow tracing interfaces and resolved instead to do OTEL in a way where we can just use the OTEL interfaces directly. We pushed the task span creation down to the tasks, so that task spans run in the task process. Replace the custom base tracer class and scattered OTEL logic with a focused helper module in `airflow/observability/traces/`. Remove the large blocks of tracing code from `scheduler_job_runner.py` and `dagrun.py` and consolidate span creation for dag runs and task execution into clean, reusable functions. Add configurable flush timeout and improve span naming.
D
Daniel Standish committed
0decb3cbd1ecce2a6e55d6148f517f4cde6cefdd
Parent: 60f6efc
Committed by GitHub <noreply@github.com>
on 3/10/2026, 7:12:42 PM