suhanovv opened a new issue #17512: URL: https://github.com/apache/airflow/issues/17512
**Apache Airflow version**: 2.* **Apache Airflow Provider versions** (please include all providers that are relevant to your bug): providers-elasticsearch==1.*/2.* **Kubernetes version (if you are using kubernetes)** (use `kubectl version`): 1.17 **What happened**: When using the ElasticsearchTaskHandler I see the broken order of the logs in the interface.  **What you expected to happen**: The problem lies in the method [set_context](https://github.com/apache/airflow/blob/662cb8c6ac8becb26ff405f8b21acfccdd8de2ae/airflow/providers/elasticsearch/log/es_task_handler.py#L271) that is set on the instance of the class and then all entries in the log go with the same offset, which is used to select for display in the interface. When we redefined method emit and put the offset to the record, the problem disappeared **How to reproduce it**: Run a long-lived task that generates logs, in our case it is a spark task launched from a docker container -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
