Skip to content

ElasticSearch / Opensearch Task Handler does not render task log well #53526

Closed

Description

@Owen-CH-Leung

Apache Airflow Provider(s)

elasticsearch

Versions of Apache Airflow Providers

Airflow 3

Apache Airflow version

3

Operating System

Debian GNU/Linux 12 (bookworm)

Deployment

Docker-Compose

Deployment details

I use breeze to start an airflow

breeze start-airflow --executor CeleryExecutor --backend postgres --load-example-dags --db-reset

What happened

In Airflow 3, the api-server renders well-formatted task logs that allows filtering based on log level. For example, the following is the rendered task logs when using FileTaskHandler (disabling remote logging)

Image

However, when using ElasticsearchTaskHandler (And OpensearchTaskHandler), the logs are not rendered nicely:

Image

What you think should happen instead

ElasticsearchTaskHandler or OpensearchTaskHandler should render the task log nicely, just like FileTaskHandler

How to reproduce

Run breeze start-airflow --executor CeleryExecutor --backend postgres --load-example-dags --db-reset to start a local airflow. Trigger any of the DAG run. Ship the task logs to ElasticSearch / Opensearch. Then try to read task log from the webUI

Anything else

As a sidenote, in the webUI, when using FileTaskHandler, it displays the file path of the task log. But when using ElasticSearchTaskHandler, it displays that the source is default_host which is confusing. I think it should display the hostname of the ElasticSearch

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

  1. added
    kind:bug
    needs-triage
    on Jul 19, 2025
  2. added
    affected_version:3.0
    and removed
    needs-triage
    on Jul 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

affected_version:3.0area:loggingarea:providerskind:bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions