{"record":{"id":"86bc4dbab354df8d","repo":"SigNoz/signoz","slug":"operator-s-not-supported","errorCode":null,"errorMessage":"operator %s not supported","messagePattern":"operator (.+?) not supported","errorType":"validation","errorClass":null,"httpStatus":400,"severity":"error","filePath":"pkg/query-service/app/clickhouseReader/reader.go","lineNumber":367,"sourceCode":"\t\t\tKey:      tag.Key,\n\t\t\tDataType: v3.AttributeKeyDataTypeString,\n\t\t\tType:     v3.AttributeKeyTypeResource,\n\t\t}\n\n\t\tit := v3.FilterItem{\n\t\t\tKey: key,\n\t\t}\n\n\t\t// as of now only in and not in are supported\n\t\tswitch tag.Operator {\n\t\tcase model.NotInOperator:\n\t\t\tit.Operator = v3.FilterOperatorNotIn\n\t\t\tit.Value = tag.StringValues\n\t\tcase model.InOperator:\n\t\t\tit.Operator = v3.FilterOperatorIn\n\t\t\tit.Value = tag.StringValues\n\t\tdefault:\n\t\t\treturn \"\", fmt.Errorf(\"operator %s not supported\", tag.Operator)\n\t\t}\n\n\t\tfilterSet.Items = append(filterSet.Items, it)\n\t}\n\tfilterSet.Items = append(filterSet.Items, v3.FilterItem{\n\t\tKey: v3.AttributeKey{\n\t\t\tKey:      \"service.name\",\n\t\t\tDataType: v3.AttributeKeyDataTypeString,\n\t\t\tType:     v3.AttributeKeyTypeResource,\n\t\t},\n\t\tOperator: v3.FilterOperatorEqual,\n\t\tValue:    svc,\n\t})\n\n\tresourceSubQuery, err := resource.BuildResourceSubQuery(\n\t\tr.TraceDB,\n\t\tr.traceResourceTableV3,\n\t\tstart.Unix()-1800,","sourceCodeStart":349,"sourceCodeEnd":385,"githubUrl":"https://github.com/SigNoz/signoz/blob/5069bf80b08f1f00d7e014eccc09902f9871004f/pkg/query-service/app/clickhouseReader/reader.go#L349-L385","documentation":"Plain error from buildResourceSubQuery when translating legacy model tag filters into v3 filter items and the tag's Operator doesn't match any of the known cases (EqualTo, NotIn, In, etc.). It signals an unsupported/legacy operator string was passed in the trace search tags.","triggerScenarios":"Calling GetTopOperations (or span-filter paths that build resource sub-queries) with a tag whose Operator is something like 'contains', 'regex', or a typo'd operator not handled in the switch — the default branch rejects it.","commonSituations":"Clients built against older/newer filter-operator enums, hand-crafted API payloads with arbitrary operator strings, or upstream code passing v3 operators not yet mapped in this legacy builder.","solutions":["Map the tag operator to a supported one (equal/not-in/in and the other handled cases) before calling","Upgrade the query-service so the builder supports the operator you need","Validate/normalize operators on the API payload side","File/track support for the missing operator in buildResourceSubQuery"],"exampleFix":"// before\ntags := []model.TagQueryFilter{{Key: \"http.method\", Operator: \"contains\", StringValues: []string{\"GET\"}}}\n\n// after\ntags := []model.TagQueryFilter{{Key: \"http.method\", Operator: model.EqualOperator, StringValues: []string{\"GET\"}}}","handlingStrategy":"validation","validationCode":"var supportedOps = map[string]bool{\"=\":true,\"!=\":true,\"in\":true,\"not_in\":true}\nfor _, t := range tags {\n    if !supportedOps[t.Operator] { return fmt.Errorf(\"operator %s unsupported for resource filters\", t.Operator) }\n}","typeGuard":"func isSupportedTagOperator(op string) bool {\n    switch op {\n    case model.EqualOperator, model.InOperator, model.NotInOperator: return true\n    }\n    return false\n}","tryCatchPattern":"// Sanitize before the call; no runtime catch needed\nfor i := range tags {\n    if !isSupportedTagOperator(tags[i].Operator) {\n        tags[i].Operator = model.EqualOperator // or reject\n    }\n}","preventionTips":["Use the model package operator constants, never raw strings","Validate filter payloads at the API edge","Upgrade client and server operator vocabularies together"],"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"}