@@ -262,8 +262,8 @@ def _track_from_metrics_extractor(
262262
263263 def track_metrics_of (
264264 self ,
265- func : Callable [[], Any ],
266265 metrics_extractor : Callable [[Any ], Any ],
266+ func : Callable [[], Any ],
267267 ) -> Any :
268268 """
269269 Track metrics for a synchronous AI operation.
@@ -277,8 +277,8 @@ def track_metrics_of(
277277
278278 For async operations, use :meth:`track_metrics_of_async`.
279279
280- :param func: Synchronous callable that runs the operation
281280 :param metrics_extractor: Function that extracts LDAIMetrics from the operation result
281+ :param func: Synchronous callable that runs the operation
282282 :return: The result of the operation
283283 """
284284 start_ns = time .perf_counter_ns ()
@@ -294,14 +294,14 @@ def track_metrics_of(
294294 self .track_duration (duration )
295295 return self ._track_from_metrics_extractor (result , metrics_extractor )
296296
297- async def track_metrics_of_async (self , func , metrics_extractor ):
297+ async def track_metrics_of_async (self , metrics_extractor , func ):
298298 """
299299 Track metrics for an async AI operation (``func`` is awaited).
300300
301301 Same event semantics as :meth:`track_metrics_of`.
302302
303- :param func: Async callable or zero-arg callable that returns an awaitable when called
304303 :param metrics_extractor: Function that extracts LDAIMetrics from the operation result
304+ :param func: Async callable or zero-arg callable that returns an awaitable when called
305305 :return: The result of the operation
306306 """
307307 start_ns = time .perf_counter_ns ()
0 commit comments