potiuk commented on code in PR #23136:
URL: https://github.com/apache/airflow/pull/23136#discussion_r875020454


##########
airflow/providers/elasticsearch/log/es_task_handler.py:
##########
@@ -153,7 +153,17 @@ def _group_logs_by_host(self, logs):
         grouped_logs = defaultdict(list)
         for log in logs:
             key = getattr(log, self.host_field, 'default_host')
-            grouped_logs[key].append(log)
+            
+            try:
+                grouped_logs[key].append(log) 
+            except TypeError as e:
+                if not isinstance(key, Hashable): 
+                    raise ValueError("The host field in all log records needs 
to be hashable. "
+                    "If you are using filebeat, read here: "
+                    
"https://github.com/apache/airflow/issues/15613#issuecomment-1104487752";) from e

Review Comment:
   Actually - I know that - (Re-read this) - I believe each logging handler can 
be configured with parameters - you can read it in "logging" configugration in 
our docs./ 



-- 
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]

Reply via email to