kacpermuda commented on code in PR #37797:
URL: https://github.com/apache/airflow/pull/37797#discussion_r1507776084


##########
airflow/providers/openlineage/plugins/adapter.py:
##########
@@ -117,13 +117,19 @@ def build_task_instance_run_id(dag_id, task_id, 
execution_date, try_number):
             )
         )
 
-    def emit(self, event: RunEvent):
+    def emit(self, event: RunEvent) -> RunEvent:
+        """Emit OpenLineage event.
+
+        :param event: Event to be emitted.
+        :return: Redacted Event.
+        """
         if not self._client:
             self._client = self.get_or_create_openlineage_client()
         redacted_event: RunEvent = self._redacter.redact(event, max_depth=20)  
# type: ignore[assignment]
         try:
-            with Stats.timer("ol.emit.attempts"):
-                return self._client.emit(redacted_event)
+            with 
Stats.timer(f"ol.emit.attempts.{event.eventType.value}.{self._client.transport.kind}"):

Review Comment:
   I'm not sure if we want to replace this metric or add a new one next to it?



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