Make stack traces more comprehensive yet simple
- Dominant language
- Python
- Stars
- 46.9k
- Forks
- 17.8k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 483
Description
### Description
As per users' feedback in the Airflow Debugging Survey 2024, user feedback around incomplete stack traces is as follows:
- Stack traces do not always show the full path of the source file, which can lead to confusion with files that have the same name across installed packages.
- Stack traces for failing DAGs often lack complete information when displayed in the UI's red error bar.
- Stack traces are generally helpful but can be misleading when they arise from dependency conflicts after upgrades.
### Use case/motivation
**Goals for this issue are the following:**
- Automatically dump relevant variables and environment states at the time of failure, including task parameters and Airflow configurations. Ensure to cleanup the dump to remove redundant content.
- Add time information to stack traces, detailing the time spent on different operations within a task.
- Include other DAG execution state information that could be useful to the user. Preferably keep it configurable to user can disable if not required.
- Attempt to always show the full path of the source file, in order to avoid confusion during debugging.
### Related issues
Parent Issue: https://github.com/apache/airflow/issues/40975
### Are you willing to submit a PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [x] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
Contributor guide
Research direction
Start with failing DAG stack traces as shown in the UI red error bar, comparing the displayed information with the full source-file path and execution state available at failure time. Review parent issue #40975, then define the required variables, configuration, timing, cleanup, and configurability criteria before implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-engineering, observability
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100