{"record":{"id":"ae3863fa0cfdc8d3","repo":"SigNoz/signoz","slug":"unsupported-operator-s-ae3863","errorCode":null,"errorMessage":"unsupported operator %s","messagePattern":"unsupported operator (.+?)","errorType":"validation","errorClass":null,"httpStatus":400,"severity":"error","filePath":"pkg/query-service/app/traces/v3/query_builder.go","lineNumber":190,"sourceCode":"\t\t\t\tcase v3.FilterOperatorRegex, v3.FilterOperatorNotRegex:\n\t\t\t\t\tconditions = append(conditions, fmt.Sprintf(operator, columnName, fmtVal))\n\t\t\t\tcase v3.FilterOperatorExists, v3.FilterOperatorNotExists:\n\t\t\t\t\tif item.Key.IsColumn {\n\t\t\t\t\t\tsubQuery, err := ExistsSubQueryForFixedColumn(item.Key, item.Operator)\n\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\treturn \"\", err\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconditions = append(conditions, subQuery)\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcolumnType, columnDataType := getClickhouseTracesColumnDataTypeAndType(item.Key)\n\t\t\t\t\t\tconditions = append(conditions, fmt.Sprintf(operator, columnDataType, columnType, item.Key.Key))\n\t\t\t\t\t}\n\n\t\t\t\tdefault:\n\t\t\t\t\tconditions = append(conditions, fmt.Sprintf(\"%s %s %s\", columnName, operator, fmtVal))\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn \"\", fmt.Errorf(\"unsupported operator %s\", item.Operator)\n\t\t\t}\n\t\t}\n\t}\n\tqueryString := strings.Join(conditions, \" AND \")\n\n\tif len(queryString) > 0 {\n\t\tqueryString = \" AND \" + queryString\n\t}\n\treturn queryString, nil\n}\n\nfunc ExistsSubQueryForFixedColumn(key v3.AttributeKey, op v3.FilterOperator) (string, error) {\n\tif key.DataType == v3.AttributeKeyDataTypeString {\n\t\tif op == v3.FilterOperatorExists {\n\t\t\treturn fmt.Sprintf(\"%s %s ''\", key.Key, tracesOperatorMappingV3[v3.FilterOperatorNotEqual]), nil\n\t\t} else {\n\t\t\treturn fmt.Sprintf(\"%s %s ''\", key.Key, tracesOperatorMappingV3[v3.FilterOperatorEqual]), nil\n\t\t}","sourceCodeStart":172,"sourceCodeEnd":208,"githubUrl":"https://github.com/SigNoz/signoz/blob/5069bf80b08f1f00d7e014eccc09902f9871004f/pkg/query-service/app/traces/v3/query_builder.go#L172-L208","documentation":"buildTracesFilterQuery (v3 traces builder) received a filter operator that has no mapping in tracesOperatorMappingV3, so no ClickHouse SQL operator can be produced for it.","triggerScenarios":"Passing an operator string not present in tracesOperatorMappingV3 (e.g. an empty operator, a typo like 'neq', or an operator only supported for logs/metrics) in a traces FilterSet.","commonSituations":"Copy-pasting filter JSON between log and trace queries; older clients sending operator names that were renamed across SigNoz versions.","solutions":["Use one of the v3.FilterOperator constants that exist in tracesOperatorMappingV3 (=, !=, >, >=, <, <=, contains, ncontains, in, nin, exists, nexists, like)","Trim/lowercase operator strings before sending","Upgrade the client to use the current v3 filter operator constants"],"exampleFix":"// before\n{\"operator\":\"neq\",\"value\":\"x\"}\n\n// after\n{\"operator\":\"!=\",\"value\":\"x\"}","handlingStrategy":"validation","validationCode":"if _, ok := tracesOperatorMappingV3[item.Operator]; !ok {\n    return fmt.Errorf(\"unsupported operator %s\", item.Operator)\n}","typeGuard":"func isSupportedTraceOp(op v3.FilterOperator) bool {\n    _, ok := tracesOperatorMappingV3[op]\n    return ok\n}","tryCatchPattern":null,"preventionTips":["Reuse v3.FilterOperator constants, never raw strings","Lowercase/trim operator input before validation"],"tags":["signoz","traces","filters","operator","validation"],"backgroundTag":"unsupported-filter-operator","analyzedSha":"5069bf80b08f1f00d7e014eccc09902f9871004f","analyzedAt":"2026-08-28T06:22:12.824Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}