SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.
TypeScript apmapplication-monitoringdistributed-tracinggogood-first-issuejaegerloglogsmetricsmonitoringnextjsobservabilityopen-sourceopentelemetryprometheusreactreactjsself-hostedtracingtypescript
feat: fixProducerAPI (#6422)
Ekansh Guptad1503f1418fb
diff --git a/pkg/query-service/app/http_handler.go b/pkg/query-service/app/http_handler.goindex c488595584..bbb42effbf 100644--- a/pkg/query-service/app/http_handler.go+++ b/pkg/query-service/app/http_handler.go@@ -3222,16 +3222,16 @@ func (aH *APIHandler) getProducerThroughputOverview(}for _, res := range result {- for _, series := range res.Series {- serviceName, serviceNameOk := series.Labels["service_name"]- topicName, topicNameOk := series.Labels["topic"]- params := []string{serviceName, topicName}+ for _, list := range res.List {+ serviceName, serviceNameOk := list.Data["service_name"].(*string)+ topicName, topicNameOk := list.Data["topic"].(*string)+ params := []string{*serviceName, *topicName}hashKey := uniqueIdentifier(params, "#")_, ok := attributeCache.Hash[hashKey]if topicNameOk && serviceNameOk && !ok {attributeCache.Hash[hashKey] = struct{}{}- attributeCache.TopicName = append(attributeCache.TopicName, topicName)- attributeCache.ServiceName = append(attributeCache.ServiceName, serviceName)+ attributeCache.TopicName = append(attributeCache.TopicName, *topicName)+ attributeCache.ServiceName = append(attributeCache.ServiceName, *serviceName)}}}@@ -3256,25 +3256,23 @@ func (aH *APIHandler) getProducerThroughputOverview(}latencyColumn := &v3.Result{QueryName: "latency"}- var latencySeries []*v3.Series+ var latencySeries []*v3.Rowfor _, res := range resultFetchLatency {- for _, series := range res.Series {- topic, topicOk := series.Labels["topic"]- serviceName, serviceNameOk := series.Labels["service_name"]- params := []string{topic, serviceName}+ for _, list := range res.List {+ topic, topicOk := list.Data["topic"].(*string)+ serviceName, serviceNameOk := list.Data["service_name"].(*string)+ params := []string{*serviceName, *topic}hashKey := uniqueIdentifier(params, "#")_, ok := attributeCache.Hash[hashKey]if topicOk && serviceNameOk && ok {- latencySeries = append(latencySeries, series)+ latencySeries = append(latencySeries, list)}}}- latencyColumn.Series = latencySeries+ latencyColumn.List = latencySeriesresult = append(result, latencyColumn)- resultFetchLatency = postprocess.TransformToTableForBuilderQueries(result, queryRangeParams)-resp := v3.QueryRangeResponse{Result: resultFetchLatency,}diff --git a/pkg/query-service/app/integrations/messagingQueues/kafka/translator.go b/pkg/query-service/app/integrations/messagingQueues/kafka/translator.goindex 2731bd5b95..d7dc96d470 100644--- a/pkg/query-service/app/integrations/messagingQueues/kafka/translator.go+++ b/pkg/query-service/app/integrations/messagingQueues/kafka/translator.go@@ -284,7 +284,7 @@ func BuildQRParamsWithCache(messagingQueue *MessagingQueue, queryContext string,cq = &v3.CompositeQuery{QueryType: v3.QueryTypeBuilder,BuilderQueries: bhq,- PanelType: v3.PanelTypeTable,+ PanelType: v3.PanelTypeList,}}@@ -364,7 +364,7 @@ func BuildClickHouseQuery(messagingQueue *MessagingQueue, queueType string, querfunc buildCompositeQuery(chq *v3.ClickHouseQuery, queryContext string) (*v3.CompositeQuery, error) {- if queryContext == "producer-consumer-eval" {+ if queryContext == "producer-consumer-eval" || queryContext == "producer-throughput-overview" {return &v3.CompositeQuery{QueryType: v3.QueryTypeClickHouseSQL,ClickHouseQueries: map[string]*v3.ClickHouseQuery{queryContext: chq},