Skip to content

stacktrace is not formatted in the logs in UI #47921

@tirkarthi

Description

@tirkarthi

Apache Airflow version

main (development)

If "Other Airflow 2 version" selected, which one?

No response

What happened?

stacktrace for exceptions from Python is present as part of extra key in error_detail and is not formatted making it hard to read the stacktrace.

Image

What you think should happen instead?

No response

How to reproduce

from __future__ import annotations

from datetime import datetime

from airflow import DAG
from airflow.decorators import task

with DAG(
    dag_id="exception_stacktracen",
    start_date=datetime(2025, 2, 1),
    catchup=False,
    schedule=None,
) as dag:

    @task
    def error(**context):
        1 / 0

    error()

Operating System

Ubuntu 20.04

Versions of Apache Airflow Providers

No response

Deployment

Virtualenv installation

Deployment details

No response

Anything else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    AIP-38Modern Web Applicationarea:UIRelated to UI/UX. For Frontend Developers.area:loggingkind:bugThis is a clearly a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions