diff --git a/pkg/query-service/app/integrations/messagingQueues/kafka/consumerLag.md b/pkg/query-service/app/integrations/messagingQueues/kafka/consumerLag.md index cd0e1f6324..b97cd9e69d 100644 --- a/pkg/query-service/app/integrations/messagingQueues/kafka/consumerLag.md +++ b/pkg/query-service/app/integrations/messagingQueues/kafka/consumerLag.md @@ -122,7 +122,7 @@ Response in query range `table` format "isValueColumn": false }, { - "name": "rps", + "name": "throughput", "queryName": "", "isValueColumn": false } @@ -132,7 +132,7 @@ Response in query range `table` format "data": { "error_percentage": "0", "p99": "5.51359028", - "rps": "39.86888888888889", + "throughput": "39.86888888888889", "service_name": "producer-svc" } } diff --git a/pkg/query-service/app/integrations/messagingQueues/kafka/sql.go b/pkg/query-service/app/integrations/messagingQueues/kafka/sql.go index 7b38f128bd..f09cf73d9b 100644 --- a/pkg/query-service/app/integrations/messagingQueues/kafka/sql.go +++ b/pkg/query-service/app/integrations/messagingQueues/kafka/sql.go @@ -26,7 +26,6 @@ WITH consumer_query AS ( GROUP BY serviceName ) --- Main query to select all metrics SELECT serviceName AS service_name, p99, @@ -65,7 +64,7 @@ SELECT serviceName AS service_name, p99, COALESCE((error_count * 100.0) / total_count, 0) AS error_percentage, - COALESCE(total_count / %d, 0) AS rps -- Convert nanoseconds to seconds + COALESCE(total_count / %d, 0) AS throughput -- Convert nanoseconds to seconds FROM producer_query ORDER BY @@ -78,12 +77,11 @@ ORDER BY func generateNetworkLatencyThroughputSQL(start, end int64, consumerGroup, queueType string) string { timeRange := (end - start) / 1000000000 query := fmt.Sprintf(` ---- Subquery for RPS calculation, desc sorted by rps SELECT stringTagMap['messaging.client_id'] AS client_id, stringTagMap['service.instance.id'] AS service_instance_id, serviceName AS service_name, - count(*) / %d AS rps -- Convert nanoseconds to seconds + count(*) / %d AS throughput -- Convert nanoseconds to seconds FROM signoz_traces.distributed_signoz_index_v2 WHERE timestamp >= '%d' @@ -92,7 +90,7 @@ WHERE AND msgSystem = '%s' AND stringTagMap['messaging.kafka.consumer.group'] = '%s' GROUP BY service_name, client_id, service_instance_id -ORDER BY rps DESC +ORDER BY throughput DESC `, timeRange, start, end, queueType, consumerGroup) return query }