From 416a069ed16c047d7e18665aa8f5bf6544a6a138 Mon Sep 17 00:00:00 2001 From: Brian Mesick Date: Wed, 13 Mar 2024 08:54:53 -0400 Subject: [PATCH] fix: Add Kafka --- .../management/commands/monitor_load_test_tracking.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform_plugin_aspects/management/commands/monitor_load_test_tracking.py b/platform_plugin_aspects/management/commands/monitor_load_test_tracking.py index f007530..8227c18 100644 --- a/platform_plugin_aspects/management/commands/monitor_load_test_tracking.py +++ b/platform_plugin_aspects/management/commands/monitor_load_test_tracking.py @@ -185,7 +185,7 @@ def get_kafka_bus_stats(self): low, high = consumer.get_watermark_offsets(partition, timeout=10, cached=False) if high < 0: - lag = "no hwmark" # Unlikely + lag = 0 elif partition.offset < 0: # No committed offset, show total message count as lag. # The actual message count may be lower due to compaction @@ -194,7 +194,7 @@ def get_kafka_bus_stats(self): else: lag = high - partition.offset - print(f"Kafka bus lag: {lag}") + print(f"{partition.topic} [{partition.partition}] Lag: {lag}") consumer_stats["partitions"].append({ "partition": partition.partition,