From 5f893800f079dd50080bd079a8907009269ecee7 Mon Sep 17 00:00:00 2001 From: Lyn Date: Tue, 12 Dec 2023 10:24:18 -0800 Subject: [PATCH] fix: Make `arroyo.consumer.latency` a timing metric --- arroyo/processing/strategies/commit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arroyo/processing/strategies/commit.py b/arroyo/processing/strategies/commit.py index e447d2ad..e79cdbd5 100644 --- a/arroyo/processing/strategies/commit.py +++ b/arroyo/processing/strategies/commit.py @@ -27,7 +27,7 @@ def submit(self, message: Message[Any]) -> None: now = time.time() if self.__last_record_time is None or now - self.__last_record_time > 1: if message.timestamp is not None: - self.__metrics.increment( + self.__metrics.timing( "arroyo.consumer.latency", now - message.timestamp.timestamp() ) self.__last_record_time = now