JDarDagran commented on code in PR #33959:
URL: https://github.com/apache/airflow/pull/33959#discussion_r1314698739


##########
airflow/providers/openlineage/plugins/listener.py:
##########
@@ -202,3 +204,11 @@ def on_dag_run_failed(self, dag_run: DagRun, msg: str):
             self.log.error("Executor have not started before 
`on_dag_run_failed`")
             return
         self.executor.submit(self.adapter.dag_failed, dag_run=dag_run, msg=msg)
+
+
+def get_openlineage_listener() -> OpenLineageListener:

Review Comment:
   The primary motivation is to obtain an instance of the OpenLineageClient. 
It's advisable to create just one instance of the OpenLineageListener, as there 
is no requirement for additional instances. This single-instance approach 
convinced me to acquire the listener instead of the client. Additionally, this 
approach offers more flexibility in accessing other attributes of the 
OpenLineage listener if the need arises.



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