mobuchowski commented on code in PR #31817:
URL: https://github.com/apache/airflow/pull/31817#discussion_r1228335158
##########
docs/apache-airflow-providers-openlineage/guides/developer.rst:
##########
@@ -50,4 +49,25 @@ Instead of returning complete OpenLineage event, the
provider defines ``Operator
run_facets: dict[str, BaseFacet] = Factory(dict)
job_facets: dict[str, BaseFacet] = Factory(dict)
-OpenLineage integration takes care to enrich it with things like general
Airflow facets, proper event time and type.
+OpenLineage integration itself takes care to enrich it with things like
general Airflow facets, proper event time and type, creating proper OpenLineage
RunEvent.
+
+How to properly implement OpenLineage methods?
+==============================================
+
+There are several things worth noting when implementing OpenLineage in
operators.
+
+First, do not import OpenLineage methods on top-level, but in OL method itself.
+This allows users to use your provider even if they do not have OpenLineage
provider installed.
+
Review Comment:
Added example from `GcsToGcsOperator` - due to it's simplicity.
--
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]