{"record":{"id":"f2da3b0103a29dd1","repo":"SigNoz/signoz","slug":"filter-operator-s-not-supported","errorCode":null,"errorMessage":"filter operator %s not supported","messagePattern":"filter operator (.+?) not supported","errorType":"validation","errorClass":"model.ApiError","httpStatus":500,"severity":"error","filePath":"pkg/query-service/app/clickhouseReader/reader.go","lineNumber":615,"sourceCode":"\t\t\tsubQuery, argsSubQuery = addInOperator(item, tagMapType, true)\n\t\tcase model.LessThanEqualOperator:\n\t\t\tsubQuery, argsSubQuery = addArithmeticOperator(item, tagMapType, \"<=\")\n\t\tcase model.GreaterThanEqualOperator:\n\t\t\tsubQuery, argsSubQuery = addArithmeticOperator(item, tagMapType, \">=\")\n\t\tcase model.ContainsOperator:\n\t\t\tsubQuery, argsSubQuery = addContainsOperator(item, tagMapType, false)\n\t\tcase model.NotContainsOperator:\n\t\t\tsubQuery, argsSubQuery = addContainsOperator(item, tagMapType, true)\n\t\tcase model.StartsWithOperator:\n\t\t\tsubQuery, argsSubQuery = addStartsWithOperator(item, tagMapType, false)\n\t\tcase model.NotStartsWithOperator:\n\t\t\tsubQuery, argsSubQuery = addStartsWithOperator(item, tagMapType, true)\n\t\tcase model.ExistsOperator:\n\t\t\tsubQuery, argsSubQuery = addExistsOperator(item, tagMapType, false)\n\t\tcase model.NotExistsOperator:\n\t\t\tsubQuery, argsSubQuery = addExistsOperator(item, tagMapType, true)\n\t\tdefault:\n\t\t\treturn \"\", nil, &model.ApiError{Typ: model.ErrorExec, Err: fmt.Errorf(\"filter operator %s not supported\", item.GetOperator())}\n\t\t}\n\t\tquery += subQuery\n\t\targs = append(args, argsSubQuery...)\n\t}\n\treturn query, args, nil\n}\n\nfunc addInOperator(item model.TagQuery, tagMapType string, not bool) (string, []interface{}) {\n\tvalues := item.GetValues()\n\targs := []interface{}{}\n\tnotStr := \"\"\n\tif not {\n\t\tnotStr = \"NOT\"\n\t}\n\ttagValuePair := []string{}\n\tfor _, value := range values {\n\t\ttagKey := \"inTagKey\" + String(5)\n\t\ttagValue := \"inTagValue\" + String(5)","sourceCodeStart":597,"sourceCodeEnd":633,"githubUrl":"https://github.com/SigNoz/signoz/blob/5069bf80b08f1f00d7e014eccc09902f9871004f/pkg/query-service/app/clickhouseReader/reader.go#L597-L633","documentation":"ApiError (ErrorExec) from the filter-item-to-SQL builder (reader.go:615) when item.GetOperator() hits the default branch of the operator switch — the requested filter operator is not implemented for this query path (only startsWith/exists/notExists and siblings in the switch are handled).","triggerScenarios":"Executing a trace/span query whose filter items use an operator outside the supported set for this builder (e.g. regex, greater-than on a string path), so no sub-query can be generated and the default branch returns the error.","commonSituations":"Frontend or API clients sending newer v3 filter operators to an older query-service that hasn't implemented them; copying filters from the logs QB into trace search where fewer operators are supported.","solutions":["Remove or replace the unsupported operator in the filter item (use one of the implemented cases)","Upgrade SigNoz query-service to a version supporting the operator","Validate operators against the supported set before submitting the query"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"var allowedOps = map[v3.FilterOperator]bool{v3.FilterOperatorEqual:true,v3.FilterOperatorIn:true,v3.FilterOperatorStartsWith:true,v3.FilterOperatorExists:true}\nfor _, it := range query.Filters {\n    if !allowedOps[it.Operator] { return fmt.Errorf(\"operator %s not supported on this path\", it.Operator) }\n}","typeGuard":"func isSupportedFilterOp(op v3.FilterOperator) bool {\n    switch op {\n    case v3.FilterOperatorEqual, v3.FilterOperatorIn, v3.FilterOperatorStartsWith,\n         v3.FilterOperatorExists, v3.FilterOperatorNotExists:\n        return true\n    }\n    return false\n}","tryCatchPattern":"// validate up front; on error surface which operator failed\nif err := validateOperators(query.Filters); err != nil {\n    http.Error(w, err.Error(), http.StatusBadRequest)\n}","preventionTips":["Keep a shared allow-list of operators per data source","Test new QB features against the deployed query-service version","Reject unknown operators client-side with clear messages"],"tags":["filter-operator","validation","traces","signoz"],"backgroundTag":"unsupported-operator-value","analyzedSha":"5069bf80b08f1f00d7e014eccc09902f9871004f","analyzedAt":"2026-08-28T06:22:12.824Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}