{"record":{"id":"e349c1f240170aaa","repo":"SigNoz/signoz","slug":"consumer-group-not-found-in-the-request","errorCode":null,"errorMessage":"consumer_group not found in the request","messagePattern":"consumer_group not found in the request","errorType":"validation","errorClass":null,"httpStatus":400,"severity":"warning","filePath":"pkg/query-service/app/integrations/messagingQueues/kafka/translator.go","lineNumber":50,"sourceCode":"\tqueryRangeParams := &v3.QueryRangeParamsV3{\n\t\tStart:          messagingQueue.Start,\n\t\tEnd:            messagingQueue.End,\n\t\tStep:           defaultStepInterval,\n\t\tCompositeQuery: cq,\n\t\tVersion:        \"v4\",\n\t\tFormatForWeb:   true,\n\t}\n\n\treturn queryRangeParams, nil\n}\n\nfunc buildClickHouseQueryNetwork(messagingQueue *MessagingQueue, queueType string) (*v3.ClickHouseQuery, error) {\n\tstart := messagingQueue.Start\n\tend := messagingQueue.End\n\n\tconsumerGroup, ok := messagingQueue.Variables[\"consumer_group\"]\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"consumer_group not found in the request\")\n\t}\n\n\tpartitionID, ok := messagingQueue.Variables[\"partition\"]\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"partition not found in the request\")\n\t}\n\n\tquery := generateNetworkLatencyThroughputSQL(start, end, consumerGroup, partitionID, queueType)\n\treturn &v3.ClickHouseQuery{\n\t\tQuery: query,\n\t}, nil\n}\n\nfunc buildBuilderQueriesProducerBytes(\n\tunixMilliStart, unixMilliEnd int64,\n\tattributeCache *Clients,\n) (map[string]*v3.BuilderQuery, error) {\n","sourceCodeStart":32,"sourceCodeEnd":68,"githubUrl":"https://github.com/SigNoz/signoz/blob/5069bf80b08f1f00d7e014eccc09902f9871004f/pkg/query-service/app/integrations/messagingQueues/kafka/translator.go#L32-L68","documentation":"Error returned by buildClickHouseQueryNetwork when the 'consumer_group' key is missing from messagingQueue.Variables, which is required to build network latency/throughput SQL for Kafka.","triggerScenarios":"Requesting Kafka network latency/throughput data (BuildQRParamsWithCache network context) without supplying a consumer_group variable in the request.","commonSituations":"Dashboard panels or API clients that omit template variables when the consumer group filter is unset/empty.","solutions":["Include consumer_group in the request's variables map","Set a default consumer_group in the dashboard template variable","Validate required variables client-side before calling the API"],"exampleFix":"// before\nVariables: map[string]string{\"partition\": \"0\"}\n\n// after\nVariables: map[string]string{\"consumer_group\": \"my-group\", \"partition\": \"0\"}","handlingStrategy":"validation","validationCode":"if (!('consumer_group' in mq.Variables)) throw new Error('consumer_group required');","typeGuard":"func hasRequiredVars(v map[string]string, keys ...string) bool { for _, k := range keys { if _, ok := v[k]; !ok { return false } }; return true }","tryCatchPattern":null,"preventionTips":["Always send full variable set for network queries","Default template variables in dashboards"],"tags":["kafka","messaging-queues","validation"],"backgroundTag":"missing-request-parameter","analyzedSha":"5069bf80b08f1f00d7e014eccc09902f9871004f","analyzedAt":"2026-08-28T06:22:12.824Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}